RFR: 8351844: C2 x64 AVX2 vpminmax assertion failure with equivalent inputs

Emanuel Peter epeter at openjdk.org
Wed Dec 10 11:56:22 UTC 2025


On Wed, 3 Dec 2025 11:12:01 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Bug fix PR fixes an incorrect register equivalence in macro assembler. MaxV/MinV IR with equivalent inputs should ideally be removed from ideal graph before reaching to macro assembler. [JDK-8372797](https://bugs.openjdk.org/browse/JDK-8372797) is filed to add relevant identity transformations.
>> 
>> Best Regards,
>> Jatin
>
> test/hotspot/jtreg/compiler/vectorapi/TestVectorMinMaxSameInputs.java line 44:
> 
>> 42: 
>> 43:     public static void main(String[] args) {
>> 44:         TestFramework.runWithFlags("--add-modules=jdk.incubator.vector", "-ea", "-XX:+IgnoreUnrecognizedVMOptions", "-XX:UseAVX=2");
> 
> I understand `-XX:UseAVX=2` is here to hit the path where the assert is on. But for a generic test like this, it would seem unwise to limit the test configuration only to AVX=2. I would expect we instead run the tests with `TEST_VM_OPTS=-XX:UseAVX=2` to confirm they work with AVX=2 even on AVX-512 machines.

You could always have 2 runs, if AVX2 is super important for reproducing. One with and one without the flag.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28600#discussion_r2606366103


More information about the hotspot-compiler-dev mailing list