[GHC] #10124: Simple case analyses generate too many branches

GHC ghc-devs at haskell.org
Mon Mar 2 14:49:18 UTC 2015


#10124: Simple case analyses generate too many branches
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.4
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  #6135, #9661      |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Ah, I see.  So maybe you want a rule like this:
 {{{
 isTrue# a || isTrue# b = isTrue# (a `orI#` b)
 }}}
 NB that the `(==)` method for `Int` says
 {{{
 (I# x) `eqInt` (I# y) = isTrue# (x ==# y)
 }}}
 You'd have delay inlining `(||)` a bit, but you could do that.

 Simon

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10124#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list