[GHC] #3034: divInt# floated into a position which leads to low
arity
GHC
trac at galois.com
Wed Feb 18 16:14:49 EST 2009
#3034: divInt# floated into a position which leads to low arity
--------------------------------------+-------------------------------------
Reporter: batterseapower | Owner:
Type: run-time performance bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.1
Severity: normal | Resolution:
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
--------------------------------------+-------------------------------------
Comment (by twhitehead):
For some reason, using quot instead of div produces the desired code.
This is despite quotInt# not being cheap according to ghci 6.10.1
Prelude> PrimOp.primOpIsCheap PrimOp.IntQuotOp
False
Maybe it has something to do with there being a primitive IntQuotOp but
not a corresponding IntDivOp (tidy core gives GHC.Prim.quotInt# versus
GHC.Base.divInt#)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3034#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list