Wasm backend MulMayOflo issue
Reported in a test-primops
run:
MulMayOflo
W8: FAIL (25.09s)
*** Failed! Falsified (after 1 test and 2 shrinks):
2::W8
0x4e::W8
156
Use --quickcheck-replay=116271 to reproduce.
Use -p '/MulMayOflo.W8/' to rerun this test only.
W16: FAIL (24.10s)
*** Failed! Falsified (after 1 test and 1 shrink):
6::W16
0x2217::W16
52362
Use --quickcheck-replay=531378 to reproduce.
Use -p '/MulMayOflo.W16/' to rerun this test only.
W32 passes testing, W64 fails from boring function signature mismatch.
Now, GHC only emits platform word sized MulMayOflo
when lowering STG to Cmm, so it doesn't sound like a big deal to me. But it seems to be possible to make subword MulMayOflo
in hand-written Cmm. What's the semantics in the subword cases? And does anyone actually do that?