[GHC] #7116: Missing optimisation: strength reduction of floating-point multiplication

GHC ghc-devs at haskell.org
Fri Jul 12 15:42:27 CEST 2013


#7116: Missing optimisation: strength reduction of floating-point multiplication
--------------------------------------------+------------------------------
        Reporter:  simonmar                 |            Owner:  pcapriotti
            Type:  bug                      |           Status:  new
        Priority:  normal                   |        Milestone:  7.8.1
       Component:  Compiler                 |          Version:  7.4.2
      Resolution:                           |         Keywords:
Operating System:  Unknown/Multiple         |     Architecture:
 Type of failure:  Runtime performance bug  |  Unknown/Multiple
       Test Case:                           |       Difficulty:  Unknown
        Blocking:                           |       Blocked By:
                                            |  Related Tickets:
--------------------------------------------+------------------------------

Comment (by jstolarek):

 Provded patch rewrites 2 * x for Int and Word to x + x, which kills the
 optimisation done at the later stage of the pipeline in !CmmOpt: turning
 multiplications and divisons by powers of two into shifts. I wonder if it
 makes sense to move mentioned Cmm optimisation to !PrelRules, so that
 shifts are introduced at the Core level. Having all similar optimisations
 done in one place would be more consistent. Or am I missing something?

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



More information about the ghc-tickets mailing list