Commit 64b6733e authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

CmmParse: Don't force alignment in memcpy-ish operations

This was initially made in 681973c3.
Here I wanted to enforce that the alignment passed to %memcpy was a
constant expression, as this is required by LLVM. However, this breaks
the knot-tying done in `loopDecls`, causing T8131 to hang.

Here I remove the `seq` and mark T8131 as `expect_broken` in the case
of the NCG, which doesn't force the alignment in this case.

Fixes #10664.
parent 7ec6ffc4
......@@ -988,8 +988,7 @@ callishMachOps = listToUFM $
memcpyLikeTweakArgs :: (Int -> CallishMachOp) -> [CmmExpr] -> (CallishMachOp, [CmmExpr])
memcpyLikeTweakArgs op [] = pgmError "memcpy-like function requires at least one argument"
memcpyLikeTweakArgs op args@(_:_) =
-- Force alignment with result to ensure pprPgmError fires
align `seq` (op align, args')
(op align, args')
args' = init args
align = case last args of
# Tests for code generator and CMM parser
test('T8131', cmm_src, compile_fail, [''])
# Only the LLVM code generator consistently forces the alignment of
# memcpy operations
test('T8131', [cmm_src, only_ways(llvm_ways)], compile_fail, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment