diff options
| author | 2017-02-06 15:58:39 +0000 | |
|---|---|---|
| committer | 2017-02-06 15:58:40 +0000 | |
| commit | 23d953942fe54bccbb3378af44aee6cd5ee6deaa (patch) | |
| tree | 72b06560d025a5dfa0efdd3d539ac81169069ea3 | |
| parent | df04fda5638aa1fb9956808f1cd497b49f62088e (diff) | |
| parent | d83280bfda094e8b6ac441b145398d11273d36d2 (diff) | |
Merge "Fix test after inlining optimization."
| -rw-r--r-- | test/482-checker-loop-back-edge-use/src/Main.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/482-checker-loop-back-edge-use/src/Main.java b/test/482-checker-loop-back-edge-use/src/Main.java index 65dfd411fd..86977d1b8e 100644 --- a/test/482-checker-loop-back-edge-use/src/Main.java +++ b/test/482-checker-loop-back-edge-use/src/Main.java @@ -164,6 +164,12 @@ public class Main { } } + + static boolean $opt$noinline$ensureSideEffects() { + if (doThrow) throw new Error(""); + return true; + } + /// CHECK-START: void Main.loop9() liveness (after) /// CHECK: <<Arg:z\d+>> StaticFieldGet liveness:<<ArgLiv:\d+>> ranges:{[<<ArgLiv>>,<<ArgLoopUse:\d+>>)} uses:[<<ArgUse:\d+>>,<<ArgLoopUse>>] /// CHECK: If [<<Arg>>] liveness:<<IfLiv:\d+>> @@ -178,7 +184,7 @@ public class Main { // Add some code at entry to avoid having the entry block be a pre header. // This avoids having to create a synthesized block. System.out.println("Enter"); - while (Runtime.getRuntime() != null) { + while ($opt$noinline$ensureSideEffects()) { // 'incoming' must only have a use in the inner loop. boolean incoming = field; while (incoming) {} @@ -189,4 +195,5 @@ public class Main { } static boolean field; + static boolean doThrow = false; } |