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
Tue Jun 24 16:30:28 UTC 2025


On Wed, 18 Jun 2025 04:03:59 GMT, Jasmine Karthikeyan <jkarthikeyan at openjdk.org> wrote:

>> And just for good measure: should we also add tests for `char`?
>
> @eme64 I've updated the patch to address the comments, let me know what you think!
> 
> @mur47x111 Thanks for the comment! I've merged from master.

@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`

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

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


More information about the hotspot-compiler-dev mailing list