[llvm] r243378 - FileCheck'ify some wc/grep based tests; NFCI.

Sanjoy Das sanjoy at playingwithpointers.com
Mon Jul 27 20:50:09 PDT 2015


Author: sanjoy
Date: Mon Jul 27 22:50:09 2015
New Revision: 243378

URL: http://llvm.org/viewvc/llvm-project?rev=243378&view=rev
Log:
FileCheck'ify some wc/grep based tests; NFCI.

Modified:
    llvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll
    llvm/trunk/test/Transforms/IndVarSimplify/tripcount_infinite.ll

Modified: llvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll?rev=243378&r1=243377&r2=243378&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll (original)
+++ llvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll Mon Jul 27 22:50:09 2015
@@ -1,7 +1,10 @@
-; RUN: opt < %s -O3 -o - | llc -no-integrated-as -o - | grep bork_directive | wc -l | grep 2
+; RUN: opt < %s -O3 | llc -no-integrated-as | FileCheck %s
 
 ;; We don't want branch folding to fold asm directives.
 
+; CHECK: bork_directive
+; CHECK: bork_directive
+
 define void @bork(i32 %param) {
 entry:
 	%tmp = icmp eq i32 %param, 0

Modified: llvm/trunk/test/Transforms/IndVarSimplify/tripcount_infinite.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/tripcount_infinite.ll?rev=243378&r1=243377&r2=243378&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/IndVarSimplify/tripcount_infinite.ll (original)
+++ llvm/trunk/test/Transforms/IndVarSimplify/tripcount_infinite.ll Mon Jul 27 22:50:09 2015
@@ -1,38 +1,45 @@
 ; These tests have an infinite trip count.  We obviously shouldn't remove the 
 ; loops!  :)
 ;
-; RUN: opt < %s -indvars -adce -simplifycfg -S | grep icmp | wc -l > %t2
-; RUN: llvm-as < %s | llvm-dis | grep icmp | wc -l > %t1
-; RUN: diff %t1 %t2
+; RUN: opt < %s -indvars -adce -simplifycfg -S | FileCheck %s
 
 ;; test for (i = 1; i != 100; i += 2)
 define i32 @infinite_linear() {
+; CHECK-LABEL: @infinite_linear(
 entry:
         br label %loop
 
 loop:           ; preds = %loop, %entry
+; CHECK-LABEL: loop:
         %i = phi i32 [ 1, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
         %i.next = add i32 %i, 2         ; <i32> [#uses=1]
         %c = icmp ne i32 %i, 100                ; <i1> [#uses=1]
+; CHECK: icmp
+; CHECK: br
         br i1 %c, label %loop, label %loopexit
 
 loopexit:               ; preds = %loop
+; CHECK-LABEL: loopexit:
         ret i32 %i
 }
 
 ;; test for (i = 1; i*i != 63; ++i)
 define i32 @infinite_quadratic() {
+; CHECK-LABEL: @infinite_quadratic(
 entry:
         br label %loop
 
 loop:           ; preds = %loop, %entry
+; CHECK-LABEL: loop:
         %i = phi i32 [ 1, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=4]
         %isquare = mul i32 %i, %i               ; <i32> [#uses=1]
         %i.next = add i32 %i, 1         ; <i32> [#uses=1]
         %c = icmp ne i32 %isquare, 63           ; <i1> [#uses=1]
+; CHECK: icmp
+; CHECK: br
         br i1 %c, label %loop, label %loopexit
 
 loopexit:               ; preds = %loop
+; CHECK-LABEL: loopexit:
         ret i32 %i
 }
-





More information about the llvm-commits mailing list