summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Trommler <ptrommler@acm.org>2022-01-29 12:26:38 +0100
committerPeter Trommler <ptrommler@acm.org>2022-01-29 17:52:49 +0000
commit8ae1e3bef99e3ef2b6a526b11d864865440df998 (patch)
tree93a3806a312bc7ea5021f282cb144473b295b894
parent6d4b24d80dcebf4eb4c1aff38d9804461f8a3a66 (diff)
downloadhaskell-wip/T21016.tar.gz
Check type first then expressionwip/T21016
-rw-r--r--compiler/GHC/Cmm/CommonBlockElim.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Cmm/CommonBlockElim.hs b/compiler/GHC/Cmm/CommonBlockElim.hs
index 5ffab0451c..10eb9ccb3d 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 t1 `eq` CmmLoad e2 t2 = e1 `eq` e2 && t1 `cmmEqType` t2
+ CmmLoad e1 t1 `eq` CmmLoad e2 t2 = t1 `cmmEqType` t2 && e1 `eq` e2
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