FileCheckize some of the testcases.
authorBill Wendling <isanbard@gmail.com>
Mon, 5 Aug 2013 23:43:18 +0000 (23:43 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 5 Aug 2013 23:43:18 +0000 (23:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187756 91177308-0d34-0410-b5e6-96231b3b80d8

13 files changed:
test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll
test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll
test/Analysis/ScalarEvolution/smax.ll
test/Analysis/ScalarEvolution/trip-count.ll
test/Analysis/ScalarEvolution/trip-count2.ll
test/Analysis/ScalarEvolution/trip-count3.ll
test/Analysis/ScalarEvolution/trip-count4.ll
test/Analysis/ScalarEvolution/trip-count6.ll
test/Analysis/ScalarEvolution/trip-count7.ll
test/Analysis/ScalarEvolution/trip-count8.ll
test/Analysis/ScalarEvolution/xor-and.ll
test/Analysis/ScalarEvolution/zext-wrap.ll
test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll

index e0c5583cbb97dfa6f78ccd4609cff671f92b2c5b..b5eb9fc4878df170068c694ab11793dc044725f4 100644 (file)
@@ -1,9 +1,10 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:   -scalar-evolution-max-iterations=0 | grep "Loop %bb: backedge-taken count is 100"
+; RUN: opt < %s -analyze -scalar-evolution -scalar-evolution-max-iterations=0 | FileCheck %s
 ; PR1533
 
 @array = weak global [101 x i32] zeroinitializer, align 32             ; <[100 x i32]*> [#uses=1]
 
+; CHECK: Loop %bb: backedge-taken count is 100
+
 define void @loop(i32 %x) {
 entry:
        br label %bb
index e946d7a64bc97734d61e413b2b77ff522c178e1f..2cb8c5bf46ffccc397a0180120fc0c6074fb77e8 100644 (file)
@@ -1,5 +1,4 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:   -scalar-evolution-max-iterations=0 | FileCheck %s
+; RUN: opt < %s -analyze -scalar-evolution -scalar-evolution-max-iterations=0 | FileCheck %s
 
 ; PR1101
 
index eceb4298fd50c5f6f5dd7dd26572405854090ddf..122e9e47e56f4035273cba7e7efd6eb8d9b67999 100644 (file)
@@ -1,8 +1,10 @@
-; RUN: opt < %s -analyze -scalar-evolution | grep smax | count 2
-; RUN: opt < %s -analyze -scalar-evolution | grep \
-; RUN:     "%. smax %. smax %."
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
 ; PR1614
 
+; CHECK: -->  (%a smax %b)
+; CHECK: -->  (%a smax %b smax %c)
+; CHECK-NOT: smax
+
 define i32 @x(i32 %a, i32 %b, i32 %c) {
   %A = icmp sgt i32 %a, %b
   %B = select i1 %A, i32 %a, i32 %b
index 94f6882c0c9149e60431fce8f3b72e6c3bbd2fcb..f89125aeb29b61870c41014fa45bb2b3ebd9dcf3 100644 (file)
@@ -1,9 +1,9 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:   -scalar-evolution-max-iterations=0 | grep "backedge-taken count is 10000"
+; RUN: opt < %s -analyze -scalar-evolution -scalar-evolution-max-iterations=0 | FileCheck %s
 ; PR1101
 
 @A = weak global [1000 x i32] zeroinitializer, align 32         
 
+; CHECK: backedge-taken count is 10000
 
 define void @test(i32 %N) {
 entry:
index d84e99f6e7ca9b865ba6b793baaf9ddbeabf6593..e76488abfca51ad293fc6b4942e1967047cedee2 100644 (file)
@@ -1,9 +1,9 @@
-; RUN: opt < %s -analyze -scalar-evolution | \
-; RUN:   grep "backedge-taken count is 4"
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
 ; PR1101
 
 @A = weak global [1000 x i32] zeroinitializer, align 32         
 
+; CHECK: backedge-taken count is 4
 
 define void @test(i32 %N) {
 entry:
index 0cb6c952b89395e428cbae2aeda873712062a830..32c51bfc451b88cb479563fa1f54e82f5ed5f236 100644 (file)
@@ -1,10 +1,11 @@
-; RUN: opt < %s -scalar-evolution -analyze \
-; RUN:  | grep "Loop %bb3\.i: Unpredictable backedge-taken count\."
+; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s
 
 ; ScalarEvolution can't compute a trip count because it doesn't know if
 ; dividing by the stride will have a remainder. This could theoretically
 ; be teaching it how to use a more elaborate trip count computation.
 
+; CHECK: Loop %bb3.i: Unpredictable backedge-taken count.
+
 %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] }
 %struct.SHA_INFO = type { [5 x i32], i32, i32, [16 x i32] }
 %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 }
index c02ae145268f5f2adb6c08b425f399e29839b487..b7184a48fe8549084ffe5e375eb543413709ee94 100644 (file)
@@ -1,8 +1,9 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:   | grep "sext.*trunc.*Exits: 11"
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
 
 ; ScalarEvolution should be able to compute a loop exit value for %indvar.i8.
 
+; CHECK: sext{{.*}}trunc{{.*}}Exits: 11
+
 define void @another_count_down_signed(double* %d, i64 %n) nounwind {
 entry:
        br label %loop
index 882f5526da4c00bbdd5a7e0adc6156a628950681..0f394a09d156e1b9068a468b4934c494a7a6b368 100644 (file)
@@ -1,8 +1,9 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:  | grep "max backedge-taken count is 1$"
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
 
 @mode_table = global [4 x i32] zeroinitializer          ; <[4 x i32]*> [#uses=1]
 
+; CHECK: max backedge-taken count is 1{{$}}
+
 define i8 @f() {
 entry:
   tail call i32 @fegetround( )          ; <i32>:0 [#uses=1]
index 2bcb9e92abcceb41c21d709fdcf20a9e65502062..d01a18a468f0f8105057277a762cc4d55ce2db8d 100644 (file)
@@ -1,8 +1,9 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:   | grep "Loop %bb7.i: Unpredictable backedge-taken count\."
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
 
+; CHECK: Loop %bb7.i: Unpredictable backedge-taken count.
+
        %struct.complex = type { float, float }
        %struct.element = type { i32, i32 }
        %struct.node = type { %struct.node*, %struct.node*, i32 }
index 005162b792127643b2e15032ba901e1e7155f323..a1777bc969c9d56ed7559804c98c1d3a15219ca7 100644 (file)
@@ -1,9 +1,10 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:  | grep "Loop %for\.body: backedge-taken count is (-1 + [%]ecx)"
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
 ; PR4599
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
 
+; CHECK: Loop %for.body: backedge-taken count is (-1 + {{%?}}ecx)
+
 define i32 @foo(i32 %ecx) nounwind {
 entry:
        %cmp2 = icmp eq i32 %ecx, 0             ; <i1> [#uses=1]
index 4ab2f39a2810af43cb8d1a9d6a490fd7039ad4f1..2616ea928a494bf583071cee1586fe50dd7d14a3 100644 (file)
@@ -1,9 +1,10 @@
-; RUN: opt < %s -scalar-evolution -analyze \
-; RUN:   | grep "\-->  (zext i4 (-8 + (trunc i64 (8 \* %x) to i4)) to i64)"
+; RUN: opt < %s -scalar-evolution -analyze | FileCheck %s
 
 ; ScalarEvolution shouldn't try to analyze %z into something like
 ;   -->  (zext i4 (-1 + (-1 * (trunc i64 (8 * %x) to i4))) to i64)
 
+; CHECK: -->  (zext i4 (-8 + (trunc i64 (8 * %x) to i4)) to i64)
+
 define i64 @foo(i64 %x) {
   %a = shl i64 %x, 3
   %t = and i64 %a, 8
index 38d15ffbd880e0e343edbfe3242effad5e892f97..104ed41010af0f70a40ee51476b6dd8e392532aa 100644 (file)
@@ -1,5 +1,4 @@
-; RUN: opt < %s -analyze -scalar-evolution \
-; RUN:  | FileCheck %s
+; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
 ; PR4569
 
 define i16 @main() nounwind {
index 3b5211e5999d102c3bb18514345a69f39031c694..bb66e3791fc0b0528e1348c517cb37b5cace14d0 100644 (file)
@@ -1,7 +1,9 @@
-; RUN: opt < %s -tbaa -basicaa -argpromotion -mem2reg -S | not grep alloca
+; RUN: opt < %s -tbaa -basicaa -argpromotion -mem2reg -S | FileCheck %s
 
 target datalayout = "E-p:64:64:64"
 
+; CHECK: test
+; CHECK-NOT: alloca
 define internal i32 @test(i32* %X, i32* %Y, i32* %Q) {
   store i32 77, i32* %Q, !tbaa !2
   %A = load i32* %X, !tbaa !1
@@ -10,6 +12,8 @@ define internal i32 @test(i32* %X, i32* %Y, i32* %Q) {
   ret i32 %C
 }
 
+; CHECK: caller
+; CHECK-NOT: alloca
 define internal i32 @caller(i32* %B, i32* %Q) {
   %A = alloca i32
   store i32 78, i32* %Q, !tbaa !2
@@ -18,6 +22,8 @@ define internal i32 @caller(i32* %B, i32* %Q) {
   ret i32 %C
 }
 
+; CHECK: callercaller
+; CHECK-NOT: alloca
 define i32 @callercaller(i32* %Q) {
   %B = alloca i32
   store i32 2, i32* %B, !tbaa !1