diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-08-05 23:43:18 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-08-05 23:43:18 +0000 |
commit | ac838d1c1443a19f693afadb19c8c6eeaa5d4b9b (patch) | |
tree | 5a85b9ae72697498b61e915ed4db6e5da5c70248 /test/Analysis/ScalarEvolution | |
parent | 51b6fb4469c941b7abd5641716c233fa52fc10ce (diff) | |
download | external_llvm-ac838d1c1443a19f693afadb19c8c6eeaa5d4b9b.zip external_llvm-ac838d1c1443a19f693afadb19c8c6eeaa5d4b9b.tar.gz external_llvm-ac838d1c1443a19f693afadb19c8c6eeaa5d4b9b.tar.bz2 |
FileCheckize some of the testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187756 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/ScalarEvolution')
-rw-r--r-- | test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll | 5 | ||||
-rw-r--r-- | test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll | 3 | ||||
-rw-r--r-- | test/Analysis/ScalarEvolution/smax.ll | 8 | ||||
-rw-r--r-- | test/Analysis/ScalarEvolution/trip-count.ll | 4 | ||||
-rw-r--r-- | test/Analysis/ScalarEvolution/trip-count2.ll | 4 | ||||
-rw-r--r-- | test/Analysis/ScalarEvolution/trip-count3.ll | 5 | ||||
-rw-r--r-- | test/Analysis/ScalarEvolution/trip-count4.ll | 5 | ||||
-rw-r--r-- | test/Analysis/ScalarEvolution/trip-count6.ll | 5 | ||||
-rw-r--r-- | test/Analysis/ScalarEvolution/trip-count7.ll | 5 | ||||
-rw-r--r-- | test/Analysis/ScalarEvolution/trip-count8.ll | 5 | ||||
-rw-r--r-- | test/Analysis/ScalarEvolution/xor-and.ll | 5 | ||||
-rw-r--r-- | test/Analysis/ScalarEvolution/zext-wrap.ll | 3 |
12 files changed, 32 insertions, 25 deletions
diff --git a/test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll b/test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll index e0c5583..b5eb9fc 100644 --- a/test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll +++ b/test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll @@ -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 diff --git a/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll b/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll index e946d7a..2cb8c5b 100644 --- a/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll +++ b/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll @@ -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 diff --git a/test/Analysis/ScalarEvolution/smax.ll b/test/Analysis/ScalarEvolution/smax.ll index eceb429..122e9e4 100644 --- a/test/Analysis/ScalarEvolution/smax.ll +++ b/test/Analysis/ScalarEvolution/smax.ll @@ -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 diff --git a/test/Analysis/ScalarEvolution/trip-count.ll b/test/Analysis/ScalarEvolution/trip-count.ll index 94f6882..f89125a 100644 --- a/test/Analysis/ScalarEvolution/trip-count.ll +++ b/test/Analysis/ScalarEvolution/trip-count.ll @@ -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: diff --git a/test/Analysis/ScalarEvolution/trip-count2.ll b/test/Analysis/ScalarEvolution/trip-count2.ll index d84e99f..e76488a 100644 --- a/test/Analysis/ScalarEvolution/trip-count2.ll +++ b/test/Analysis/ScalarEvolution/trip-count2.ll @@ -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: diff --git a/test/Analysis/ScalarEvolution/trip-count3.ll b/test/Analysis/ScalarEvolution/trip-count3.ll index 0cb6c95..32c51bf 100644 --- a/test/Analysis/ScalarEvolution/trip-count3.ll +++ b/test/Analysis/ScalarEvolution/trip-count3.ll @@ -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 } diff --git a/test/Analysis/ScalarEvolution/trip-count4.ll b/test/Analysis/ScalarEvolution/trip-count4.ll index c02ae14..b7184a4 100644 --- a/test/Analysis/ScalarEvolution/trip-count4.ll +++ b/test/Analysis/ScalarEvolution/trip-count4.ll @@ -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 diff --git a/test/Analysis/ScalarEvolution/trip-count6.ll b/test/Analysis/ScalarEvolution/trip-count6.ll index 882f552..0f394a0 100644 --- a/test/Analysis/ScalarEvolution/trip-count6.ll +++ b/test/Analysis/ScalarEvolution/trip-count6.ll @@ -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] diff --git a/test/Analysis/ScalarEvolution/trip-count7.ll b/test/Analysis/ScalarEvolution/trip-count7.ll index 2bcb9e9..d01a18a 100644 --- a/test/Analysis/ScalarEvolution/trip-count7.ll +++ b/test/Analysis/ScalarEvolution/trip-count7.ll @@ -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 } diff --git a/test/Analysis/ScalarEvolution/trip-count8.ll b/test/Analysis/ScalarEvolution/trip-count8.ll index 005162b..a1777bc 100644 --- a/test/Analysis/ScalarEvolution/trip-count8.ll +++ b/test/Analysis/ScalarEvolution/trip-count8.ll @@ -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] diff --git a/test/Analysis/ScalarEvolution/xor-and.ll b/test/Analysis/ScalarEvolution/xor-and.ll index 4ab2f39..2616ea9 100644 --- a/test/Analysis/ScalarEvolution/xor-and.ll +++ b/test/Analysis/ScalarEvolution/xor-and.ll @@ -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 diff --git a/test/Analysis/ScalarEvolution/zext-wrap.ll b/test/Analysis/ScalarEvolution/zext-wrap.ll index 38d15ff..104ed41 100644 --- a/test/Analysis/ScalarEvolution/zext-wrap.ll +++ b/test/Analysis/ScalarEvolution/zext-wrap.ll @@ -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 { |