File tree 2 files changed +24
-5
lines changed
test/hotspot/jtreg/compiler/c2
2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -2439,9 +2439,8 @@ Node* CreateExNode::Identity(PhaseGVN* phase) {
2439
2439
// exception oop through.
2440
2440
CallNode *call = in (1 )->in (0 )->as_Call ();
2441
2441
2442
- return ( in (0 )->is_CatchProj () && in (0 )->in (0 )->in (1 ) == in (1 ) )
2443
- ? this
2444
- : call->in (TypeFunc::Parms);
2442
+ return (in (0 )->is_CatchProj () && in (0 )->in (0 )->is_Catch () &&
2443
+ in (0 )->in (0 )->in (1 ) == in (1 )) ? this : call->in (TypeFunc::Parms);
2445
2444
}
2446
2445
2447
2446
// =============================================================================
Original file line number Diff line number Diff line change 23
23
24
24
/*
25
25
* @test
26
- * @bug 8284358
26
+ * @bug 8284358 8296912
27
27
* @summary An unreachable loop is not removed, leading to a broken graph.
28
28
* @requires vm.compiler2.enabled
29
29
* @run main/othervm -Xcomp -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions
30
- * -XX:CompileCommand=compileonly,*TestDeadDataLoop::test* -XX:CompileCommand=dontinline,*TestDeadDataLoop::notInlined
30
+ * -XX:CompileCommand=compileonly,*TestDeadDataLoop::test* -XX:CompileCommand=dontinline,*TestDeadDataLoop::notInlined*
31
31
* compiler.c2.TestDeadDataLoop
32
32
*/
33
33
@@ -210,10 +210,29 @@ static void test10() {
210
210
}
211
211
}
212
212
213
+ static long l ;
214
+
215
+ static void test11 (boolean never ) {
216
+ float f = 1 ;
217
+ boolean b ;
218
+ for (int i = 0 ; i < 5 ; ++i ) {
219
+ b = (never || l < 0 );
220
+ l = notInlined2 ();
221
+ if (!never ) {
222
+ f += i ;
223
+ }
224
+ }
225
+ l += f ;
226
+ }
227
+
213
228
public static boolean notInlined () {
214
229
return false ;
215
230
}
216
231
232
+ public static int notInlined2 () {
233
+ return 42 ;
234
+ }
235
+
217
236
public static void main (String [] args ) {
218
237
// Make sure classes are initialized
219
238
Integer i = 42 ;
@@ -228,6 +247,7 @@ public static void main(String[] args) {
228
247
test8 ();
229
248
test9 ();
230
249
test10 ();
250
+ test11 (false );
231
251
}
232
252
}
233
253
You can’t perform that action at this time.
0 commit comments