[llvm] r174865 - FileCheck-ize the tests.

Bill Wendling isanbard at gmail.com
Mon Feb 11 00:34:58 PST 2013


Author: void
Date: Mon Feb 11 02:34:57 2013
New Revision: 174865

URL: http://llvm.org/viewvc/llvm-project?rev=174865&view=rev
Log:
FileCheck-ize the tests.

Modified:
    llvm/trunk/test/Assembler/2008-09-02-FunctionNotes.ll
    llvm/trunk/test/Transforms/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
    llvm/trunk/test/Transforms/DeadArgElim/2007-12-20-ParamAttrs.ll
    llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll
    llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll
    llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll

Modified: llvm/trunk/test/Assembler/2008-09-02-FunctionNotes.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2008-09-02-FunctionNotes.ll?rev=174865&r1=174864&r2=174865&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/2008-09-02-FunctionNotes.ll (original)
+++ llvm/trunk/test/Assembler/2008-09-02-FunctionNotes.ll Mon Feb 11 02:34:57 2013
@@ -1,14 +1,18 @@
 ; Test function attributes
-; RUN: llvm-as < %s | llvm-dis | grep inline | count 2
+; RUN: llvm-as < %s | llvm-dis | FileCheck %s
 
+; CHECK: define void @fn1() alwaysinline
 define void @fn1() alwaysinline {
   ret void
 }
 
+; CHECK: define void @fn2() noinline
 define void @fn2() noinline {
   ret void
 }
 
+; CHECK: define void @fn3()
+; CHECK-NOT: define void @fn3(){{.*}}inline
 define void @fn3() {
   ret void
 }

Modified: llvm/trunk/test/Transforms/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ArgumentPromotion/2008-02-01-ReturnAttrs.ll?rev=174865&r1=174864&r2=174865&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ArgumentPromotion/2008-02-01-ReturnAttrs.ll (original)
+++ llvm/trunk/test/Transforms/ArgumentPromotion/2008-02-01-ReturnAttrs.ll Mon Feb 11 02:34:57 2013
@@ -1,15 +1,17 @@
-; RUN: opt < %s -argpromotion -S | grep nounwind | count 2
+; RUN: opt < %s -argpromotion -S | FileCheck %s
 
