summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/cmm/CmmSink.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/cmm/CmmSink.hs b/compiler/cmm/CmmSink.hs
index 3633ed3003..76ce18b534 100644
--- a/compiler/cmm/CmmSink.hs
+++ b/compiler/cmm/CmmSink.hs
@@ -462,9 +462,13 @@ tryToInline dflags live node assigs = go usages node emptyLRegSet assigs
CmmCondBranch (CmmMachOp (MO_Ne w) args)
ti fi l
-> CmmCondBranch (cmmMachOpFold dflags (MO_Eq w) args)
- fi ti l
+ fi ti (inv_likeliness l)
node' -> node'
+ inv_likeliness :: Maybe Bool -> Maybe Bool
+ inv_likeliness Nothing = Nothing
+ inv_likeliness (Just l) = Just (not l)
+
inl_exp :: CmmExpr -> CmmExpr
-- inl_exp is where the inlining actually takes place!
inl_exp (CmmReg (CmmLocal l')) | l == l' = rhs