aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-23 05:27:48 +0000
committerChris Lattner <sabre@nondot.org>2009-07-23 05:27:48 +0000
commita26e3b6ef8de981ef32d48c922791ecc081e6e34 (patch)
tree38ac9db46b0bc096bb48b0ec29931983418ab3fb /test
parentf048c96a595f0dcb7588cfd1e432d21dd498e1fb (diff)
downloadexternal_llvm-a26e3b6ef8de981ef32d48c922791ecc081e6e34.zip
external_llvm-a26e3b6ef8de981ef32d48c922791ecc081e6e34.tar.gz
external_llvm-a26e3b6ef8de981ef32d48c922791ecc081e6e34.tar.bz2
convert a test to filecheck format. This fixes an endemic problem
with negative tests: this test wasn't checking what it thought it was because it was grepping .bc, not .ll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/vector-casts.ll17
1 files changed, 12 insertions, 5 deletions
diff --git a/test/Transforms/InstCombine/vector-casts.ll b/test/Transforms/InstCombine/vector-casts.ll
index a73a84a..c6d1eaa 100644
--- a/test/Transforms/InstCombine/vector-casts.ll
+++ b/test/Transforms/InstCombine/vector-casts.ll
@@ -1,15 +1,22 @@
-; RUN: llvm-as < %s | opt -instcombine > %t
-; RUN: not grep trunc %t
-; RUN: not grep ashr %t
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | FileCheck %s
; This turns into a&1 != 0
-define <2 x i1> @a(<2 x i64> %a) {
+define <2 x i1> @test1(<2 x i64> %a) {
%t = trunc <2 x i64> %a to <2 x i1>
ret <2 x i1> %t
+
+; CHECK: define <2 x i1> @test1
+; CHECK: and <2 x i64> %a, <i64 1, i64 1>
+; CHECK: icmp ne <2 x i64> %tmp, zeroinitializer
}
+
; The ashr turns into an lshr.
-define <2 x i64> @b(<2 x i64> %a) {
+define <2 x i64> @test2(<2 x i64> %a) {
%b = and <2 x i64> %a, <i64 65535, i64 65535>
%t = ashr <2 x i64> %b, <i64 1, i64 1>
ret <2 x i64> %t
+
+; CHECK: define <2 x i64> @test2
+; CHECK: and <2 x i64> %a, <i64 65535, i64 65535>
+; CHECK: lshr <2 x i64> %b, <i64 1, i64 1>
}