diff options
author | Peter Trommler <ptrommler@acm.org> | 2022-01-28 19:46:33 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-02-10 13:55:37 +0000 |
commit | 8219c54de0137c8650cc2e994da0ad6c7bd80434 (patch) | |
tree | 1a11217d0f1d3c4878667e7dd08b62638abcddc0 | |
parent | d5194ab29cad0530196b2efa6a6c4687c889d709 (diff) | |
download | haskell-8219c54de0137c8650cc2e994da0ad6c7bd80434.tar.gz |
Cmm: fix equality of expressions
Compare expressions and types when comparing `CmmLoad`s.
Fixes #21016
(cherry picked from commit d1ef62889f0988317ce0eb495130021f27765689)
-rw-r--r-- | compiler/GHC/Cmm/CommonBlockElim.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Cmm/CommonBlockElim.hs b/compiler/GHC/Cmm/CommonBlockElim.hs index 35a303e605..cde67b0835 100644 --- a/compiler/GHC/Cmm/CommonBlockElim.hs +++ b/compiler/GHC/Cmm/CommonBlockElim.hs @@ -222,7 +222,7 @@ eqExprWith :: (BlockId -> BlockId -> Bool) eqExprWith eqBid = eq where CmmLit l1 `eq` CmmLit l2 = eqLit l1 l2 - CmmLoad e1 _ a1 `eq` CmmLoad e2 _ a2 = e1 `eq` e2 && a1 == a2 + CmmLoad e1 t1 a1 `eq` CmmLoad e2 t2 a2 = e1 `eq` e2 && a1 == a2 && t1 `cmmEqType` t2 CmmReg r1 `eq` CmmReg r2 = r1==r2 CmmRegOff r1 i1 `eq` CmmRegOff r2 i2 = r1==r2 && i1==i2 CmmMachOp op1 es1 `eq` CmmMachOp op2 es2 = op1==op2 && es1 `eqs` es2 |