[commit: ghc] wip/T13861: WIP: fix thinko (f455675)

git at git.haskell.org git at git.haskell.org
Mon Jan 1 12:09:35 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T13861
Link       : http://ghc.haskell.org/trac/ghc/changeset/f455675d015da33afb29a39e0d5f232508831d6b/ghc

>---------------------------------------------------------------

commit f455675d015da33afb29a39e0d5f232508831d6b
Author: Gabor Greif <ggreif at gmail.com>
Date:   Mon Jan 1 13:08:45 2018 +0100

    WIP: fix thinko


>---------------------------------------------------------------

f455675d015da33afb29a39e0d5f232508831d6b
 compiler/simplStg/StgCse.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/simplStg/StgCse.hs b/compiler/simplStg/StgCse.hs
index df3acab..bf8f4fc 100644
--- a/compiler/simplStg/StgCse.hs
+++ b/compiler/simplStg/StgCse.hs
@@ -424,16 +424,16 @@ mkStgCase scrut bndr ty alts | all isBndr alts = scrut
       | isBndr def
       , ((_:_),rest) <- partition isBndr alts
       = Just (def:rest)
+    grouped ((DEFAULT, _, _) : _) = Nothing
     grouped alts | ((_:_:_),rest) <- partition isBndr alts
                  = Just ((DEFAULT, [], StgApp bndr []) : rest)
-    grouped ((DEFAULT, _, _) : _) = Nothing
     grouped alts
       | (cons@(_:_:_),rest) <- partition (\case (_,_,StgConApp _ [] [])->True; _->False) alts
       , let itsCon (_,_,StgConApp c [] []) = c
             itsCon _ = pprPanic "mkStgCase" (text "not StgConApp")
             gcons = groupBy ((==) `on` itsCon) cons
       , (((_,_,res):_:_):others) <- sortBy (comparing $ Down . length) gcons
-      = pprTrace "mkStgCase##" (ppr others) $ Just ((DEFAULT, [], res) : concat others ++ rest)
+      = Just ((DEFAULT, [], res) : concat others ++ rest)
     grouped _ = Nothing
 
 -- Utilities



More information about the ghc-commits mailing list