[GHC] #10676: silly assembly for comparing the result of comparisons that return Int# against 0#
GHC
ghc-devs at haskell.org
Fri Jul 24 17:42:40 UTC 2015
#10676: silly assembly for comparing the result of comparisons that return Int#
against 0#
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1
(CodeGen) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: x86_64
Type of failure: Runtime | (amd64)
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by rwbarton):
Yes, I think so. But there is a problem besides the fact that the heap
check is duplicated. Referring to the Cmm listing in #8326, something
seems to think that `_sEV` (the 0#-or-1# result of the primop) is live in
the alternatives, even to the point of passing it through the GC, when
really it will never be used after the branch. I think that's the reason
that later passes are unable to avoid this ugly
`cmp/setCC/movzbl/test/jne` sequence. Otherwise the definition of `_sEV`
would be inlined at its only use site, the branch, and the code generator
would then generate a nice `cmp/jCC` sequence.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10676#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list