[GHC] #7337: GHC does not generate great code for bit-level rotation
GHC
cvs-ghc at haskell.org
Tue Oct 16 20:38:47 CEST 2012
#7337: GHC does not generate great code for bit-level rotation
------------------------------+---------------------------------------------
Reporter: bos | Owner:
Type: feature request | Status: new
Priority: normal | Component: Compiler
Version: 7.6.1 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
I'm working on some hashing functions at the moment, and I notice that GHC
generates an {{{or}}} and a pair of shifts for a rotate. The LLVM back end
is smart enough to recover the code's intent via strength reduction and
emit a single {{{rot}}} instruction, but the regular code generator emits
three instructions.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7337>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list