[GHC] #14282: tagToEnum# . dataToTag# not optimized away
GHC
ghc-devs at haskell.org
Wed Sep 27 04:54:25 UTC 2017
#14282: tagToEnum# . dataToTag# not optimized away
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.4.1
Component: Compiler | Version: 8.2.1
Keywords: datacon-tags | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Consider
{{{#!hs
foo :: Int# -> Int#
foo x = dataToTag# (tagToEnum# x :: Bool)
bar :: Bool -> Bool
bar x = tagToEnum# (dataToTag# x)
}}}
These are both effectively identity functions. But while `foo` simplifies
to one, `bar` does not! We might want to fix that.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14282>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list