#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: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: x86 | Failure: None/Unknown
---------------------------------+------------------------------------------
Changes (by igloo):
* milestone: => 7.6.1
Comment:
Other than the unpleasant solution of adding rules for
{{{
x `div` 2
x `div` 4
x `div` 8
...
x `div` 9223372036854775808
}}}
I think we would need a rule in `prelude/PrelRules.lhs` to do this. But I
think this would get us back to the problem of needing to get an `Id` for
`unsafeShiftR` from somewhere.
Would we be better off moving rule application to a different point in the
compiler, when we are in a `MonadThings` monad?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5615#comment:5>
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