X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FStgCmmExpr.hs;h=dac7d67c09d292e2e218acfd1b1cdd0f79841a5e;hb=309f64a0fd319198308f6b76bd22f38001bb5df0;hp=379f1cde37d755bdde2427fef3d054ab725fdcf0;hpb=93d047a1096571b75d9911536aecaca547a6f947;p=ghc-hetmet.git diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs index 379f1cd..dac7d67 100644 --- a/compiler/codeGen/StgCmmExpr.hs +++ b/compiler/codeGen/StgCmmExpr.hs @@ -273,15 +273,15 @@ cgCase scrut bndr srt alt_type alts ; let ret_bndrs = chooseReturnBndrs bndr alt_type alts alt_regs = map idToReg ret_bndrs simple_scrut = isSimpleScrut scrut alt_type - gc_plan | not simple_scrut = GcInAlts alt_regs srt - | isSingleton alts = NoGcInAlts - | up_hp_usg > 0 = NoGcInAlts - | otherwise = GcInAlts alt_regs srt + gcInAlts | not simple_scrut = True + | isSingleton alts = False + | up_hp_usg > 0 = False + | otherwise = True + gc_plan = if gcInAlts then GcInAlts alt_regs srt else NoGcInAlts ; mb_cc <- maybeSaveCostCentre simple_scrut ; c_srt <- getSRTInfo srt - ; withSequel (AssignTo alt_regs c_srt) - (cgExpr scrut) + ; withSequel (AssignTo alt_regs gcInAlts) (cgExpr scrut) ; restoreCurrentCostCentre mb_cc ; bindArgsToRegs ret_bndrs