+; CHECK: define internal i32 @deref(i32 %x.val) nounwind {
 define internal i32 @deref(i32* %x) nounwind {
 entry:
-	%tmp2 = load i32* %x, align 4		; <i32> [#uses=1]
-	ret i32 %tmp2
+  %tmp2 = load i32* %x, align 4
+  ret i32 %tmp2
 }
 
 define i32 @f(i32 %x) {
 entry:
-	%x_addr = alloca i32		; <i32*> [#uses=2]
-	store i32 %x, i32* %x_addr, align 4
-	%tmp1 = call i32 @deref( i32* %x_addr ) nounwind 		; <i32> [#uses=1]
-	ret i32 %tmp1
+  %x_addr = alloca i32
+  store i32 %x, i32* %x_addr, align 4
+; CHECK: %tmp1 = call i32 @deref(i32 %x_addr.val) nounwind
+  %tmp1 = call i32 @deref( i32* %x_addr ) nounwind
+  ret i32 %tmp1
 }

Modified: llvm/trunk/test/Transforms/DeadArgElim/2007-12-20-ParamAttrs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadArgElim/2007-12-20-ParamAttrs.ll?rev=174865&r1=174864&r2=174865&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/DeadArgElim/2007-12-20-ParamAttrs.ll (original)
+++ llvm/trunk/test/Transforms/DeadArgElim/2007-12-20-ParamAttrs.ll Mon Feb 11 02:34:57 2013
@@ -1,20 +1,18 @@
-; RUN: opt < %s -deadargelim -S > %t
-; RUN: cat %t | grep nounwind | count 2
-; RUN: cat %t | grep signext | count 2
-; RUN: cat %t | not grep inreg
-; RUN: cat %t | not grep zeroext
-; RUN: cat %t | not grep byval
+; RUN: opt < %s -deadargelim -S | FileCheck %s
 
-	%struct = type { }
+%struct = type { }
 
 @g = global i8 0
 
+; CHECK: define internal void @foo(i8 signext %y) nounwind
+
 define internal zeroext i8 @foo(i8* inreg %p, i8 signext %y, ... )  nounwind {
-	store i8 %y, i8* @g
-	ret i8 0
+  store i8 %y, i8* @g
+  ret i8 0
 }
 
 define i32 @bar() {
-	%A = call zeroext i8(i8*, i8, ...)* @foo(i8* inreg null, i8 signext 1, %struct* byval null ) nounwind
-	ret i32 0
+; CHECK: call void @foo(i8 signext 1) nounwind
+  %A = call zeroext i8(i8*, i8, ...)* @foo(i8* inreg null, i8 signext 1, %struct* byval null ) nounwind
+  ret i32 0
 }

Modified: llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll?rev=174865&r1=174864&r2=174865&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll (original)
+++ llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll Mon Feb 11 02:34:57 2013
@@ -1,17 +1,21 @@
-; RUN: opt < %s -basicaa -functionattrs -S | grep readnone | count 4
+; RUN: opt < %s -basicaa -functionattrs -S | FileCheck %s
 @x = global i32 0
 
+; CHECK: declare i32 @e() readnone
 declare i32 @e() readnone
 
+; CHECK: define i32 @f() readnone
 define i32 @f() {
 	%tmp = call i32 @e( )		; <i32> [#uses=1]
 	ret i32 %tmp
 }
 
+; CHECK: define i32 @g() readnone
 define i32 @g() readonly {
 	ret i32 0
 }
 
+; CHECK: define i32 @h() readnone
 define i32 @h() readnone {
 	%tmp = load i32* @x		; <i32> [#uses=1]
 	ret i32 %tmp

Modified: llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll?rev=174865&r1=174864&r2=174865&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll (original)
+++ llvm/trunk/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll Mon Feb 11 02:34:57 2013
@@ -1,9 +1,11 @@
-; RUN: opt < %s -basicaa -functionattrs -S | grep readonly | count 2
+; RUN: opt < %s -basicaa -functionattrs -S | FileCheck %s
 
+; CHECK: define i32 @f() readonly
 define i32 @f() {
 entry:
-	%tmp = call i32 @e( )		; <i32> [#uses=1]
-	ret i32 %tmp
+  %tmp = call i32 @e( )
+  ret i32 %tmp
 }
 
+; CHECK: declare i32 @e() readonly
 declare i32 @e() readonly

Modified: llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll?rev=174865&r1=174864&r2=174865&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll Mon Feb 11 02:34:57 2013
@@ -1,12 +1,18 @@
-; RUN: opt < %s -simplify-libcalls -S > %t
-; RUN: grep noalias %t | count 2
-; RUN: grep nocapture %t | count 3
-; RUN: grep nounwind %t | count 3
-; RUN: grep readonly %t | count 1
+; RUN: opt < %s -simplify-libcalls -S | FileCheck %s
 
+; CHECK: declare noalias i8* @fopen(i8* nocapture, i8* nocapture) nounwind
 declare i8* @fopen(i8*, i8*)
+
+; CHECK: declare i8 @strlen(i8* nocapture) nounwind readonly
 declare i8 @strlen(i8*)
+
+; CHECK: declare noalias i32* @realloc(i32* nocapture, i32) nounwind
 declare i32* @realloc(i32*, i32)
 
 ; Test deliberately wrong declaration
 declare i32 @strcpy(...)
+
+; CHECK-NOT: strcpy{{.*}}noalias
+; CHECK-NOT: strcpy{{.*}}nocapture
+; CHECK-NOT: strcpy{{.*}}nounwind
+; CHECK-NOT: strcpy{{.*}}readonly





More information about the llvm-commits mailing list