Commit d13b7d60 authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan

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
parent 47bbc709
......@@ -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
......
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