summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-09 05:07:01 +0000
committerChris Lattner <sabre@nondot.org>2004-06-09 05:07:01 +0000
commit7ed7d82512e3629d8c0cd9cc04db4fdb993f969c (patch)
tree59f85fab3829c0fef88d3023a35587f145b83ac4
parente73febc64a32bc6fc00eb12a89cc066d0a2272f4 (diff)
downloadbcm5719-llvm-7ed7d82512e3629d8c0cd9cc04db4fdb993f969c.tar.gz
bcm5719-llvm-7ed7d82512e3629d8c0cd9cc04db4fdb993f969c.zip
New testcase that is important for the Java FE
llvm-svn: 14085
-rw-r--r--llvm/test/Regression/Transforms/InstCombine/JavaCompare.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/InstCombine/JavaCompare.ll b/llvm/test/Regression/Transforms/InstCombine/JavaCompare.ll
new file mode 100644
index 00000000000..30208f54993
--- /dev/null
+++ b/llvm/test/Regression/Transforms/InstCombine/JavaCompare.ll
@@ -0,0 +1,14 @@
+; This is the sequence of stuff that the Java front-end expands for a single
+; <= comparison. Check to make sure we turn it into a <= (only)
+
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v setle | not grep '#uses'
+
+bool %le(int %A, int %B) {
+ %c1 = setgt int %A, %B;
+ %tmp = select bool %c1, int 1, int 0;
+ %c2 = setlt int %A, %B;
+ %result = select bool %c2, int -1, int %tmp;
+ %c3 = setle int %result, 0;
+ ret bool %c3;
+}
+
OpenPOWER on IntegriCloud