
#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