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

#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

#9435: x86 sse4.2 popCnt16# needs to zero-extend its result -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 (NCG) | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Incorrect | Related Tickets: result at runtime | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by rwbarton): `popCnt8#` is affected too, but (possibly by luck, possibly not) we reuse the source register as the destination register and we needed to zero- extend the source anyways as there is no 8-bit `popcnt` instruction. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9435#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9435: x86 sse4.2 popCnt16# needs to zero-extend its result -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 (NCG) | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Incorrect | Related Tickets: result at runtime | Test Case: | Blocking: | Differential Revisions: Phab:D147 | -------------------------------------+------------------------------------- Changes (by rwbarton): * differential: => Phab:D147 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9435#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9435: x86 sse4.2 popCnt16# needs to zero-extend its result
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.9
(NCG) | Keywords:
Resolution: | Architecture: x86_64 (amd64)
Operating System: | Difficulty: Unknown
Unknown/Multiple | Blocked By:
Type of failure: Incorrect | Related Tickets:
result at runtime |
Test Case: |
Blocking: |
Differential Revisions: Phab:D147 |
-------------------------------------+-------------------------------------
Comment (by Reid Barton

#9435: x86 sse4.2 popCnt16# needs to zero-extend its result -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 7.9 (NCG) | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Incorrect | Related Tickets: result at runtime | Test Case: | Blocking: | Differential Revisions: Phab:D147 | -------------------------------------+------------------------------------- Changes (by rwbarton): * status: new => merge Comment: Marking as "merge" per hvr's suggestion. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9435#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9435: x86 sse4.2 popCnt16# needs to zero-extend its result -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.4 Component: Compiler | Version: 7.9 (NCG) | Keywords: Resolution: fixed | Architecture: x86_64 (amd64) Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Incorrect | Related Tickets: result at runtime | Test Case: | Blocking: | Differential Revisions: Phab:D147 | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed * milestone: => 7.8.4 Comment: Merged to 7.8.4. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9435#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC