aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-11 21:42:08 +0000
committerChris Lattner <sabre@nondot.org>2009-10-11 21:42:08 +0000
commit833f0cc57fb3f370b0834629c4e046397d11d31f (patch)
treea59d0a74b9eb37a8502135d972a37d3264c40ec4 /test/Transforms
parenta2498470088b7b2cdbf3e184ac22f5a23f56eab4 (diff)
downloadexternal_llvm-833f0cc57fb3f370b0834629c4e046397d11d31f.zip
external_llvm-833f0cc57fb3f370b0834629c4e046397d11d31f.tar.gz
external_llvm-833f0cc57fb3f370b0834629c4e046397d11d31f.tar.bz2
convert xor2 to filecheck, merge in a random regtest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83796 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/2006-11-27-XorBug.ll12
-rw-r--r--test/Transforms/InstCombine/xor2.ll17
2 files changed, 16 insertions, 13 deletions
diff --git a/test/Transforms/InstCombine/2006-11-27-XorBug.ll b/test/Transforms/InstCombine/2006-11-27-XorBug.ll
deleted file mode 100644
index 1f8b478..0000000
--- a/test/Transforms/InstCombine/2006-11-27-XorBug.ll
+++ /dev/null
@@ -1,12 +0,0 @@
-; RUN: opt < %s -instcombine -S | grep and.*32
-; RUN: opt < %s -instcombine -S | \
-; RUN: not grep or.*153
-; PR1014
-
-define i32 @test(i32 %tmp1) {
- %ovm = and i32 %tmp1, 32 ; <i32> [#uses=1]
- %ov3 = add i32 %ovm, 145 ; <i32> [#uses=1]
- %ov110 = xor i32 %ov3, 153 ; <i32> [#uses=1]
- ret i32 %ov110
-}
-
diff --git a/test/Transforms/InstCombine/xor2.ll b/test/Transforms/InstCombine/xor2.ll
index 0f17ca9..94a464c 100644
--- a/test/Transforms/InstCombine/xor2.ll
+++ b/test/Transforms/InstCombine/xor2.ll
@@ -1,17 +1,32 @@
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: opt < %s -instcombine -S | not grep {xor }
+; RUN: opt < %s -instcombine -S | FileCheck %s
; PR1253
define i1 @test0(i32 %A) {
+; CHECK: @test0
+; CHECK: %C = icmp slt i32 %A, 0
%B = xor i32 %A, -2147483648
%C = icmp sgt i32 %B, -1
ret i1 %C
}
define i1 @test1(i32 %A) {
+; CHECK: @test1
+; CHECK: %C = icmp slt i32 %A, 0
%B = xor i32 %A, 12345
%C = icmp slt i32 %B, 0
ret i1 %C
}
+; PR1014
+define i32 @test2(i32 %tmp1) {
+; CHECK: @test2
+; CHECK-NEXT: or i32 %tmp1, 8
+; CHECK-NEXT: and i32
+; CHECK-NEXT: ret i32
+ %ovm = and i32 %tmp1, 32
+ %ov3 = add i32 %ovm, 145
+ %ov110 = xor i32 %ov3, 153
+ ret i32 %ov110
+}