[GHC] #8832: Constant-folding regression wrt `clearBit (bit 0) 0 `

GHC ghc-devs at haskell.org
Mon Feb 23 15:43:10 UTC 2015


#8832: Constant-folding regression wrt `clearBit (bit 0) 0 `
-------------------------------------+-------------------------------------
        Reporter:  hvr               |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  high              |               Milestone:  7.10.1
       Component:  Compiler          |                 Version:  7.8.1-rc2
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |  simplCore/should_compile/T8832
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by thomie):

 * owner:  thoughtpolice =>
 * status:  closed => new
 * resolution:  fixed =>


Comment:

 `z` is still not properly constant-folded.

 The test is deceiving. It greps for '#', and there is no '#' in the output
 for `z` (not until #8274 is implemented, which I'm working on).

 {{{
 $ ghc-7.10.0.20150123 Temp.hs -ddump-simpl -fforce-recomp -dsuppress-all
 -O
 [1 of 1] Compiling M                ( Temp.hs, Temp.o )

 ==================== Tidy Core ====================
 Result size of Tidy Core = {terms: 10, types: 3, coercions: 0}

 z2
 z2 = bitInteger 0

 z1
 z1 = complementInteger z2

 z
 z = andInteger z2 z1
 }}}

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


More information about the ghc-tickets mailing list