LLVM backend miscompiles pext and pdep
Strangely, the W16
and W8
pexp
and pdep
tests of bgamari/test-primops> currently fail with the LLVM backend:
For instance,
*Main> let e = parseExpr @W16 "narrow[W64→W16](load[W64](0::W64))"
*Main> let f = parseExpr @W16 "narrow[W64→W16]((load[W64](0::W64)) ^ 1::W64)"
*Main> evalCallishOp comp pext (e,f)
2
*Main> evalCallishOp llvm pext (e,f)
0x1e
*Main> interpret e
0x100
*Main> interpret f
0x101
The result of this operation should be 2
.
Edited by Ben Gamari