summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2017-10-17 12:37:25 +0200
committerGabor Greif <ggreif@gmail.com>2017-10-17 12:37:25 +0200
commited48d133f9b9e41ea6d5dc254f257eeb12ad00b7 (patch)
tree1942f7612374d0bad9e9a75fff1640e6f635916d /compiler/codeGen
parent6cb46421de6a0f97ca1c8103c19df478f07612d7 (diff)
downloadhaskell-ed48d133f9b9e41ea6d5dc254f257eeb12ad00b7.tar.gz
Simplify, no functionality change
Diffstat (limited to 'compiler/codeGen')
-rw-r--r--compiler/codeGen/StgCmmExpr.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs
index 95dcc9f9ef..3fcc935121 100644
--- a/compiler/codeGen/StgCmmExpr.hs
+++ b/compiler/codeGen/StgCmmExpr.hs
@@ -616,13 +616,12 @@ cgAlts gc_plan bndr (AlgAlt tycon) alts
branches' = [(tag+1,branch) | (tag,branch) <- branches]
emitSwitch tag_expr branches' mb_deflt 1 fam_sz
- else -- No, get tag from info table
- do dflags <- getDynFlags
- let -- Note that ptr _always_ has tag 1
- -- when the family size is big enough
- untagged_ptr = cmmRegOffB bndr_reg (-1)
- tag_expr = getConstrTag dflags (untagged_ptr)
- emitSwitch tag_expr branches mb_deflt 0 (fam_sz - 1)
+ else -- No, get tag from info table
+ let -- Note that ptr _always_ has tag 1
+ -- when the family size is big enough
+ untagged_ptr = cmmRegOffB bndr_reg (-1)
+ tag_expr = getConstrTag dflags (untagged_ptr)
+ in emitSwitch tag_expr branches mb_deflt 0 (fam_sz - 1)
; return AssignedDirectly }