FileCheckize some of the testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187756 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2013-08-05 23:43:18 +00:00
parent 51b6fb4469
commit ac838d1c14
13 changed files with 39 additions and 26 deletions

View 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

View 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

View 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

View 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:

View 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:

View 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 }

View 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

View 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]

View 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 }

View 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]

View 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

View 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 {

View 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