#5615: ghc produces poor code for `div` with constant powers of 2.
---------------------------------+------------------------------------------
    Reporter:  Lennart           |       Owner:              
        Type:  bug               |      Status:  new         
    Priority:  normal            |   Component:  Compiler    
     Version:  7.2.1             |    Keywords:              
    Testcase:                    |   Blockedby:              
          Os:  Unknown/Multiple  |    Blocking:              
Architecture:  x86               |     Failure:  None/Unknown
---------------------------------+------------------------------------------
 The code for Int {{{(div x c)}}} where {{{c}}} is a constant of the form
 2^n^ should be implemented with an arithmetic right shift, currently it's
 a call to a function.  This optimization should be done for all signed
 types.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to