[GHC] #6135: Unboxed Booleans
GHC
ghc-devs at haskell.org
Thu Oct 2 21:31:26 UTC 2014
#6135: Unboxed Booleans
-------------------------------------+-------------------------------------
Reporter: benl | Owner:
Type: feature | Status: new
request | Milestone: 7.8.1
Priority: normal | Version: 7.4.1
Component: Compiler | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Unknown
Unknown/Multiple | Blocked By: 8103, 8103
Type of failure: | Related Tickets: #605
None/Unknown |
Test Case: |
primops/should_run/T6135 |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Changes (by dfeuer):
* owner: jstolarek =>
* status: closed => new
* resolution: fixed =>
Comment:
It appears that this works as intended for `<#`, `>#`, `<=#`, and `>=#`,
but not for `==#`. If I write something like
{{{#!hs
foo x = tagToEnum# ((x <# 3#) `orI#` (x ># 100#) `orI#`
(x ==# 12#) `orI#` (x ==# 15#))
}}}
I get (in 7.8.3) Core doing something like
{{{#!hs
foo x = case x of
12# -> True
15# -> True
_ -> tagToEnum# ((x <# 3#) `orI#` (x ># 100#))
}}}
(with different syntax, or course) and branching assembly to match. If
this transformation is important in some other context, it would be great
to have something that acts just like `==#` but that doesn't do that, for
the times when we actually don't want it.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6135#comment:93>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list