FileCheck-ize tests.
authorBill Wendling <isanbard@gmail.com>
Thu, 22 Aug 2013 00:51:19 +0000 (00:51 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 22 Aug 2013 00:51:19 +0000 (00:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188971 91177308-0d34-0410-b5e6-96231b3b80d8

26 files changed:
test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll
test/Analysis/PostDominators/pr1098.ll
test/Analysis/ScalarEvolution/2007-08-06-MisinterpretBranch.ll
test/Analysis/ScalarEvolution/2007-08-06-Unsigned.ll
test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll
test/Analysis/ScalarEvolution/2007-11-14-SignedAddRec.ll
test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll
test/Analysis/ScalarEvolution/2008-02-15-UMax.ll
test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll
test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect1.ll
test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect2.ll
test/Analysis/ScalarEvolution/2008-07-19-InfiniteLoop.ll
test/Analysis/ScalarEvolution/2008-07-19-WrappingIV.ll
test/Analysis/ScalarEvolution/2008-11-18-LessThanOrEqual.ll
test/Analysis/ScalarEvolution/2008-11-18-Stride1.ll
test/Analysis/ScalarEvolution/2008-11-18-Stride2.ll
test/Analysis/ScalarEvolution/2008-12-08-FiniteSGE.ll
test/Analysis/ScalarEvolution/2008-12-14-StrideAndSigned.ll
test/Analysis/ScalarEvolution/2008-12-15-DontUseSDiv.ll
test/Analysis/ScalarEvolution/2009-01-02-SignedNegativeStride.ll
test/Analysis/ScalarEvolution/2009-04-22-TruncCast.ll
test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll
test/Analysis/ScalarEvolution/and-xor.ll
test/Analysis/ScalarEvolution/avoid-smax-0.ll
test/Analysis/ScalarEvolution/div-overflow.ll
test/Analysis/ScalarEvolution/do-loop.ll

index 7119007ffde51fb8d1eba6fea3a93fc593a78add..a87bab7cabf234a950a59b259314d7a4f605b680 100644 (file)
@@ -1,8 +1,9 @@
 ; This testcase was incorrectly computing that the loopentry.7 loop was
 ; not a child of the loopentry.6 loop.
 ;
-; RUN: opt < %s -analyze -loops | \
-; RUN:   grep "^            Loop at depth 4 containing: %loopentry.7<header><latch><exiting>"
+; RUN: opt < %s -analyze -loops | FileCheck %s
+
+; CHECK: Loop at depth 4 containing: %loopentry.7<header><latch><exiting>
 
 define void @getAndMoveToFrontDecode() {
        br label %endif.2
index afb47769ee498a6bab30a77018adfdd04ebcce6c..2eed21371276efea8764ca92063f2012e965680c 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: opt < %s -postdomtree -analyze | grep entry
+; RUN: opt < %s -postdomtree -analyze | FileCheck %s
 ; PR932
 
 define void @foo(i1 %x) {
+; CHECK: entry
 entry:
         br i1 %x, label %bb1, label %bb0
 bb0:            ; preds = %entry, bb0
index e67e4d00d6258c403a749b44976b23a159f8a73c..fd09fd5f28c575b80fb0d4dbe4dccac2fd65b825 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: opt < %s -indvars -adce -simplifycfg -S | grep "icmp s"
+; RUN: opt < %s -indvars -adce -simplifycfg -S | FileCheck %s
 ; PR1598
 
+; CHECK: icmp s
+
 define i32 @f(i32 %a, i32 %b, i32 %x, i32 %y) {
 entry:
        %tmp3 = icmp eq i32 %a, %b              ; <i1> [#uses=1]
index 036abf5b7c1661ef9019f696a5768be953e0907b..9e19ccab6eb1cd1aaa3c75a03376594ff45909ba 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: opt < %s -scalar-evolution -analyze | grep "Loop %bb: backedge-taken count is (-1 + (-1 \* %x) + %y)"
+; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s
 ; PR1597
 
+; CHECK: Loop %bb: backedge-taken count is (-1 + (-1 * %x) + %y)
+
 define i32 @f(i32 %x, i32 %y) {
 entry:
         %tmp63 = icmp ult i32 %x, %y            ; <i1> [#uses=1]
index a3192b9c01fded11415aa6388227174bb6182e2e..b65a5250244749a0306356fd48ab5f7d46650c00 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:   -scalar-evolution-max-iterations=0 | grep "backedge-taken count is 13"
+; RUN: opt < %s -analyze -scalar-evolution -scalar-evolution-max-iterations=0 | FileCheck %s
 ; PR1706
 
+; CHECK: backedge-taken count is 13
+
 define i32 @f() {
 entry:
        br label %bb5
index 514920f0f6fade0dc48b141e151f337267d22621..a2850d8c4b4f5bae83baee598c7861f8fa31f64a 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: opt < %s -indvars -S | grep printd | grep 1206807378
+; RUN: opt < %s -indvars -S | FileCheck %s
 ; PR1798
 
+; CHECK: printd(i32 1206807378)
+
 declare void @printd(i32)
 
 define i32 @test() {
index d0644f7b3f9da9bfacf398787811d5ef1d90c247..6ebfa61de41d1c67174c23dba47f96b31c4fa020 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: opt < %s -scalar-evolution -analyze | grep "Loop %header: backedge-taken count is (0 smax %n)"
+; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s
+
+; CHECK: Loop %header: backedge-taken count is (0 smax %n)
 
 define void @foo(i32 %n) {
 entry:
index 52c7985045d095671b4a53fc456366b5039f61e4..527fd273cd25ba243a6f0a4761bff637c8e9fa61 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: opt < %s -analyze -scalar-evolution | grep umax
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
 ; PR2003
 
+; CHECK: umax
+
 define i32 @foo(i32 %n) {
 entry:
         br label %header
index 41734d70f0717adf9644031ec0f30a8511e5fbe0..9a05d88c4ce7cfe387741748497e313ce9c1b544 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:   -scalar-evolution-max-iterations=0 | grep "backedge-taken count is 61"
+; RUN: opt < %s -analyze -scalar-evolution -scalar-evolution-max-iterations=0 | FileCheck %s
 ; PR2364
 
+; CHECK: backedge-taken count is 61
+
 define i32 @func_6() nounwind  {
 entry:
        br label %bb5
index 5cf17a2101405eeec7c50bbaac6772fe91bc2230..dcf8fc9dbdb0f341a3565a127b7a63a72f1bfb86 100644 (file)
@@ -1,6 +1,9 @@
-; RUN: opt < %s -analyze -scalar-evolution 2>&1 | not grep smax
+; RUN: opt < %s -analyze -scalar-evolution 2>&1 | FileCheck %s
 ; PR2261
 
+; CHECK: Printing analysis 'Scalar Evolution Analysis' for function 'foo'
+; CHECK-NOT: smax
+
 @lut = common global [256 x i8] zeroinitializer, align 32              ; <[256 x i8]*> [#uses=1]
 
 define void @foo(i32 %count, i32* %srcptr, i32* %dstptr) nounwind  {
index 195dfaaaee95ab5d311b81d2a544755b0c998e28..c804bd905510c87100d3c403dc90a6e0e3661324 100644 (file)
@@ -1,6 +1,9 @@
-; RUN: opt < %s -analyze -scalar-evolution 2>&1 | not grep smax
+; RUN: opt < %s -analyze -scalar-evolution 2>&1 | FileCheck %s
 ; PR2070
 
+; CHECK: Printing analysis 'Scalar Evolution Analysis' for function 'a'
+; CHECK-NOT: smax
+
 define i32 @a(i32 %x) nounwind  {
 entry:
        icmp sgt i32 %x, 1              ; <i1>:0 [#uses=1]
index 1865c059a99884b0c789b838c3447d798cfa03ac..ad34f6cedf61d5b4debb84fb16c35e1b041a85c2 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:   -scalar-evolution-max-iterations=0 | grep Unpredictable
+; RUN: opt < %s -analyze -scalar-evolution -scalar-evolution-max-iterations=0 | FileCheck %s
 ; PR2088
 
+; CHECK: Unpredictable
+
 define void @fun() {
 entry:
         br label %loop
index cbf200e40f9bd167b25f1cadcd89c0a078dee293..82b9d560425e05a37ead77f323247fe0a5f1be9c 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:   -scalar-evolution-max-iterations=0 | grep "backedge-taken count is 113"
+; RUN: opt < %s -analyze -scalar-evolution -scalar-evolution-max-iterations=0 | FileCheck %s
 ; PR2088
 
+; CHECK: backedge-taken count is 113
+
 define void @fun() {
 entry:
         br label %loop
index c25e4a3b2b23ece8a627c585d39e0c33c4d49751..46c6c59e92c529bf01ff4fbf2cda9ddd77394668 100644 (file)
@@ -1,5 +1,6 @@
-; RUN: opt < %s -analyze -scalar-evolution 2>&1 | \
-; RUN: grep "Loop %bb: backedge-taken count is (7 + (-1 \* %argc))"
+; RUN: opt < %s -analyze -scalar-evolution 2>&1 | FileCheck %s
+
+; CHECK: Loop %bb: backedge-taken count is (7 + (-1 * %argc))
 
 define i32 @main(i32 %argc, i8** %argv) nounwind {
 entry:
index 56a83438830e7c3d92c04b663d68e3dc035c4fd1..74698795ca3268749dffcb79a54fd19961967740 100644 (file)
@@ -1,5 +1,6 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:  | grep "Loop %bb: Unpredictable backedge-taken count\."
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
+
+; CHECK: Loop %bb: Unpredictable backedge-taken count.
 
 ; ScalarEvolution can't compute a trip count because it doesn't know if
 ; dividing by the stride will have a remainder. This could theoretically
index aaf6770676bd1610d22b5fb979d75ca8803c9649..0ee69c6d306fdecf2b53718ded62804623b84d71 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: opt < %s -analyze -scalar-evolution 2>&1 | grep "/u 3"
+; RUN: opt < %s -analyze -scalar-evolution 2>&1 | FileCheck %s
 ; XFAIL: *
 
+; CHECK: /u 3
+
 ; This is a tricky testcase for unsigned wrap detection which ScalarEvolution
 ; doesn't yet know how to do.
 
index a1b3b7191658c6b975ea834cd664becab78dde7f..7a7a64001a697f82fe00c5dbdb4f9e169550a0ab 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: opt < %s -analyze -scalar-evolution | grep "backedge-taken count is 255"
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
+
+; CHECK: backedge-taken count is 255
 
 define i32 @foo(i32 %x, i32 %y, i32* %lam, i32* %alp) nounwind {
 bb1.thread:
index bb149193a0f4cba4bd4f339fdb0675dc2c1c107d..95aa1fc85e20cff0a00d880d7d7a5c29e06853cf 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: opt < %s -analyze -scalar-evolution 2>&1 | \
-; RUN: grep "(((-1 * %i0) + (100005 smax %i0)) /u 5)"
+; RUN: opt < %s -analyze -scalar-evolution 2>&1 |  FileCheck %s
 ; XFAIL: *
 
+; CHECK: (((-1 * %i0) + (100005 smax %i0)) /u 5)
+
 define i32 @foo0(i32 %i0) nounwind {
 entry:
        br label %bb1
index 70006260cb9e9c6998dfae9bbac2fb66f6091957..d40044e7f86d52abafe3e38e81c0682d0741a2f2 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: opt < %s -analyze -scalar-evolution 2>&1 | grep "/u 5"
+; RUN: opt < %s -analyze -scalar-evolution 2>&1 | FileCheck %s
 ; XFAIL: *
 
+; CHECK: /u 5
+
 define i8 @foo0(i8 %i0) nounwind {
 entry:
        br label %bb1
index 82f2608e57471cfc4d5beab43b7e49f615ba53c9..f19d18c72e69dc1c1b2d9e2b5ec10f0e9a2e7cd3 100644 (file)
@@ -1,6 +1,9 @@
-; RUN: opt < %s -analyze -scalar-evolution | not grep "/u -1"
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
 ; PR3275
 
+; CHECK: Printing analysis 'Scalar Evolution Analysis' for function 'func_15'
+; CHECK-NOT: /u -1
+
 @g_16 = external global i16            ; <i16*> [#uses=3]
 @.str = external constant [4 x i8]             ; <[4 x i8]*> [#uses=0]
 
index ebd9f7377d0c95d871e1d8186344bd520251f317..3dacfbb0a8d490feca726cb857b672e454457b0e 100644 (file)
@@ -1,35 +1,53 @@
 ; RUN: opt < %s -analyze -scalar-evolution | grep "(trunc i" | not grep ext
 
+; CHECK: Printing analysis 'Scalar Evolution Analysis' for function 'test1'
+; CHECK-NOT: (trunc i{{.*}}ext
+
 define i16 @test1(i8 %x) {
   %A = sext i8 %x to i32
   %B = trunc i32 %A to i16
   ret i16 %B
 }
 
+; CHECK: Printing analysis 'Scalar Evolution Analysis' for function 'test2'
+; CHECK-NOT: (trunc i{{.*}}ext
+
 define i8 @test2(i16 %x) {
   %A = sext i16 %x to i32
   %B = trunc i32 %A to i8
   ret i8 %B
 }
 
+; CHECK: Printing analysis 'Scalar Evolution Analysis' for function 'test3'
+; CHECK-NOT: (trunc i{{.*}}ext
+
 define i16 @test3(i16 %x) {
   %A = sext i16 %x to i32
   %B = trunc i32 %A to i16
   ret i16 %B
 }
 
+; CHECK: Printing analysis 'Scalar Evolution Analysis' for function 'test4'
+; CHECK-NOT: (trunc i{{.*}}ext
+
 define i16 @test4(i8 %x) {
   %A = zext i8 %x to i32
   %B = trunc i32 %A to i16
   ret i16 %B
 }
 
+; CHECK: Printing analysis 'Scalar Evolution Analysis' for function 'test5'
+; CHECK-NOT: (trunc i{{.*}}ext
+
 define i8 @test5(i16 %x) {
   %A = zext i16 %x to i32
   %B = trunc i32 %A to i8
   ret i8 %B
 }
 
+; CHECK: Printing analysis 'Scalar Evolution Analysis' for function 'test6'
+; CHECK-NOT: (trunc i{{.*}}ext
+
 define i16 @test6(i16 %x) {
   %A = zext i16 %x to i32
   %B = trunc i32 %A to i16
index 8a780431345e273134b4598fd1569eee206ba7c1..5d1502da179f8788dfc6b1b1b7a4e67798c1d5d7 100644 (file)
@@ -1,5 +1,8 @@
-; RUN: opt < %s -analyze -scalar-evolution | grep "count is 2"
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
 ; PR3171
+
+; CHECK: count is 2
+
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
        %struct.Foo = type { i32 }
index 06f4a8582fa19a07fccfd12dab0c523979f6fa97..404ab91e269d2e71b293956821701a5e035a157d 100644 (file)
@@ -1,5 +1,8 @@
-; RUN: opt < %s -scalar-evolution -analyze \
-; RUN:   | grep "\-->  (zext" | count 2
+; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s
+
+; CHECK: -->  (zext
+; CHECK: -->  (zext
+; CHECK-NOT: -->  (zext
 
 define i32 @foo(i32 %x) {
   %n = and i32 %x, 255
index 3d15c787fcfe751ce34a6405f678d7eeb3a5b813..8abb43074c5e43b1a1494d66df74ba8147dabba1 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: opt < %s -scalar-evolution -analyze | grep "Loop %bb3: backedge-taken count is (-1 + %n)"
+; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s
+
+; CHECK: Loop %bb3: backedge-taken count is (-1 + %n)
 
 ; We don't want to use a max in the trip count expression in
 ; this testcase.
index 28467975606f59d456b6da00218a6a368c8832df..aca964ae62b6e4f04db7181e37b4f293e179e88c 100644 (file)
@@ -1,5 +1,6 @@
-; RUN: opt < %s -scalar-evolution -analyze \
-; RUN:  | grep "\-->  ((-128 \* %a) /u -128)"
+; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s
+
+; CHECK: -->  ((-128 * %a) /u -128)
 
 ; Don't let ScalarEvolution fold this div away.
 
index 6e3295a920b059e6d3d9ee8f9654f1b8283deb8b..e35ea7d57e3a5dfb4937081206df6651e1159c57 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: opt < %s -analyze -scalar-evolution | grep smax
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
 ; PR1614
 
+; CHECK: smax
+
 define i32 @f(i32 %x, i32 %y) {
 entry:
        br label %bb