[GHC] #9435: x86 sse4.2 popCnt16# needs to zero-extend its result

GHC ghc-devs at haskell.org
Tue Aug 12 13:12:08 UTC 2014


#9435: x86 sse4.2 popCnt16# needs to zero-extend its result
-------------------------------------+-------------------------------------
       Reporter:  rwbarton           |                   Owner:
           Type:  bug                |                  Status:  new
       Priority:  normal             |               Milestone:
      Component:  Compiler (NCG)     |                 Version:  7.9
       Keywords:                     |        Operating System:
   Architecture:  x86_64 (amd64)     |  Unknown/Multiple
     Difficulty:  Unknown            |         Type of failure:  Incorrect
     Blocked By:                     |  result at runtime
Related Tickets:                     |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 `make TEST=cgrun071 EXTRA_HC_OPTS=-msse42` fails for me in all the non-
 ghci non-llvm ways.

 For `popCnt16#` we emit `popcnt %ax,%ax` which doesn't clear the high 48
 bits of the result.

 Patch incoming.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9435>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list