summaryrefslogtreecommitdiffstats
path: root/test/443-not-bool-inline
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-01-21 15:44:16 +0000
committerNicolas Geoffray <ngeoffray@google.com>2015-01-21 17:03:29 +0000
commitfa93b504b324784dd9a96e28e6e8f3f1b1ac456a (patch)
tree8a3e691268657db75a69c8d644e5a963abee66d6 /test/443-not-bool-inline
parent1147eeed2ffc82ac9b1405f9fb0a6cbc8560c42b (diff)
downloadart-fa93b504b324784dd9a96e28e6e8f3f1b1ac456a.zip
art-fa93b504b324784dd9a96e28e6e8f3f1b1ac456a.tar.gz
art-fa93b504b324784dd9a96e28e6e8f3f1b1ac456a.tar.bz2
Do not use HNot for creating !bool.
HNot folds to ~, not !. Change-Id: I681f968449a2ade7110b2f316146ad16ba5da74c
Diffstat (limited to 'test/443-not-bool-inline')
-rw-r--r--test/443-not-bool-inline/expected.txt1
-rw-r--r--test/443-not-bool-inline/info.txt2
-rw-r--r--test/443-not-bool-inline/src/Main.java31
3 files changed, 34 insertions, 0 deletions
diff --git a/test/443-not-bool-inline/expected.txt b/test/443-not-bool-inline/expected.txt
new file mode 100644
index 0000000..3ee3849
--- /dev/null
+++ b/test/443-not-bool-inline/expected.txt
@@ -0,0 +1 @@
+Hello World 2
diff --git a/test/443-not-bool-inline/info.txt b/test/443-not-bool-inline/info.txt
new file mode 100644
index 0000000..31f2321
--- /dev/null
+++ b/test/443-not-bool-inline/info.txt
@@ -0,0 +1,2 @@
+Regression test for optimizing, who used a wrong instruction
+for simplifying Equals(foo, false);
diff --git a/test/443-not-bool-inline/src/Main.java b/test/443-not-bool-inline/src/Main.java
new file mode 100644
index 0000000..3a6f3be
--- /dev/null
+++ b/test/443-not-bool-inline/src/Main.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class Main {
+ public static void main(String[] args) {
+ // For some reason, dx wants != for generating if-eq.
+ if (falseField != false) {
+ System.out.println("Hello World 1");
+ }
+
+ if (trueField != false) {
+ System.out.println("Hello World 2");
+ }
+ }
+
+ static boolean falseField = false;
+ static boolean trueField = true;
+}