[GHC] #5615: ghc produces poor code for `div` with constant powers of 2.

GHC ghc-devs at haskell.org
Mon Aug 29 06:56:37 UTC 2016


#5615: ghc produces poor code for `div` with constant powers of 2.
-------------------------------------+-------------------------------------
        Reporter:  Lennart           |                Owner:  akio
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.4.1-rc1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:  x86
 Type of failure:  Runtime           |            Test Case:
  performance bug                    |
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2486
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by akio):

 * owner:  daniel.is.fischer => akio
 * differential:   => Phab:D2486


Comment:

 I implemented rules for `div` and `mod`. I decided not to do anything with
 Euclidean division because (1) the rules I added are valid for the current
 semantics (floor division) as well as for Euclidean division, and (2) I
 believe that changing the semantics of `div` and `mod` is a much bigger
 change and should be discussed separately.

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


More information about the ghc-tickets mailing list