Skip to content

Commit ed2a03e

Browse files
dafedafeTobiHartmann
authored andcommitted
8353182: [lworld] C2: Multiple IR test failures in compiler/gcbarriers/TestZGCBarrierElision.java after JDK-8351569
Reviewed-by: thartmann
1 parent bdfe15a commit ed2a03e

File tree

1 file changed

+13
-24
lines changed

1 file changed

+13
-24
lines changed

test/hotspot/jtreg/compiler/gcbarriers/TestZGCBarrierElision.java

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ void runControlFlowTests() {
187187
}
188188

189189
@Test
190-
// TODO: 8353182
191-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
190+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
192191
static void testAllocateThenAtomic(Inner i) {
193192
Outer o = new Outer();
194193
Common.blackhole(o);
@@ -197,42 +196,37 @@ static void testAllocateThenAtomic(Inner i) {
197196

198197
@Test
199198
@IR(counts = { IRNode.Z_LOAD_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
200-
// TODO: 8353182
201-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
199+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
202200
static void testLoadThenAtomic(Outer o, Inner i) {
203201
Common.blackhole(o.field1);
204202
Common.field1VarHandle.getAndSet(o, i);
205203
}
206204

207205
@Test
208-
// TODO: 8353182
209-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.REMAINING, "2" }, phase = CompilePhase.FINAL_CODE)
206+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.REMAINING, "2" }, phase = CompilePhase.FINAL_CODE)
210207
static void testAtomicThenAtomicAnotherField(Outer o, Inner i) {
211208
Common.field1VarHandle.getAndSet(o, i);
212209
Common.field2VarHandle.getAndSet(o, i);
213210
}
214211

215212
@Test
216-
// TODO: 8353182
217-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
213+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
218214
static void testAllocateArrayThenAtomicAtKnownIndex(Outer o) {
219215
Outer[] a = new Outer[42];
220216
Common.blackhole(a);
221217
Common.outerArrayVarHandle.getAndSet(a, 2, o);
222218
}
223219

224220
@Test
225-
// TODO: 8353182
226-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
221+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
227222
static void testAllocateArrayThenAtomicAtUnknownIndex(Outer o, int index) {
228223
Outer[] a = new Outer[42];
229224
Common.blackhole(a);
230225
Common.outerArrayVarHandle.getAndSet(a, index, o);
231226
}
232227

233228
@Test
234-
// TODO: 8353182
235-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.REMAINING, "2" }, phase = CompilePhase.FINAL_CODE)
229+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.REMAINING, "2" }, phase = CompilePhase.FINAL_CODE)
236230
static void testArrayAtomicThenAtomicAtUnknownIndices(Outer[] a, Outer o, int index1, int index2) {
237231
Common.outerArrayVarHandle.getAndSet(a, index1, o);
238232
Common.outerArrayVarHandle.getAndSet(a, index2, o);
@@ -393,44 +387,39 @@ void runControlFlowTests() {
393387

394388
@Test
395389
@IR(counts = { IRNode.Z_STORE_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
396-
// TODO: 8353182
397-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.ELIDED, "1" }, phase = CompilePhase.FINAL_CODE)
390+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.ELIDED, "1" }, phase = CompilePhase.FINAL_CODE)
398391
static void testStoreThenAtomic(Outer o, Inner i) {
399392
o.field1 = i;
400393
Common.field1VarHandle.getAndSet(o, i);
401394
}
402395

403396
@Test
404-
// TODO: 8353182
405-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
397+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
406398
@IR(counts = { IRNode.Z_LOAD_P_WITH_BARRIER_FLAG, Common.ELIDED, "1" }, phase = CompilePhase.FINAL_CODE)
407399
static void testAtomicThenLoad(Outer o, Inner i) {
408400
Common.field1VarHandle.getAndSet(o, i);
409401
Common.blackhole(o.field1);
410402
}
411403

412404
@Test
413-
// TODO: 8353182
414-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
405+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
415406
@IR(counts = { IRNode.Z_STORE_P_WITH_BARRIER_FLAG, Common.ELIDED, "1" }, phase = CompilePhase.FINAL_CODE)
416407
static void testAtomicThenStore(Outer o, Inner i) {
417408
Common.field1VarHandle.getAndSet(o, i);
418409
o.field1 = i;
419410
}
420411

421412
@Test
422-
// TODO: 8353182
423-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
424-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.ELIDED, "1" }, phase = CompilePhase.FINAL_CODE)
413+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
414+
//@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.ELIDED, "1" }, phase = CompilePhase.FINAL_CODE)
425415
static void testAtomicThenAtomic(Outer o, Inner i) {
426416
Common.field1VarHandle.getAndSet(o, i);
427417
Common.field1VarHandle.getAndSet(o, i);
428418
}
429419

430420
@Test
431-
// TODO: 8353182
432-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
433-
//@IR(counts = { IRNode.Z_GET_AND_SET_P_WITH_BARRIER_FLAG, Common.ELIDED, "1" }, phase = CompilePhase.FINAL_CODE)
421+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.REMAINING, "1" }, phase = CompilePhase.FINAL_CODE)
422+
@IR(counts = { IRNode.Z_COMPARE_AND_SWAP_P_WITH_BARRIER_FLAG, Common.ELIDED, "1" }, phase = CompilePhase.FINAL_CODE)
434423
static void testArrayAtomicThenAtomic(Outer[] a, Outer o) {
435424
Common.outerArrayVarHandle.getAndSet(a, 0, o);
436425
Common.outerArrayVarHandle.getAndSet(a, 0, o);

0 commit comments

Comments
 (0)