@@ -2526,18 +2526,18 @@ public Test92Value() {
2526
2526
}
2527
2527
2528
2528
@ Test
2529
- @ IR (applyIf = {"UseArrayFlattening" , "true" },
2529
+ // TODO 8355382 The optimization only applies to null-free, flat arrays
2530
+ @ IR (applyIfAnd = {"UseArrayFlattening" , "true" , "UseNullableValueFlattening" , "false" },
2530
2531
counts = {CLASS_CHECK_TRAP , "= 2" },
2531
2532
failOn = {LOAD_UNKNOWN_INLINE , ALLOC_G , MEMBAR })
2532
2533
public Object test92 (Object [] array ) {
2533
2534
// Dummy loops to ensure we run enough passes of split if
2534
2535
for (int i = 0 ; i < 2 ; i ++) {
2535
2536
for (int j = 0 ; j < 2 ; j ++) {
2536
- for (int k = 0 ; k < 2 ; k ++) {
2537
- }
2537
+ for (int k = 0 ; k < 2 ; k ++) {
2538
+ }
2538
2539
}
2539
2540
}
2540
-
2541
2541
return (NonValueClass )array [0 ];
2542
2542
}
2543
2543
@@ -2561,8 +2561,7 @@ public Object test93(Object[] array) {
2561
2561
}
2562
2562
}
2563
2563
2564
- Object v = (NonValueClass )array [0 ];
2565
- return v ;
2564
+ return (NonValueClass )array [0 ];
2566
2565
}
2567
2566
2568
2567
@ Run (test = "test93" )
@@ -2595,7 +2594,8 @@ public void test93_verifier(RunInfo info) {
2595
2594
}
2596
2595
2597
2596
@ Test
2598
- @ IR (applyIf = {"UseArrayFlattening" , "true" },
2597
+ // TODO 8355382 The optimization only applies to null-free, flat arrays
2598
+ @ IR (applyIfAnd = {"UseArrayFlattening" , "true" , "UseNullableValueFlattening" , "false" },
2599
2599
counts = {CLASS_CHECK_TRAP , "= 2" , LOOP , "= 1" },
2600
2600
failOn = {LOAD_UNKNOWN_INLINE , ALLOC_G , MEMBAR })
2601
2601
public int test94 (Object [] array ) {
0 commit comments