RFR: 8350177: C2 SuperWord: Integer.numberOfLeadingZeros, numberOfTrailingZeros, reverse and bitCount have input types wrongly turncated for byte and short

Emanuel Peter epeter at openjdk.org
Thu Jun 26 05:56:33 UTC 2025


On Wed, 25 Jun 2025 06:00:40 GMT, Jasmine Karthikeyan <jkarthikeyan at openjdk.org> wrote:

>> @jaskarth I just checked the results, and there is a series of failing tests.
>> 
>> ------------------------
>> `compiler/c2/Test6958485.java`
>> 
>> Flags: `-server -Xcomp` or `-XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0`.
>> 
>> `#  assert(false) failed: Unexpected node in SuperWord truncation: Conv2B`
>> 
>> --------------------------
>> 
>> `compiler/intrinsics/TestDoubleIsInfinite.java` -> D
>> `compiler/intrinsics/TestFloatIsInfinite.java` -> F
>> 
>> Flags: `-XX:UseAVX=3` or `-XX:-TieredCompilation -XX:+StressReflectiveCode -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing -XX:-ReduceFieldZeroing` ... not sure if any are necessary actually.
>> 
>> `#  assert(false) failed: Unexpected node in SuperWord truncation: IsInfiniteD`
>> and
>> `#  assert(false) failed: Unexpected node in SuperWord truncation: IsInfiniteF`
>> 
>> -----------------------------
>> 
>> `jdk/incubator/vector/Byte128VectorTests.java` (same issue with all related vector tests, just reporting one here)
>> 
>> Flag: `-XX:UseAVX=2`
>> 
>> `#  assert(false) failed: Unexpected node in SuperWord truncation: AddReductionVI`
>
> @eme64 Thanks for the test results! I've added these nodes to the non-truncating list, as well as the other reduction nodes that showed up when running the vector tests.

@jaskarth the tests look better now. I still saw this failure:

`jdk/incubator/vector/Byte64VectorTests.java`

Flags: `-XX:UseAVX=3 -XX:+UnlockDiagnosticVMOptions -XX:+UseKNLSetting` or `-XX:UseAVX=0` or `-XX:UseAVX=2` ... probably no flags are actually required.

`#  assert(false) failed: Unexpected node in SuperWord truncation: ExtractB`

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

PR Comment: https://git.openjdk.org/jdk/pull/25440#issuecomment-3007166988


More information about the hotspot-compiler-dev mailing list