[llvm-commits] [llvm] r76861 - /llvm/trunk/test/Transforms/InstCombine/vector-casts.ll

Chris Lattner sabre at nondot.org
Wed Jul 22 22:27:54 PDT 2009


Author: lattner
Date: Thu Jul 23 00:27:48 2009
New Revision: 76861

URL: http://llvm.org/viewvc/llvm-project?rev=76861&view=rev
Log:
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.

Modified:
    llvm/trunk/test/Transforms/InstCombine/vector-casts.ll

Modified: llvm/trunk/test/Transforms/InstCombine/vector-casts.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/vector-casts.ll?rev=76861&r1=76860&r2=76861&view=diff

==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/vector-casts.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/vector-casts.ll Thu Jul 23 00:27:48 2009
@@ -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>
 }





More information about the llvm-commits mailing list