RFR: 8342393: Promote commutative vector IR node sharing [v13]

Jatin Bhateja jbhateja at openjdk.org
Thu Jan 23 10:12:30 UTC 2025


On Thu, 23 Jan 2025 08:32:42 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Just got a gcc internal compiler error on `linux-x64-ri`:
>> 
>> .../open/src/hotspot/share/precompiled/precompiled.hpp:61:
>> .../open/src/hotspot/share/utilities/copy.hpp:362:2: internal compiler error: in gt_pch_save, at ggc-common.cc:674
>> [2025-01-22T12:48:11,911Z]   362 | };
>> [2025-01-22T12:48:11,911Z]       |  ^
>> [2025-01-22T12:48:12,841Z] 0x6e0432 gt_pch_save(_IO_FILE*)
>> [2025-01-22T12:48:12,841Z] 	/home/mikael/src/jdk/jdk/devkit/jdk/open/build/devkit/src/gcc-13.2.0/gcc/ggc-common.cc:674
>> [2025-01-22T12:48:12,867Z] 0x96b865 c_common_write_pch()
>> [2025-01-22T12:48:12,867Z] 	/home/mikael/src/jdk/jdk/devkit/jdk/open/build/devkit/src/gcc-13.2.0/gcc/c-family/c-pch.cc:175
>> [2025-01-22T12:48:12,885Z] 0x7b56e5 c_parse_final_cleanups()
>> [2025-01-22T12:48:12,885Z] 	/home/mikael/src/jdk/jdk/devkit/jdk/open/build/devkit/src/gcc-13.2.0/gcc/cp/decl2.cc:4940
>> [2025-01-22T12:48:12,885Z] 0x96b490 c_common_parse_file()
>> [2025-01-22T12:48:12,885Z] 	/home/mikael/src/jdk/jdk/devkit/jdk/open/build/devkit/src/gcc-13.2.0/gcc/c-family/c-opts.cc:1266
>> [2025-01-22T12:48:12,925Z] Please submit a full bug report, with preprocessed source (by using -freport-bug).
>> 
>> Ah, it was raised as https://bugs.openjdk.org/browse/JDK-8338470
>
> Hi @eme64 , Kindly share the result of your test runs.

> @jatin-bhateja I actually see failures in the `assert` code you added:
> 
> ```
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  Internal Error (.../src/hotspot/share/opto/vectornode.hpp:78), pid=2210207, tid=2210226
> #  Error: assert(req() == 3) failed
> #
> # JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-internal-LTS-2025-01-22-1232295.emanuel.peter.jdk-review)
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-internal-LTS-2025-01-22-1232295.emanuel.peter.jdk-review, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
> # Problematic frame:
> # V  [libjvm.so+0x9f7319]  VectorNode::hash() const+0x89
> ```
> 
> I see it with `-XX:UseAVX=3` on these tests: `jdk/incubator/vector/Float256VectorTests.java`
> 
> Let me know if you need more info to reproduce.
> 
> I see it on windows and linux. One machine has these cpu features:
> 
> `fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr.opt pdpe1gb rdtscp lm rep.good nopl cpuid extd.apicid tsc.known.freq pni pclmulqdq ssse3 fma cx16 pcid sse4.1 sse4.2 x2apic movbe popcnt tsc.deadline.timer aes xsave avx f16c rdrand hypervisor lahf.lm cmp.legacy svm cr8.legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr.core invpcid.single ssbd ibrs ibpb stibp vmmcall fsgsbase tsc.adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha.ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves nt.good avx512.bf16 clzero xsaveerptr wbnoinvd arat npt nrip.save avx512vbmi umip pku ospke avx512.vbmi2 gfni vaes vpclmulqdq avx512.vnni avx512.bitalg avx512.vpopcntdq la57 rdpid fsrm arch.capabilities`

Thanks @eme64 ,
My bad, a check to skip over predicated operation was missing. I have added a test point to cover this scenario.

Kindly verify.

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

PR Comment: https://git.openjdk.org/jdk/pull/22863#issuecomment-2609395371


More information about the hotspot-compiler-dev mailing list