#5615: ghc produces poor code for `div` with constant powers of 2.
-------------------------+--------------------------------------------------
    Reporter:  Lennart   |       Owner:  daniel.is.fischer
        Type:  bug       |      Status:  new              
    Priority:  normal    |   Milestone:  7.6.1            
   Component:  Compiler  |     Version:  7.2.1            
    Keywords:            |          Os:  Unknown/Multiple 
Architecture:  x86       |     Failure:  None/Unknown     
  Difficulty:  Unknown   |    Testcase:                   
   Blockedby:            |    Blocking:                   
     Related:            |  
-------------------------+--------------------------------------------------

Comment(by simonmar):

 I think I was hoping that we'd be able to do it without a built-in rule,
 since the backends already turn constant divisions into shifts (and LLVM
 probably has a range of more sophisticated translations).  If only
 `divInt#` was inlined, it would just work.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5615#comment:8>
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