RFR: 8318509: x86 count_positives intrinsic broken for -XX:AVX3Threshold=0 [v3]

Claes Redestad redestad at openjdk.org
Tue Oct 24 09:36:07 UTC 2023


> The AVX-512 implementation of count_positives is broken when there are negative values in the tail block, since the len register is repurposed to then re-read as-if it still contained the original value. 
> 
> Proposed fix is to restore len from the value in tmp1, which at this point holds the count of bytes in the tail. 
> 
> Existing TestCountPositives test is pretty exhaustive and just needs to be run explicitly with AVX3Threshold=0 enabled.

Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:

  Simplify test_hasNegatives

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/16267/files
  - new: https://git.openjdk.org/jdk/pull/16267/files/290d01d6..adc426fc

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16267&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16267&range=01-02

  Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/16267.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16267/head:pull/16267

PR: https://git.openjdk.org/jdk/pull/16267


More information about the hotspot-compiler-dev mailing list