Commit 96d2eb27 authored by Alex Biehl's avatar Alex Biehl Committed by Ben Gamari

Invert likeliness when improving conditionals

... in CmmSink
parent 1cb12eae
......@@ -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
......
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