summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-03 01:45:32 +0000
committerChris Lattner <sabre@nondot.org>2007-04-03 01:45:32 +0000
commitd4594adf43392c07232b1bd62a890177b6ff2cef (patch)
treeec072bad3901ad8ff039558232c3e7cd926b6a9c /llvm/test/Transforms
parent6b3ff17c7040f4591d4561c725b70fd4e646d674 (diff)
downloadbcm5719-llvm-d4594adf43392c07232b1bd62a890177b6ff2cef.tar.gz
bcm5719-llvm-d4594adf43392c07232b1bd62a890177b6ff2cef.zip
new testcase for PR1253
llvm-svn: 35611
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/InstCombine/xor2.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/xor2.ll b/llvm/test/Transforms/InstCombine/xor2.ll
new file mode 100644
index 00000000000..9b6a3fef698
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/xor2.ll
@@ -0,0 +1,19 @@
+; This test makes sure that these instructions are properly eliminated.
+;
+
+; RUN: llvm-as < %s | opt -instcombine -disable-output &&
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'xor '
+
+; PR1253
+define i1 @test0(i32 %A) {
+ %B = xor i32 %A, -2147483648
+ %C = icmp sgt i32 %B, -1
+ ret i1 %C
+}
+
+define i1 @test1(i32 %A) {
+ %B = xor i32 %A, 12345
+ %C = icmp slt i32 %B, 0
+ ret i1 %C
+}
+
OpenPOWER on IntegriCloud