jdk-24/test/hotspot/jtreg/compiler/codegen
Roberto Castañeda Lozano 4e8338eb13 8255763: C2: OSR miscompilation caused by invalid memory instruction placement
Disable GCM hoisting of memory-writing nodes for irreducible CFGs. This prevents
GCM from wrongly "hoisting" stores into descendants of their original loop. Such
an "inverted hoisting" can happen due to CFGLoop::compute_freq()'s inaccurate
estimation of frequencies for irreducible CFGs.

Extend CFG verification code by checking that memory-writing nodes are placed in
either their original loop or an ancestor.

Add tests for the reducible and irreducible cases. The former was already
handled correctly before the change (the frequency estimation model prevents
"inverted hoisting" for reducible CFGs), and is just added for coverage.

This change addresses the specific miscompilation issue in a conservative way,
for simplicity and safety. Future work includes investigating if only the
illegal blocks can be discarded as candidates for GCM hoisting, and refining
frequency estimation for irreducible CFGs.

Reviewed-by: kvn, chagedorn
2020-12-21 13:04:24 +00:00
..
aes 8243935: remove copying of s.h.WB$WhiteBoxPermission in hotspot tests 2020-04-28 19:57:02 -07:00
BadLogicCode.java 8219139: move hotspot tests from test/jdk/vm 2019-03-14 19:37:17 -07:00
BitTests.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
BMI1.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
C1NullCheckOfNullStore.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
CRCTest.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
IntRotateWithImmediate.java 8244614: cleanup keywords used/available in hotspot testbase 2020-06-08 21:27:22 -07:00
LoadWithMask2.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
LoadWithMask.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
ShiftTest.java 8219139: move hotspot tests from test/jdk/vm 2019-03-14 19:37:17 -07:00
Test6378821.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
Test6431242.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
Test6797305.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
Test6814842.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
Test6823354.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
Test6875866.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
Test6879902.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
Test6896617.java 8249678: @ignore should be used instead of ProblemList for 8158860, 8163894, 8193479, 8194310 2020-07-17 11:54:14 -07:00
Test6909839.java 8199777: Deprecate -XX:+AggressiveOpts 2018-03-22 08:39:51 +01:00
Test6935535.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
Test6942326.java 8204168: Increase small heap sizes in tests to accommodate ZGC 2018-06-05 15:56:21 +02:00
Test7009231.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
Test7100757.java 8242310: use reproducible random in hotspot compiler tests 2020-04-08 22:58:42 -07:00
Test8005033.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
Test8011901.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestBooleanVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestByteDoubleVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestByteFloatVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestByteIntVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestByteLongVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestByteShortVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestByteVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestCharShortVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestCharVect2.java 8258647: TestCharVect2 is very slow 2020-12-17 22:43:00 +00:00
TestCharVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestDoubleVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestFloatDoubleVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestFloatVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestGCMStorePlacement.java 8255763: C2: OSR miscompilation caused by invalid memory instruction placement 2020-12-21 13:04:24 +00:00
TestIntDoubleVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestIntFloatVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestIntLongVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestIntVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestLongDoubleVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestLongFloatVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestLongVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestMultiMemInstructionMatching.java 8240905: assert(mem == (Node*)1 || mem == mem2) failed: multiple Memories being matched at once? 2020-03-24 17:39:52 +01:00
TestOopCmp.java 8244224: Implementation of JEP 381: Remove the Solaris and SPARC Ports 2020-05-20 17:33:37 -07:00
TestShortDoubleVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestShortFloatVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestShortIntVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestShortLongVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestShortVect.java 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TestSignedMultiplyLong.java 8232591: AArch64: Add missing match rules for smaddl, smsubl and smnegl 2019-10-30 09:17:36 +08:00
TestTrichotomyExpressions.java 8242310: use reproducible random in hotspot compiler tests 2020-04-08 22:58:42 -07:00