summaryrefslogtreecommitdiffstats
path: root/test/458-checker-instruction-simplification
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2015-04-24 15:53:25 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-24 15:53:25 +0000
commit7bf9bc7854f5c8ccc2cb2ef4be4f728c5fbd3236 (patch)
treef4a4caeb5c0682b15e68b4f47020ea0239987cb9 /test/458-checker-instruction-simplification
parentf16d7b3824b2777b95fb509c1d2a95bef89f65a4 (diff)
parentb2a58477e14e1b15cb9848d16015a49a854ee32c (diff)
downloadart-7bf9bc7854f5c8ccc2cb2ef4be4f728c5fbd3236.tar.gz
art-7bf9bc7854f5c8ccc2cb2ef4be4f728c5fbd3236.tar.bz2
art-7bf9bc7854f5c8ccc2cb2ef4be4f728c5fbd3236.zip
Merge "Minor improvements to 458-checker-instruction-simplification."
Diffstat (limited to 'test/458-checker-instruction-simplification')
-rw-r--r--test/458-checker-instruction-simplification/src/Main.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/458-checker-instruction-simplification/src/Main.java b/test/458-checker-instruction-simplification/src/Main.java
index 65be6cb4c4..f0578ef1ea 100644
--- a/test/458-checker-instruction-simplification/src/Main.java
+++ b/test/458-checker-instruction-simplification/src/Main.java
@@ -374,6 +374,15 @@ public class Main {
// CHECK-DAG: [[Or:i\d+]] Or [ [[Add1]] [[Add2]] ]
// CHECK-DAG: Return [ [[Or]] ]
+ // CHECK-START: int Main.AddNegs2(int, int) GVN (after)
+ // CHECK-DAG: [[Arg1:i\d+]] ParameterValue
+ // CHECK-DAG: [[Arg2:i\d+]] ParameterValue
+ // CHECK-DAG: [[Neg1:i\d+]] Neg [ [[Arg1]] ]
+ // CHECK-DAG: [[Neg2:i\d+]] Neg [ [[Arg2]] ]
+ // CHECK-DAG: [[Add:i\d+]] Add [ [[Neg1]] [[Neg2]] ]
+ // CHECK-DAG: [[Or:i\d+]] Or [ [[Add]] [[Add]] ]
+ // CHECK-DAG: Return [ [[Or]] ]
+
public static int AddNegs2(int arg1, int arg2) {
int temp1 = -arg1;
int temp2 = -arg2;
@@ -530,6 +539,12 @@ public class Main {
// CHECK-NOT: Neg
// CHECK-NOT: Add
+ // CHECK-START: int Main.NegNeg2(int) constant_folding_after_inlining (after)
+ // CHECK: [[Const0:i\d+]] IntConstant 0
+ // CHECK-NOT: Neg
+ // CHECK-NOT: Add
+ // CHECK: Return [ [[Const0]] ]
+
public static int NegNeg2(int arg) {
int temp = -arg;
return temp + -temp;