diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-11-20 16:30:15 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-11-20 16:32:35 +0300 |
commit | d13b7d60650cb84af11ee15b3f51c3511548cfdb (patch) | |
tree | 344038bdc858bb79688d478809bc9ed55df66ffb /compiler/codeGen/StgCmmExpr.hs | |
parent | 47bbc709cb221e32310c6e28eb2f33acf78488c7 (diff) | |
download | haskell-d13b7d60650cb84af11ee15b3f51c3511548cfdb.tar.gz |
Remove redundant check in cgCase
D5339 (part of D5324) removed the dead case binder analysis done during
CoreToStg so this condition always holds now.
Test Plan: Validated locally.
Reviewers: sgraf, bgamari, simonmar
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5358
Diffstat (limited to 'compiler/codeGen/StgCmmExpr.hs')
-rw-r--r-- | compiler/codeGen/StgCmmExpr.hs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs index e8d111f9d5..2430a0ddf9 100644 --- a/compiler/codeGen/StgCmmExpr.hs +++ b/compiler/codeGen/StgCmmExpr.hs @@ -304,13 +304,10 @@ cgCase (StgOpApp (StgPrimOp op) args _) bndr (AlgAlt tycon) alts | isEnumerationTyCon tycon -- Note [case on bool] = do { tag_expr <- do_enum_primop op args - -- If the binder is not dead, convert the tag to a constructor - -- and assign it. - ; unless (isDeadBinder bndr) $ do - { dflags <- getDynFlags - ; tmp_reg <- bindArgToReg (NonVoid bndr) - ; emitAssign (CmmLocal tmp_reg) - (tagToClosure dflags tycon tag_expr) } + ; dflags <- getDynFlags + ; tmp_reg <- bindArgToReg (NonVoid bndr) + ; emitAssign (CmmLocal tmp_reg) + (tagToClosure dflags tycon tag_expr) ; (mb_deflt, branches) <- cgAlgAltRhss (NoGcInAlts,AssignedDirectly) (NonVoid bndr) alts |