[llvm] r179087 - Converted 8x tests of SimplifyCFG to use FileCheck instead of grep.

Michael Gottesman mgottesman at apple.com
Mon Apr 8 22:18:54 PDT 2013


Author: mgottesman
Date: Tue Apr  9 00:18:53 2013
New Revision: 179087

URL: http://llvm.org/viewvc/llvm-project?rev=179087&view=rev
Log:
Converted 8x tests of SimplifyCFG to use FileCheck instead of grep.

Modified:
    llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
    llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
    llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll
    llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll
    llvm/trunk/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
    llvm/trunk/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
    llvm/trunk/test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll
    llvm/trunk/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll

Modified: llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll?rev=179087&r1=179086&r2=179087&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll Tue Apr  9 00:18:53 2013
@@ -1,11 +1,11 @@
 ; This test checks to make sure that 'br X, Dest, Dest' is folded into 
 ; 'br Dest'
 
-; RUN: opt < %s -simplifycfg -S | \
-; RUN:   not grep "br i1 %c2"
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
 
 declare void @noop()
 
+; CHECK-NOT: br i1 %c2
 define i32 @test(i1 %c1, i1 %c2) {
 	call void @noop( )
 	br i1 %c1, label %A, label %Y

Modified: llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll?rev=179087&r1=179086&r2=179087&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll Tue Apr  9 00:18:53 2013
@@ -3,8 +3,9 @@
 ; due to the fact that the SimplifyCFG function does not use 
 ; the ConstantFoldTerminator function.
 
-; RUN: opt < %s -simplifycfg -S | \
-; RUN:   not grep "br i1 %c2"
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
+
+; CHECK-NOT: br i1 %c2
 
 declare void @noop()
 

Modified: llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll?rev=179087&r1=179086&r2=179087&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll Tue Apr  9 00:18:53 2013
@@ -1,7 +1,6 @@
-; RUN: opt < %s -simplifycfg -S | \
-; RUN:   not grep switch
-
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
 
+; CHECK-NOT: switch
         %llvm.dbg.anchor.type = type { i32, i32 }
         %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8* }
 

Modified: llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll?rev=179087&r1=179086&r2=179087&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll Tue Apr  9 00:18:53 2013
@@ -1,5 +1,6 @@
-; RUN: opt < %s -simplifycfg -S | \
-; RUN:   not grep switch
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
+
+; CHECK-NOT: switch
 
 ; Test normal folding
 define i32 @test1() {

Modified: llvm/trunk/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll?rev=179087&r1=179086&r2=179087&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll Tue Apr  9 00:18:53 2013
@@ -1,9 +1,7 @@
 ; Make sure this doesn't turn into an infinite loop
 
-; RUN: opt < %s -simplifycfg -constprop -simplifycfg |\
-; RUN:   llvm-dis | grep bb86
-; END.
-	
+; RUN: opt < %s -simplifycfg -constprop -simplifycfg | llvm-dis | FileCheck %s
+
 %struct.anon = type { i32, i32, i32, i32, [1024 x i8] }
 @_zero_ = external global %struct.anon*		; <%struct.anon**> [#uses=2]
 @_one_ = external global %struct.anon*		; <%struct.anon**> [#uses=4]
@@ -112,6 +110,7 @@ cond_true83:		; preds = %bb80
 	%tmp71 = call i32 @_do_compare( %struct.anon* null, %struct.anon* null, i32 0, i32 1 )		; <i32> [#uses=1]
 	%tmp76 = icmp eq i32 %tmp71, 0		; <i1> [#uses=1]
 	br i1 %tmp76, label %bb80.outer, label %bb80
+; CHECK: bb86
 bb86:		; preds = %bb80
 	call void @free_num( %struct.anon** %num )
 	%tmp88 = load %struct.anon** %guess		; <%struct.anon*> [#uses=1]

Modified: llvm/trunk/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll?rev=179087&r1=179086&r2=179087&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll Tue Apr  9 00:18:53 2013
@@ -1,6 +1,7 @@
 ; PR957
-; RUN: opt < %s -simplifycfg -S | \
-; RUN:   not grep select
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
+
+; CHECK-NOT: select
 
 @G = extern_weak global i32
 

Modified: llvm/trunk/test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll?rev=179087&r1=179086&r2=179087&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll Tue Apr  9 00:18:53 2013
@@ -1,4 +1,6 @@
-; RUN: opt < %s -simplifycfg -S | not grep invoke
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
+
+; CHECK-NOT: invoke
 
 declare i32 @func(i8*) nounwind
 

Modified: llvm/trunk/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll?rev=179087&r1=179086&r2=179087&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll Tue Apr  9 00:18:53 2013
@@ -1,5 +1,5 @@
 ; The phi should not be eliminated in this case, because the fp op could trap.
-; RUN: opt < %s -simplifycfg -S | grep "= phi double"
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 target triple = "i686-apple-darwin8"
@@ -19,6 +19,7 @@ cond_true:		; preds = %entry
 	br label %cond_next
 
 cond_next:		; preds = %cond_true, %entry
+; CHECK: = phi double
 	%F.0 = phi double [ %tmp, %entry ], [ %tmp7, %cond_true ]		; <double> [#uses=1]
 	store double %F.0, double* @G, align 8
 	ret void





More information about the llvm-commits mailing list