[commit: ghc] wip/T14373: join *after* the second switch (9186d7b)
git at git.haskell.org
git at git.haskell.org
Wed Dec 13 22:32:37 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T14373
Link : http://ghc.haskell.org/trac/ghc/changeset/9186d7bc5ba6516024b5b0f646fc75bbf89dab2e/ghc
>---------------------------------------------------------------
commit 9186d7bc5ba6516024b5b0f646fc75bbf89dab2e
Author: Gabor Greif <ggreif at gmail.com>
Date: Wed Dec 13 15:50:17 2017 +0100
join *after* the second switch
>---------------------------------------------------------------
9186d7bc5ba6516024b5b0f646fc75bbf89dab2e
compiler/codeGen/StgCmmExpr.hs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs
index 6c00cef..21b8045 100644
--- a/compiler/codeGen/StgCmmExpr.hs
+++ b/compiler/codeGen/StgCmmExpr.hs
@@ -634,11 +634,14 @@ cgAlts gc_plan bndr (AlgAlt tycon) alts
(mb_deflt, mb_branch) <- prelabel mb_deflt
emitSwitch tag_expr (catchall : ptr) mb_deflt 1 maxpt
+ join_lbl <- newBlockId
+ emit (mkBranch join_lbl)
emitLabel infos_lbl
let untagged_ptr = cmmUntag dflags (CmmReg bndr_reg)
tag_expr = getConstrTag dflags untagged_ptr
info0 = (\(tag,branch)->(tag-1,branch)) <$> info
emitSwitch tag_expr info0 mb_branch (maxpt - 1) (fam_sz - 1)
+ emitLabel join_lbl
; return AssignedDirectly }
More information about the ghc-commits
mailing list