summaryrefslogtreecommitdiff
path: root/test/474-checker-boolean-input/src
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2015-12-14 11:44:01 +0000
committer David Brazdil <dbrazdil@google.com> 2016-01-28 15:50:27 +0000
commit74eb1b264691c4eb399d0858015a7fc13c476ac6 (patch)
tree0b6fc4f3003d50bf6c388601013cdfc606e53859 /test/474-checker-boolean-input/src
parent75fd2a8ab9b4aff59308034da26eb4986d10fa9e (diff)
ART: Implement HSelect
This patch adds a new HIR instruction to Optimizing. HSelect returns one of two inputs based on the outcome of a condition. This is only initial implementation which: - defines the new instruction, - repurposes BooleanSimplifier to emit it, - extends InstructionSimplifier to statically resolve it, - updates existing code and tests accordingly. Code generators currently emit fallback if/then/else code and will be updated in follow-up CLs to use platform-specific conditional moves when possible. Change-Id: Ib61b17146487ebe6b55350c2b589f0b971dcaaee
Diffstat (limited to 'test/474-checker-boolean-input/src')
-rw-r--r--test/474-checker-boolean-input/src/Main.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/474-checker-boolean-input/src/Main.java b/test/474-checker-boolean-input/src/Main.java
index a2b219dd6d..fbc28d8d52 100644
--- a/test/474-checker-boolean-input/src/Main.java
+++ b/test/474-checker-boolean-input/src/Main.java
@@ -27,9 +27,9 @@ public class Main {
* we implement a suitable type analysis.
*/
- /// CHECK-START: boolean Main.TestPhiAsBoolean(int) boolean_simplifier (after)
+ /// CHECK-START: boolean Main.TestPhiAsBoolean(int) select_generator (after)
/// CHECK-DAG: <<Phi:i\d+>> Phi
- /// CHECK-DAG: BooleanNot [<<Phi>>]
+ /// CHECK-DAG: Select [{{i\d+}},{{i\d+}},<<Phi>>]
public static boolean f1;
public static boolean f2;
@@ -47,9 +47,9 @@ public class Main {
* we implement a suitable type analysis.
*/
- /// CHECK-START: boolean Main.TestAndAsBoolean(boolean, boolean) boolean_simplifier (after)
+ /// CHECK-START: boolean Main.TestAndAsBoolean(boolean, boolean) select_generator (after)
/// CHECK-DAG: <<And:i\d+>> And
- /// CHECK-DAG: BooleanNot [<<And>>]
+ /// CHECK-DAG: Select [{{i\d+}},{{i\d+}},<<And>>]
public static boolean InlineAnd(boolean x, boolean y) {
return x & y;
@@ -64,9 +64,9 @@ public class Main {
* we implement a suitable type analysis.
*/
- /// CHECK-START: boolean Main.TestOrAsBoolean(boolean, boolean) boolean_simplifier (after)
+ /// CHECK-START: boolean Main.TestOrAsBoolean(boolean, boolean) select_generator (after)
/// CHECK-DAG: <<Or:i\d+>> Or
- /// CHECK-DAG: BooleanNot [<<Or>>]
+ /// CHECK-DAG: Select [{{i\d+}},{{i\d+}},<<Or>>]
public static boolean InlineOr(boolean x, boolean y) {
return x | y;
@@ -81,9 +81,9 @@ public class Main {
* we implement a suitable type analysis.
*/
- /// CHECK-START: boolean Main.TestXorAsBoolean(boolean, boolean) boolean_simplifier (after)
+ /// CHECK-START: boolean Main.TestXorAsBoolean(boolean, boolean) select_generator (after)
/// CHECK-DAG: <<Xor:i\d+>> Xor
- /// CHECK-DAG: BooleanNot [<<Xor>>]
+ /// CHECK-DAG: Select [{{i\d+}},{{i\d+}},<<Xor>>]
public static boolean InlineXor(boolean x, boolean y) {
return x ^ y;