[GHC] #6135: Unboxed Booleans
GHC
ghc-devs at haskell.org
Sun Jun 16 08:37:06 CEST 2013
#6135: Unboxed Booleans
-------------------------------+--------------------------------------------
Reporter: benl | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.4.1
Resolution: | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related: #605
-------------------------------+--------------------------------------------
Comment(by simonmar):
Replying to [comment:69 simonpj]:
>
> One thing I'm puzzled about is this. If `>#` yields an `Int#`, how does
that `Int#` get into a register?
If we branch directly on the result of the comparison, then the
intermediate `Int#` is never manifested, the code generator just generates
a conditional branch instruction. The optimisations in `CmmSink` try to
ensure that the comparison is pushed into the `CmmCondBranch` so the code
generator can spot it.
If the `Int#` value is really used (as in the example with logical ops on
the wiki page), then on x86 there are instructions to generate it (e.g.
`sete`, `setge`, etc.).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6135#comment:75>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list