diff options
Diffstat (limited to 'test/Analysis')
104 files changed, 460 insertions, 200 deletions
diff --git a/test/Analysis/BasicAA/2003-02-26-AccessSizeTest.ll b/test/Analysis/BasicAA/2003-02-26-AccessSizeTest.ll index 1c2d910..45f6088 100644 --- a/test/Analysis/BasicAA/2003-02-26-AccessSizeTest.ll +++ b/test/Analysis/BasicAA/2003-02-26-AccessSizeTest.ll @@ -2,17 +2,19 @@ ; is performed. It is not legal to delete the second load instruction because ; the value computed by the first load instruction is changed by the store. -; RUN: opt < %s -basicaa -gvn -instcombine -S | grep DONOTREMOVE +; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s define i32 @test() { - %A = alloca i32 - store i32 0, i32* %A - %X = load i32* %A - %B = bitcast i32* %A to i8* - %C = getelementptr i8* %B, i64 1 - store i8 1, i8* %C ; Aliases %A - %Y.DONOTREMOVE = load i32* %A - %Z = sub i32 %X, %Y.DONOTREMOVE - ret i32 %Z +; CHECK: %Y.DONOTREMOVE = load i32* %A +; CHECK: %Z = sub i32 0, %Y.DONOTREMOVE + %A = alloca i32 + store i32 0, i32* %A + %X = load i32* %A + %B = bitcast i32* %A to i8* + %C = getelementptr i8* %B, i64 1 + store i8 1, i8* %C ; Aliases %A + %Y.DONOTREMOVE = load i32* %A + %Z = sub i32 %X, %Y.DONOTREMOVE + ret i32 %Z } diff --git a/test/Analysis/BasicAA/2003-04-22-GEPProblem.ll b/test/Analysis/BasicAA/2003-04-22-GEPProblem.ll index 5d20077..78f74a0 100644 --- a/test/Analysis/BasicAA/2003-04-22-GEPProblem.ll +++ b/test/Analysis/BasicAA/2003-04-22-GEPProblem.ll @@ -1,15 +1,14 @@ -; RUN: opt < %s -basicaa -gvn -instcombine -S | grep sub +; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s ; BasicAA was incorrectly concluding that P1 and P2 didn't conflict! define i32 @test(i32 *%Ptr, i64 %V) { - %P2 = getelementptr i32* %Ptr, i64 1 - %P1 = getelementptr i32* %Ptr, i64 %V - %X = load i32* %P1 - store i32 5, i32* %P2 - - %Y = load i32* %P1 - - %Z = sub i32 %X, %Y - ret i32 %Z +; CHECK: sub i32 %X, %Y + %P2 = getelementptr i32* %Ptr, i64 1 + %P1 = getelementptr i32* %Ptr, i64 %V + %X = load i32* %P1 + store i32 5, i32* %P2 + %Y = load i32* %P1 + %Z = sub i32 %X, %Y + ret i32 %Z } diff --git a/test/Analysis/BasicAA/2003-09-19-LocalArgument.ll b/test/Analysis/BasicAA/2003-09-19-LocalArgument.ll index 56e3339..fd4c239 100644 --- a/test/Analysis/BasicAA/2003-09-19-LocalArgument.ll +++ b/test/Analysis/BasicAA/2003-09-19-LocalArgument.ll @@ -1,6 +1,9 @@ ; In this test, a local alloca cannot alias an incoming argument. -; RUN: opt < %s -basicaa -gvn -instcombine -S | not grep sub +; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s + +; CHECK: define i32 @test +; CHECK-NEXT: ret i32 0 define i32 @test(i32* %P) { %X = alloca i32 diff --git a/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll b/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll index 010a4588..768411e 100644 --- a/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll +++ b/test/Analysis/BasicAA/2003-11-04-SimpleCases.ll @@ -1,11 +1,13 @@ ; This testcase consists of alias relations which should be completely ; resolvable by basicaa. -; RUN: opt < %s -basicaa -aa-eval -print-may-aliases -disable-output \ -; RUN: |& not grep May: +; RUN: opt < %s -basicaa -aa-eval -print-may-aliases -disable-output 2>&1 | FileCheck %s %T = type { i32, [10 x i8] } +; CHECK: Function: test +; CHECK-NOT: May: + define void @test(%T* %P) { %A = getelementptr %T* %P, i64 0 %B = getelementptr %T* %P, i64 0, i32 0 diff --git a/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll b/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll index ce01db6..b7bbf77 100644 --- a/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll +++ b/test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll @@ -1,13 +1,15 @@ ; This testcase consists of alias relations which should be completely ; resolvable by basicaa, but require analysis of getelementptr constant exprs. -; RUN: opt < %s -basicaa -aa-eval -print-may-aliases -disable-output \ -; RUN: |& not grep May: +; RUN: opt < %s -basicaa -aa-eval -print-may-aliases -disable-output 2>&1 | FileCheck %s %T = type { i32, [10 x i8] } @G = external global %T +; CHECK: Function: test +; CHECK-NOT: May: + define void @test() { %D = getelementptr %T* @G, i64 0, i32 0 %E = getelementptr %T* @G, i64 0, i32 1, i64 5 diff --git a/test/Analysis/BasicAA/2004-07-28-MustAliasbug.ll b/test/Analysis/BasicAA/2004-07-28-MustAliasbug.ll index 56e4ed0..578aa594 100644 --- a/test/Analysis/BasicAA/2004-07-28-MustAliasbug.ll +++ b/test/Analysis/BasicAA/2004-07-28-MustAliasbug.ll @@ -1,10 +1,11 @@ -; RUN: opt < %s -basicaa -dse -S | grep {store i32 0} +; RUN: opt < %s -basicaa -dse -S | FileCheck %s define void @test({i32,i32 }* %P) { - %Q = getelementptr {i32,i32}* %P, i32 1 - %X = getelementptr {i32,i32}* %Q, i32 0, i32 1 - %Y = getelementptr {i32,i32}* %Q, i32 1, i32 1 - store i32 0, i32* %X - store i32 1, i32* %Y - ret void +; CHECK: store i32 0, i32* %X + %Q = getelementptr {i32,i32}* %P, i32 1 + %X = getelementptr {i32,i32}* %Q, i32 0, i32 1 + %Y = getelementptr {i32,i32}* %Q, i32 1, i32 1 + store i32 0, i32* %X + store i32 1, i32* %Y + ret void } diff --git a/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll b/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll index 8320594..06a804c 100644 --- a/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll +++ b/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll @@ -1,7 +1,9 @@ -; RUN: opt < %s -basicaa -aa-eval -disable-output |& grep {2 no alias respon} +; RUN: opt < %s -basicaa -aa-eval -disable-output 2>&1 | FileCheck %s ; TEST that A[1][0] may alias A[0][i]. 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" +; CHECK: 2 no alias responses + define void @test(i32 %N) { entry: %X = alloca [3 x [3 x i32]] ; <[3 x [3 x i32]]*> [#uses=4] diff --git a/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll b/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll index 917bf25..46b6aaf 100644 --- a/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll +++ b/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll @@ -1,9 +1,5 @@ +; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s ; PR1109 -; RUN: opt < %s -basicaa -gvn -instcombine -S | \ -; RUN: grep {sub i32} -; RUN: opt < %s -basicaa -gvn -instcombine -S | \ -; RUN: not grep {ret i32 0} -; END. target datalayout = "e-p:32:32" target triple = "i686-apple-darwin8" @@ -20,6 +16,9 @@ target triple = "i686-apple-darwin8" %struct.head_type = type { [2 x %struct.LIST], %struct.FIRST_UNION, %struct.SECOND_UNION, %struct.THIRD_UNION, %struct.FOURTH_UNION, %struct.rec*, { %struct.rec* }, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, i32 } %struct.rec = type { %struct.head_type } +; CHECK: define i32 @test +; CHECK: %Z = sub i32 %A, %Q +; CHECK: ret i32 %Z define i32 @test(%struct.closure_type* %tmp18169) { %tmp18174 = getelementptr %struct.closure_type* %tmp18169, i32 0, i32 4, i32 0, i32 0 ; <i32*> [#uses=2] diff --git a/test/Analysis/BasicAA/2007-08-01-NoAliasAndCalls.ll b/test/Analysis/BasicAA/2007-08-01-NoAliasAndCalls.ll index e6a26e3..2a6f5b9 100644 --- a/test/Analysis/BasicAA/2007-08-01-NoAliasAndCalls.ll +++ b/test/Analysis/BasicAA/2007-08-01-NoAliasAndCalls.ll @@ -1,6 +1,7 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {MayAlias:.*i32\\* %., i32\\* %.} | grep {%x} | grep {%y} +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s -declare i32* @unclear(i32* %a) +; CHECK: Function: foo +; CHECK: MayAlias: i32* %x, i32* %y define void @foo(i32* noalias %x) { %y = call i32* @unclear(i32* %x) @@ -8,3 +9,5 @@ define void @foo(i32* noalias %x) { store i32 0, i32* %y ret void } + +declare i32* @unclear(i32* %a) diff --git a/test/Analysis/BasicAA/2007-08-01-NoAliasAndGEP.ll b/test/Analysis/BasicAA/2007-08-01-NoAliasAndGEP.ll index 7f33fa4..4be793e 100644 --- a/test/Analysis/BasicAA/2007-08-01-NoAliasAndGEP.ll +++ b/test/Analysis/BasicAA/2007-08-01-NoAliasAndGEP.ll @@ -1,6 +1,9 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {9 no alias} -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {6 may alias} -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {MayAlias:.*i32\\* %Ipointer, i32\\* %Jpointer} +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s + +; CHECK: Function: foo +; CHECK: MayAlias: i32* %Ipointer, i32* %Jpointer +; CHECK: 9 no alias responses +; CHECK: 6 may alias responses define void @foo(i32* noalias %p, i32* noalias %q, i32 %i, i32 %j) { %Ipointer = getelementptr i32* %p, i32 %i diff --git a/test/Analysis/BasicAA/2007-08-05-GetOverloadedModRef.ll b/test/Analysis/BasicAA/2007-08-05-GetOverloadedModRef.ll index 5b81c17..ec0e2bd 100644 --- a/test/Analysis/BasicAA/2007-08-05-GetOverloadedModRef.ll +++ b/test/Analysis/BasicAA/2007-08-05-GetOverloadedModRef.ll @@ -1,11 +1,10 @@ +; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s ; PR1600 -; RUN: opt < %s -basicaa -gvn -instcombine -S | \ -; RUN: grep {ret i32 0} -; END. declare i16 @llvm.cttz.i16(i16, i1) define i32 @test(i32* %P, i16* %Q) { +; CHECK: ret i32 0 %A = load i16* %Q ; <i16> [#uses=1] %x = load i32* %P ; <i32> [#uses=1] %B = call i16 @llvm.cttz.i16( i16 %A, i1 true ) ; <i16> [#uses=1] diff --git a/test/Analysis/BasicAA/2007-10-24-ArgumentsGlobals.ll b/test/Analysis/BasicAA/2007-10-24-ArgumentsGlobals.ll index 78f24b5..429160e 100644 --- a/test/Analysis/BasicAA/2007-10-24-ArgumentsGlobals.ll +++ b/test/Analysis/BasicAA/2007-10-24-ArgumentsGlobals.ll @@ -1,10 +1,12 @@ -; RUN: opt < %s -basicaa -gvn -dce -S | grep tmp7 +; RUN: opt < %s -basicaa -gvn -dce -S | FileCheck %s %struct.A = type { i32 } %struct.B = type { %struct.A } @a = global %struct.B zeroinitializer ; <%struct.B*> [#uses=2] define i32 @_Z3fooP1A(%struct.A* %b) { +; CHECK: %tmp7 = load +; CHECK: ret i32 %tmp7 entry: store i32 1, i32* getelementptr (%struct.B* @a, i32 0, i32 0, i32 0), align 8 %tmp4 = getelementptr %struct.A* %b, i32 0, i32 0 ;<i32*> [#uses=1] diff --git a/test/Analysis/BasicAA/2008-04-15-Byval.ll b/test/Analysis/BasicAA/2008-04-15-Byval.ll index 2069401..428189a 100644 --- a/test/Analysis/BasicAA/2008-04-15-Byval.ll +++ b/test/Analysis/BasicAA/2008-04-15-Byval.ll @@ -1,10 +1,11 @@ -; RUN: opt < %s -std-compile-opts -S | grep store +; RUN: opt < %s -std-compile-opts -S | FileCheck %s ; ModuleID = 'small2.c' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "i386-apple-darwin8" %struct.x = type { [4 x i32] } define void @foo(%struct.x* byval align 4 %X) nounwind { +; CHECK: store i32 2, i32* %tmp1 entry: %tmp = getelementptr %struct.x* %X, i32 0, i32 0 ; <[4 x i32]*> [#uses=1] %tmp1 = getelementptr [4 x i32]* %tmp, i32 0, i32 3 ; <i32*> [#uses=1] diff --git a/test/Analysis/BasicAA/2008-11-23-NoaliasRet.ll b/test/Analysis/BasicAA/2008-11-23-NoaliasRet.ll index c9e553d..3db9a3f 100644 --- a/test/Analysis/BasicAA/2008-11-23-NoaliasRet.ll +++ b/test/Analysis/BasicAA/2008-11-23-NoaliasRet.ll @@ -1,7 +1,9 @@ -; RUN: opt < %s -basicaa -aa-eval |& grep {1 no alias response} +; RUN: opt < %s -basicaa -aa-eval -disable-output 2>&1 | FileCheck %s declare noalias i32* @_Znwj(i32 %x) nounwind +; CHECK: 1 no alias response + define i32 @foo() { %A = call i32* @_Znwj(i32 4) %B = call i32* @_Znwj(i32 4) diff --git a/test/Analysis/BasicAA/2009-03-04-GEPNoalias.ll b/test/Analysis/BasicAA/2009-03-04-GEPNoalias.ll index 3ab5d03..add7dee 100644 --- a/test/Analysis/BasicAA/2009-03-04-GEPNoalias.ll +++ b/test/Analysis/BasicAA/2009-03-04-GEPNoalias.ll @@ -1,8 +1,9 @@ -; RUN: opt < %s -basicaa -gvn -S | grep load +; RUN: opt < %s -basicaa -gvn -S | FileCheck %s declare noalias i32* @noalias() define i32 @test(i32 %x) { +; CHECK: load i32* %a %a = call i32* @noalias() store i32 1, i32* %a %b = getelementptr i32* %a, i32 %x diff --git a/test/Analysis/BasicAA/2009-10-13-GEP-BaseNoAlias.ll b/test/Analysis/BasicAA/2009-10-13-GEP-BaseNoAlias.ll index 17db2fd..c546d68 100644 --- a/test/Analysis/BasicAA/2009-10-13-GEP-BaseNoAlias.ll +++ b/test/Analysis/BasicAA/2009-10-13-GEP-BaseNoAlias.ll @@ -1,10 +1,13 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {NoAlias:.*%P,.*@Z} +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s ; If GEP base doesn't alias Z, then GEP doesn't alias Z. ; rdar://7282591 @Y = common global i32 0 @Z = common global i32 0 +; CHECK: Function: foo +; CHECK: NoAlias: i32* %P, i32* @Z + define void @foo(i32 %cond) nounwind { entry: %a = alloca i32 diff --git a/test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll b/test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll index 7b5584e..6656980 100644 --- a/test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll +++ b/test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll @@ -1,8 +1,10 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {1 partial alias} +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s ; PR7959 target datalayout = "e-p:32:32:32" +; CHECK: 1 partial alias response + define i32 @test(i32* %tab, i32 %indvar) nounwind { %tmp31 = mul i32 %indvar, -2 %tmp32 = add i32 %tmp31, 30 diff --git a/test/Analysis/BasicAA/args-rets-allocas-loads.ll b/test/Analysis/BasicAA/args-rets-allocas-loads.ll index c7b43ec..066f46b 100644 --- a/test/Analysis/BasicAA/args-rets-allocas-loads.ll +++ b/test/Analysis/BasicAA/args-rets-allocas-loads.ll @@ -1,4 +1,4 @@ -; RUN: opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output < %s |& FileCheck %s +; RUN: opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output < %s 2>&1 | FileCheck %s declare void @callee(double* %callee_arg) declare void @nocap_callee(double* nocapture %nocap_callee_arg) diff --git a/test/Analysis/BasicAA/byval.ll b/test/Analysis/BasicAA/byval.ll index 2aba753..673fee0 100644 --- a/test/Analysis/BasicAA/byval.ll +++ b/test/Analysis/BasicAA/byval.ll @@ -1,17 +1,17 @@ -; RUN: opt < %s -basicaa -gvn -S | grep {ret i32 1} +; RUN: opt < %s -basicaa -gvn -S | FileCheck %s target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "i686-apple-darwin8" %struct.x = type { i32, i32, i32, i32 } @g = weak global i32 0 ; <i32*> [#uses=1] define i32 @foo(%struct.x* byval %a) nounwind { -entry: - %tmp1 = tail call i32 (...)* @bar( %struct.x* %a ) nounwind ; <i32> [#uses=0] - %tmp2 = getelementptr %struct.x* %a, i32 0, i32 0 ; <i32*> [#uses=2] - store i32 1, i32* %tmp2, align 4 - store i32 2, i32* @g, align 4 - %tmp4 = load i32* %tmp2, align 4 ; <i32> [#uses=1] - ret i32 %tmp4 +; CHECK: ret i32 1 + %tmp1 = tail call i32 (...)* @bar( %struct.x* %a ) nounwind ; <i32> [#uses=0] + %tmp2 = getelementptr %struct.x* %a, i32 0, i32 0 ; <i32*> [#uses=2] + store i32 1, i32* %tmp2, align 4 + store i32 2, i32* @g, align 4 + %tmp4 = load i32* %tmp2, align 4 ; <i32> [#uses=1] + ret i32 %tmp4 } declare i32 @bar(...) diff --git a/test/Analysis/BasicAA/cas.ll b/test/Analysis/BasicAA/cas.ll index 754309c..d0cd9f4 100644 --- a/test/Analysis/BasicAA/cas.ll +++ b/test/Analysis/BasicAA/cas.ll @@ -1,8 +1,9 @@ -; RUN: opt < %s -basicaa -gvn -instcombine -S | grep {ret i32 0} +; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s @flag0 = internal global i32 zeroinitializer @turn = internal global i32 zeroinitializer +; CHECK: ret i32 0 define i32 @main() { %a = load i32* @flag0 diff --git a/test/Analysis/BasicAA/constant-over-index.ll b/test/Analysis/BasicAA/constant-over-index.ll index 48ef259..232533c 100644 --- a/test/Analysis/BasicAA/constant-over-index.ll +++ b/test/Analysis/BasicAA/constant-over-index.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info |& FileCheck %s +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info 2>&1 | FileCheck %s ; PR4267 ; CHECK: MayAlias: double* %p.0.i.0, double* %p3 diff --git a/test/Analysis/BasicAA/dag.ll b/test/Analysis/BasicAA/dag.ll index 501f4c3..1d2f6f1 100644 --- a/test/Analysis/BasicAA/dag.ll +++ b/test/Analysis/BasicAA/dag.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info |& FileCheck %s +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info 2>&1 | 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-n8:16:32:64" diff --git a/test/Analysis/BasicAA/empty.ll b/test/Analysis/BasicAA/empty.ll index 7b06780..dfc79f9 100644 --- a/test/Analysis/BasicAA/empty.ll +++ b/test/Analysis/BasicAA/empty.ll @@ -1,8 +1,10 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output \ -; RUN: |& grep {NoAlias: \{\}\\* \[%\]p, \{\}\\* \[%\]q} +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | 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-n8:16:32:64" +; CHECK: Function: foo: +; CHECK-NEXT: NoAlias: {}* %p, {}* %q + define void @foo({}* %p, {}* %q) { store {} {}, {}* %p store {} {}, {}* %q diff --git a/test/Analysis/BasicAA/full-store-partial-alias.ll b/test/Analysis/BasicAA/full-store-partial-alias.ll index 4fa6375..2c34fd5 100644 --- a/test/Analysis/BasicAA/full-store-partial-alias.ll +++ b/test/Analysis/BasicAA/full-store-partial-alias.ll @@ -1,5 +1,5 @@ -; RUN: opt -S -tbaa -basicaa -gvn < %s | grep {ret i32 %} -; RUN: opt -S -tbaa -gvn < %s | grep {ret i32 0} +; RUN: opt -S -tbaa -basicaa -gvn < %s | FileCheck -check-prefix=BASICAA %s +; RUN: opt -S -tbaa -gvn < %s | FileCheck %s ; rdar://8875631, rdar://8875069 ; BasicAA should notice that the store stores to the entire %u object, @@ -14,6 +14,8 @@ target datalayout = "e-p:64:64:64" @endianness_test = global i64 1, align 8 define i32 @signbit(double %x) nounwind { +; BASICAA: ret i32 %tmp5.lobit +; CHECK: ret i32 0 entry: %u = alloca %union.anon, align 8 %tmp9 = getelementptr inbounds %union.anon* %u, i64 0, i32 0 diff --git a/test/Analysis/BasicAA/gcsetest.ll b/test/Analysis/BasicAA/gcsetest.ll index a903362..db557b7 100644 --- a/test/Analysis/BasicAA/gcsetest.ll +++ b/test/Analysis/BasicAA/gcsetest.ll @@ -2,12 +2,15 @@ ; disambiguating some obvious cases. All loads should be removable in ; this testcase. -; RUN: opt < %s -basicaa -gvn -instcombine -dce -S \ -; RUN: | not grep load +; RUN: opt < %s -basicaa -gvn -instcombine -dce -S | FileCheck %s @A = global i32 7 @B = global i32 8 +; CHECK: define i32 @test() +; CHECK-NEXT: store i32 123, i32* @B +; CHECK-NEXT: ret i32 0 + define i32 @test() { %A1 = load i32* @A @@ -18,6 +21,14 @@ define i32 @test() { ret i32 %X } +; CHECK: define i32 @test2() +; CHECK-NEXT: br label %Loop +; CHECK: Loop: +; CHECK-NEXT: store i32 0, i32* @B +; CHECK-NEXT: br i1 true, label %out, label %Loop +; CHECK: out: +; CHECK-NEXT: ret i32 0 + define i32 @test2() { %A1 = load i32* @A br label %Loop @@ -36,6 +47,10 @@ out: declare void @external() +; CHECK: define i32 @test3() +; CHECK-NEXT: call void @external() +; CHECK-NEXT: ret i32 7 + define i32 @test3() { %X = alloca i32 store i32 7, i32* %X diff --git a/test/Analysis/BasicAA/gep-alias.ll b/test/Analysis/BasicAA/gep-alias.ll index 4bb2832..9c2c7ee 100644 --- a/test/Analysis/BasicAA/gep-alias.ll +++ b/test/Analysis/BasicAA/gep-alias.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basicaa -gvn -instcombine -S |& FileCheck %s +; RUN: opt < %s -basicaa -gvn -instcombine -S 2>&1 | FileCheck %s target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" diff --git a/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll b/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll index ebd349a..f0f1a63 100644 --- a/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll +++ b/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& FileCheck %s +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s ; CHECK: Just Ref: call void @ro() <-> call void @f0() diff --git a/test/Analysis/BasicAA/must-and-partial.ll b/test/Analysis/BasicAA/must-and-partial.ll index 93b6184..58139ff 100644 --- a/test/Analysis/BasicAA/must-and-partial.ll +++ b/test/Analysis/BasicAA/must-and-partial.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info |& FileCheck %s +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info 2>&1 | FileCheck %s ; When merging MustAlias and PartialAlias, merge to PartialAlias ; instead of MayAlias. diff --git a/test/Analysis/BasicAA/no-escape-call.ll b/test/Analysis/BasicAA/no-escape-call.ll index ccabce9..b93db6e 100644 --- a/test/Analysis/BasicAA/no-escape-call.ll +++ b/test/Analysis/BasicAA/no-escape-call.ll @@ -1,9 +1,10 @@ -; RUN: opt < %s -basicaa -gvn -instcombine -S | grep {ret i1 true} +; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s ; PR2436 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "i386-apple-darwin8" define i1 @foo(i32 %i) nounwind { +; CHECK: ret i1 true entry: %arr = alloca [10 x i8*] ; <[10 x i8*]*> [#uses=1] %tmp2 = call i8* @getPtr( ) nounwind ; <i8*> [#uses=2] diff --git a/test/Analysis/BasicAA/nocapture.ll b/test/Analysis/BasicAA/nocapture.ll index 7970fbb..a8658ec 100644 --- a/test/Analysis/BasicAA/nocapture.ll +++ b/test/Analysis/BasicAA/nocapture.ll @@ -1,8 +1,9 @@ -; RUN: opt < %s -basicaa -gvn -instcombine -S | grep {ret i32 0} +; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s declare i32* @test(i32* nocapture) define i32 @test2() { +; CHECK: ret i32 0 %P = alloca i32 %Q = call i32* @test(i32* %P) %a = load i32* %P diff --git a/test/Analysis/BasicAA/phi-aa.ll b/test/Analysis/BasicAA/phi-aa.ll index 50fd5cd..6aa26c1 100644 --- a/test/Analysis/BasicAA/phi-aa.ll +++ b/test/Analysis/BasicAA/phi-aa.ll @@ -1,10 +1,12 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {NoAlias:.*%P,.*@Z} +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s ; rdar://7282591 @X = common global i32 0 @Y = common global i32 0 @Z = common global i32 0 +; CHECK: NoAlias: i32* %P, i32* @Z + define void @foo(i32 %cond) nounwind { entry: %"alloca point" = bitcast i32 0 to i32 diff --git a/test/Analysis/BasicAA/phi-and-select.ll b/test/Analysis/BasicAA/phi-and-select.ll index 0ed4a2c..b8fee00 100644 --- a/test/Analysis/BasicAA/phi-and-select.ll +++ b/test/Analysis/BasicAA/phi-and-select.ll @@ -1,8 +1,17 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output \ -; RUN: |& grep {NoAlias: double\\* \[%\]a, double\\* \[%\]b\$} | count 4 +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s ; BasicAA should detect NoAliases in PHIs and Selects. +; CHECK: Function: foo +; CHECK: NoAlias: double* %a, double* %b +; CHECK: Function: bar +; CHECK: NoAlias: double* %a, double* %b +; CHECK: Function: qux +; CHECK: NoAlias: double* %a, double* %b +; CHECK: Function: fin +; CHECK: NoAlias: double* %a, double* %b +; CHECK: ===== Alias Analysis Evaluator Report ===== + ; Two PHIs in the same block. define void @foo(i1 %m, double* noalias %x, double* noalias %y) { entry: diff --git a/test/Analysis/BasicAA/pure-const-dce.ll b/test/Analysis/BasicAA/pure-const-dce.ll index 54e6e79..266e607 100644 --- a/test/Analysis/BasicAA/pure-const-dce.ll +++ b/test/Analysis/BasicAA/pure-const-dce.ll @@ -1,7 +1,25 @@ -; RUN: opt < %s -basicaa -gvn -S | grep TestConst | count 2 -; RUN: opt < %s -basicaa -gvn -S | grep TestPure | count 3 -; RUN: opt < %s -basicaa -gvn -S | grep TestNone | count 4 -@g = global i32 0 ; <i32*> [#uses=1] +; RUN: opt < %s -basicaa -gvn -S | FileCheck %s + +@g = global i32 0 + +; CHECK: @test +; CHECK: entry +; CHECK: %tmp0 = call i32 @TestConst(i32 5) readnone +; CHECK-NEXT: %tmp1 = call i32 @TestPure(i32 6) readonly +; CHECK-NEXT: %tmp2 = call i32 @TestNone(i32 7) +; CHECK-NEXT: store i32 1, i32* @g +; CHECK-NEXT: %tmp5 = call i32 @TestPure(i32 6) readonly +; CHECK-NEXT: %tmp7 = call i32 @TestNone(i32 7) +; CHECK-NEXT: %tmp8 = call i32 @TestNone(i32 7) +; CHECK-NEXT: %sum0 = add i32 %tmp0, %tmp1 +; CHECK-NEXT: %sum1 = add i32 %sum0, %tmp2 +; CHECK-NEXT: %sum2 = add i32 %sum1, %tmp0 +; CHECK-NEXT: %sum3 = add i32 %sum2, %tmp0 +; CHECK-NEXT: %sum4 = add i32 %sum3, %tmp5 +; CHECK-NEXT: %sum5 = add i32 %sum4, %tmp5 +; CHECK-NEXT: %sum6 = add i32 %sum5, %tmp7 +; CHECK-NEXT: %sum7 = add i32 %sum6, %tmp8 +; CHECK-NEXT: ret i32 %sum7 define i32 @test() { entry: diff --git a/test/Analysis/BasicAA/tailcall-modref.ll b/test/Analysis/BasicAA/tailcall-modref.ll index f7d6c57..ebeb28c 100644 --- a/test/Analysis/BasicAA/tailcall-modref.ll +++ b/test/Analysis/BasicAA/tailcall-modref.ll @@ -1,11 +1,7 @@ -; RUN: opt < %s -basicaa -gvn -instcombine |\ -; RUN: llvm-dis | grep {ret i32 0} - -declare void @foo(i32*) - -declare void @bar() +; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s define i32 @test() { +; CHECK: ret i32 0 %A = alloca i32 ; <i32*> [#uses=3] call void @foo( i32* %A ) %X = load i32* %A ; <i32> [#uses=1] @@ -14,3 +10,7 @@ define i32 @test() { %Z = sub i32 %X, %Y ; <i32> [#uses=1] ret i32 %Z } + +declare void @foo(i32*) + +declare void @bar() diff --git a/test/Analysis/CallGraph/2008-09-09-DirectCall.ll b/test/Analysis/CallGraph/2008-09-09-DirectCall.ll index 784d6c7..595cc42 100644 --- a/test/Analysis/CallGraph/2008-09-09-DirectCall.ll +++ b/test/Analysis/CallGraph/2008-09-09-DirectCall.ll @@ -1,5 +1,9 @@ -; RUN: opt < %s -print-callgraph -disable-output |& \ -; RUN: grep {calls function 'callee'} | count 2 +; RUN: opt < %s -print-callgraph -disable-output 2>&1 | FileCheck %s + +; CHECK: Call graph node <<null function>> +; CHECK: CS<{{.*}}> calls function 'callee' +; CHECK: Call graph node for function: 'caller' +; CHECK: CS<{{.*}}> calls function 'callee' define internal void @callee(...) { entry: diff --git a/test/Analysis/CallGraph/2008-09-09-UsedByGlobal.ll b/test/Analysis/CallGraph/2008-09-09-UsedByGlobal.ll index 0c5ef92..ac95188 100644 --- a/test/Analysis/CallGraph/2008-09-09-UsedByGlobal.ll +++ b/test/Analysis/CallGraph/2008-09-09-UsedByGlobal.ll @@ -1,7 +1,9 @@ -; RUN: opt < %s -print-callgraph -disable-output |& grep {calls function} +; RUN: opt < %s -print-callgraph -disable-output 2>&1 | FileCheck %s @a = global void ()* @f ; <void ()**> [#uses=0] +; CHECK: calls function 'f' + define internal void @f() { unreachable } diff --git a/test/Analysis/CallGraph/no-intrinsics.ll b/test/Analysis/CallGraph/no-intrinsics.ll index 272a559..450dce5 100644 --- a/test/Analysis/CallGraph/no-intrinsics.ll +++ b/test/Analysis/CallGraph/no-intrinsics.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -print-callgraph -disable-output |& FileCheck %s +; RUN: opt < %s -print-callgraph -disable-output 2>&1 | FileCheck %s ; Check that intrinsics aren't added to the call graph diff --git a/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll b/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll index e31f416..45efc42 100644 --- a/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll +++ b/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll @@ -1,7 +1,8 @@ -; RUN: opt < %s -domtree -break-crit-edges -analyze \ -; RUN: -domtree | grep {3.*%brtrue } +; RUN: opt < %s -domtree -break-crit-edges -analyze -domtree | FileCheck %s ; PR932 +; CHECK: [3] %brtrue {1,2} + declare void @use1(i32) define void @f(i32 %i, i1 %c) { diff --git a/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll b/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll index 17ace8a..d51c159 100644 --- a/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll +++ b/test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -globalsmodref-aa -gvn -S | grep call | count 2 +; RUN: opt < %s -globalsmodref-aa -gvn -S | FileCheck %s @g = internal global i32 0 ; <i32*> [#uses=2] @@ -8,6 +8,8 @@ define i32 @r() { } define i32 @f() { +; CHECK: call i32 @e() +; CHECK: call i32 @e() entry: %tmp = call i32 @e( ) ; <i32> [#uses=1] store i32 %tmp, i32* @g diff --git a/test/Analysis/GlobalsModRef/aliastest.ll b/test/Analysis/GlobalsModRef/aliastest.ll index 75af4dc..4cfed71 100644 --- a/test/Analysis/GlobalsModRef/aliastest.ll +++ b/test/Analysis/GlobalsModRef/aliastest.ll @@ -1,7 +1,12 @@ -; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | not grep load +; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | FileCheck %s + @X = internal global i32 4 ; <i32*> [#uses=1] define i32 @test(i32* %P) { +; CHECK: @test +; CHECK-NEXT: store i32 7, i32* %P +; CHECK-NEXT: store i32 12, i32* @X +; CHECK-NEXT: ret i32 7 store i32 7, i32* %P store i32 12, i32* @X %V = load i32* %P ; <i32> [#uses=1] diff --git a/test/Analysis/GlobalsModRef/chaining-analysis.ll b/test/Analysis/GlobalsModRef/chaining-analysis.ll index 431b2a6..aeb76e4 100644 --- a/test/Analysis/GlobalsModRef/chaining-analysis.ll +++ b/test/Analysis/GlobalsModRef/chaining-analysis.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | not grep load +; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | FileCheck %s ; This test requires the use of previous analyses to determine that ; doesnotmodX does not modify X (because 'sin' doesn't). @@ -8,6 +8,10 @@ declare double @sin(double) readnone define i32 @test(i32* %P) { +; CHECK: @test +; CHECK-NEXT: store i32 12, i32* @X +; CHECK-NEXT: call double @doesnotmodX(double 1.000000e+00) +; CHECK-NEXT: ret i32 12 store i32 12, i32* @X call double @doesnotmodX( double 1.000000e+00 ) ; <double>:1 [#uses=0] %V = load i32* @X ; <i32> [#uses=1] diff --git a/test/Analysis/GlobalsModRef/indirect-global.ll b/test/Analysis/GlobalsModRef/indirect-global.ll index 826f55c..48ac6dd 100644 --- a/test/Analysis/GlobalsModRef/indirect-global.ll +++ b/test/Analysis/GlobalsModRef/indirect-global.ll @@ -1,9 +1,7 @@ -; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -instcombine -S | \ -; RUN: grep {ret i32 0} +; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -instcombine -S | FileCheck %s @G = internal global i32* null ; <i32**> [#uses=3] - declare i8* @malloc(i32) define void @test() { %a = call i8* @malloc(i32 4) @@ -13,6 +11,7 @@ define void @test() { } define i32 @test1(i32* %P) { +; CHECK: ret i32 0 %g1 = load i32** @G ; <i32*> [#uses=2] %h1 = load i32* %g1 ; <i32> [#uses=1] store i32 123, i32* %P diff --git a/test/Analysis/GlobalsModRef/modreftest.ll b/test/Analysis/GlobalsModRef/modreftest.ll index 3a02a94a..3eed916 100644 --- a/test/Analysis/GlobalsModRef/modreftest.ll +++ b/test/Analysis/GlobalsModRef/modreftest.ll @@ -1,7 +1,12 @@ -; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | not grep load +; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | FileCheck %s + @X = internal global i32 4 ; <i32*> [#uses=2] define i32 @test(i32* %P) { +; CHECK: @test +; CHECK-NEXT: store i32 12, i32* @X +; CHECK-NEXT: call void @doesnotmodX() +; CHECK-NEXT: ret i32 12 store i32 12, i32* @X call void @doesnotmodX( ) %V = load i32* @X ; <i32> [#uses=1] diff --git a/test/Analysis/GlobalsModRef/purecse.ll b/test/Analysis/GlobalsModRef/purecse.ll index 994aff8..e030417 100644 --- a/test/Analysis/GlobalsModRef/purecse.ll +++ b/test/Analysis/GlobalsModRef/purecse.ll @@ -1,6 +1,5 @@ ; Test that pure functions are cse'd away -; RUN: opt < %s -globalsmodref-aa -gvn -instcombine | \ -; RUN: llvm-dis | not grep sub +; RUN: opt < %s -globalsmodref-aa -gvn -instcombine -S | FileCheck %s define i32 @pure(i32 %X) { %Y = add i32 %X, 1 ; <i32> [#uses=1] @@ -8,6 +7,8 @@ define i32 @pure(i32 %X) { } define i32 @test1(i32 %X) { +; CHECK: %A = call i32 @pure(i32 %X) +; CHECK-NEXT: ret i32 0 %A = call i32 @pure( i32 %X ) ; <i32> [#uses=1] %B = call i32 @pure( i32 %X ) ; <i32> [#uses=1] %C = sub i32 %A, %B ; <i32> [#uses=1] @@ -15,6 +16,9 @@ define i32 @test1(i32 %X) { } define i32 @test2(i32 %X, i32* %P) { +; CHECK: %A = call i32 @pure(i32 %X) +; CHECK-NEXT: store i32 %X, i32* %P +; CHECK-NEXT: ret i32 0 %A = call i32 @pure( i32 %X ) ; <i32> [#uses=1] store i32 %X, i32* %P ;; Does not invalidate 'pure' call. %B = call i32 @pure( i32 %X ) ; <i32> [#uses=1] diff --git a/test/Analysis/GlobalsModRef/volatile-instrs.ll b/test/Analysis/GlobalsModRef/volatile-instrs.ll new file mode 100644 index 0000000..49bce67 --- /dev/null +++ b/test/Analysis/GlobalsModRef/volatile-instrs.ll @@ -0,0 +1,34 @@ +; RUN: opt < %s -basicaa -dse -S | 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-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.8.0" + +%struct.anon = type { i32, i32, i32 } +@b = global %struct.anon { i32 1, i32 0, i32 0 }, align 4 +@c = common global i32 0, align 4 +@a = common global %struct.anon zeroinitializer, align 4 +@.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 + +declare i32 @printf(i8* nocapture, ...) nounwind +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind + + +; Make sure that the initial memcpy call does not go away +; because the volatile load is in the way. PR12899 + +; CHECK: main_entry: +; CHECK-NEXT: tail call void @llvm.memcpy.p0i8.p0i8.i64 + +define i32 @main() nounwind uwtable ssp { +main_entry: + tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* bitcast (%struct.anon* @b to i8*), i8* bitcast (%struct.anon* @a to i8*), i64 12, i32 4, i1 false) + %0 = load volatile i32* getelementptr inbounds (%struct.anon* @b, i64 0, i32 0), align 4, !tbaa !0 + store i32 %0, i32* @c, align 4, !tbaa !0 + tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* bitcast (%struct.anon* @b to i8*), i8* bitcast (%struct.anon* @a to i8*), i64 12, i32 4, i1 false) nounwind + %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i64 0, i64 0), i32 %0) nounwind + ret i32 0 +} + +!0 = metadata !{metadata !"int", metadata !1} +!1 = metadata !{metadata !"omnipotent char", metadata !2} +!2 = metadata !{metadata !"Simple C/C++ TBAA"} diff --git a/test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll b/test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll index 9355aee..7119007 100644 --- a/test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll +++ b/test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll @@ -2,7 +2,7 @@ ; 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: grep "^ Loop at depth 4 containing: %loopentry.7<header><latch><exiting>" define void @getAndMoveToFrontDecode() { br label %endif.2 diff --git a/test/Analysis/RegionInfo/block_sort.ll b/test/Analysis/RegionInfo/block_sort.ll index faec45a..ac77ab3 100644 --- a/test/Analysis/RegionInfo/block_sort.ll +++ b/test/Analysis/RegionInfo/block_sort.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats -analyze < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats -analyze < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @BZ2_blockSort() nounwind { start: diff --git a/test/Analysis/RegionInfo/cond_loop.ll b/test/Analysis/RegionInfo/cond_loop.ll index 2ce57c3..1145ffd 100644 --- a/test/Analysis/RegionInfo/cond_loop.ll +++ b/test/Analysis/RegionInfo/cond_loop.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { 5: diff --git a/test/Analysis/RegionInfo/condition_complicated.ll b/test/Analysis/RegionInfo/condition_complicated.ll index 7ca5c7c..6b39880 100644 --- a/test/Analysis/RegionInfo/condition_complicated.ll +++ b/test/Analysis/RegionInfo/condition_complicated.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc zeroext i8 @handle_compress() nounwind { end165: diff --git a/test/Analysis/RegionInfo/condition_complicated_2.ll b/test/Analysis/RegionInfo/condition_complicated_2.ll index 5fa940a..f551108 100644 --- a/test/Analysis/RegionInfo/condition_complicated_2.ll +++ b/test/Analysis/RegionInfo/condition_complicated_2.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc void @compress() nounwind { end33: diff --git a/test/Analysis/RegionInfo/condition_forward_edge.ll b/test/Analysis/RegionInfo/condition_forward_edge.ll index 098c9b6..5e4d9d2 100644 --- a/test/Analysis/RegionInfo/condition_forward_edge.ll +++ b/test/Analysis/RegionInfo/condition_forward_edge.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { 0: diff --git a/test/Analysis/RegionInfo/condition_same_exit.ll b/test/Analysis/RegionInfo/condition_same_exit.ll index 1b88596..e48413a 100644 --- a/test/Analysis/RegionInfo/condition_same_exit.ll +++ b/test/Analysis/RegionInfo/condition_same_exit.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { 0: diff --git a/test/Analysis/RegionInfo/condition_simple.ll b/test/Analysis/RegionInfo/condition_simple.ll index 19b154b..00d9ed2 100644 --- a/test/Analysis/RegionInfo/condition_simple.ll +++ b/test/Analysis/RegionInfo/condition_simple.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { 0: diff --git a/test/Analysis/RegionInfo/exit_in_condition.ll b/test/Analysis/RegionInfo/exit_in_condition.ll index 3b152d2..b84abec 100644 --- a/test/Analysis/RegionInfo/exit_in_condition.ll +++ b/test/Analysis/RegionInfo/exit_in_condition.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc zeroext i8 @handle_compress() nounwind { entry: diff --git a/test/Analysis/RegionInfo/infinite_loop.ll b/test/Analysis/RegionInfo/infinite_loop.ll index 59cead4..8e58828 100644 --- a/test/Analysis/RegionInfo/infinite_loop.ll +++ b/test/Analysis/RegionInfo/infinite_loop.ll @@ -1,5 +1,5 @@ ; RUN: opt -regions -analyze < %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s define void @normal_condition() nounwind { 0: diff --git a/test/Analysis/RegionInfo/infinite_loop_2.ll b/test/Analysis/RegionInfo/infinite_loop_2.ll index 80c69b7a..a8227e3 100644 --- a/test/Analysis/RegionInfo/infinite_loop_2.ll +++ b/test/Analysis/RegionInfo/infinite_loop_2.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { 0: diff --git a/test/Analysis/RegionInfo/infinite_loop_3.ll b/test/Analysis/RegionInfo/infinite_loop_3.ll index 74ceafb..b09c9c1 100644 --- a/test/Analysis/RegionInfo/infinite_loop_3.ll +++ b/test/Analysis/RegionInfo/infinite_loop_3.ll @@ -1,8 +1,8 @@ ; RUN: opt -regions -analyze < %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { 0: diff --git a/test/Analysis/RegionInfo/infinite_loop_4.ll b/test/Analysis/RegionInfo/infinite_loop_4.ll index fd56af1..681c305 100644 --- a/test/Analysis/RegionInfo/infinite_loop_4.ll +++ b/test/Analysis/RegionInfo/infinite_loop_4.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { 0: diff --git a/test/Analysis/RegionInfo/loop_with_condition.ll b/test/Analysis/RegionInfo/loop_with_condition.ll index d1d6898..08d2ba8 100644 --- a/test/Analysis/RegionInfo/loop_with_condition.ll +++ b/test/Analysis/RegionInfo/loop_with_condition.ll @@ -1,8 +1,8 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { 0: diff --git a/test/Analysis/RegionInfo/loops_1.ll b/test/Analysis/RegionInfo/loops_1.ll index d4bf3cc..6449949 100644 --- a/test/Analysis/RegionInfo/loops_1.ll +++ b/test/Analysis/RegionInfo/loops_1.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc zeroext i8 @loops_1() nounwind { entry: diff --git a/test/Analysis/RegionInfo/loops_2.ll b/test/Analysis/RegionInfo/loops_2.ll index 07aa7c3..dc4a1ad 100644 --- a/test/Analysis/RegionInfo/loops_2.ll +++ b/test/Analysis/RegionInfo/loops_2.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @meread_() nounwind { entry: diff --git a/test/Analysis/RegionInfo/mix_1.ll b/test/Analysis/RegionInfo/mix_1.ll index 829c157..1474e03 100644 --- a/test/Analysis/RegionInfo/mix_1.ll +++ b/test/Analysis/RegionInfo/mix_1.ll @@ -1,8 +1,8 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @a_linear_impl_fig_1() nounwind { 0: diff --git a/test/Analysis/RegionInfo/multiple_exiting_edge.ll b/test/Analysis/RegionInfo/multiple_exiting_edge.ll index 7bc0e46..8de6472 100644 --- a/test/Analysis/RegionInfo/multiple_exiting_edge.ll +++ b/test/Analysis/RegionInfo/multiple_exiting_edge.ll @@ -1,5 +1,5 @@ -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition_0() nounwind { bb38: ; preds = %bb34, %bb34, %bb37 diff --git a/test/Analysis/RegionInfo/nested_loops.ll b/test/Analysis/RegionInfo/nested_loops.ll index 9d8c455..a3707a1 100644 --- a/test/Analysis/RegionInfo/nested_loops.ll +++ b/test/Analysis/RegionInfo/nested_loops.ll @@ -1,8 +1,8 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc zeroext i8 @handle_compress() nounwind { entry: diff --git a/test/Analysis/RegionInfo/next.ll b/test/Analysis/RegionInfo/next.ll index 377a84d..890b4f2 100644 --- a/test/Analysis/RegionInfo/next.ll +++ b/test/Analysis/RegionInfo/next.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @MAIN__() nounwind { entry: diff --git a/test/Analysis/RegionInfo/paper.ll b/test/Analysis/RegionInfo/paper.ll index 00b544b..96c87e0 100644 --- a/test/Analysis/RegionInfo/paper.ll +++ b/test/Analysis/RegionInfo/paper.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @a_linear_impl_fig_1() nounwind { 0: diff --git a/test/Analysis/RegionInfo/two_loops_same_header.ll b/test/Analysis/RegionInfo/two_loops_same_header.ll index a97182b..e75661e 100644 --- a/test/Analysis/RegionInfo/two_loops_same_header.ll +++ b/test/Analysis/RegionInfo/two_loops_same_header.ll @@ -1,7 +1,7 @@ ; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats < %s |& FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s |& FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s |& FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc zeroext i8 @handle_compress() nounwind { entry: diff --git a/test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll b/test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll index 7ff130f..e0c5583 100644 --- a/test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll +++ b/test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -analyze -scalar-evolution \ -; RUN: -scalar-evolution-max-iterations=0 | grep {Loop %bb: backedge-taken count is 100} +; RUN: -scalar-evolution-max-iterations=0 | grep "Loop %bb: backedge-taken count is 100" ; PR1533 @array = weak global [101 x i32] zeroinitializer, align 32 ; <[100 x i32]*> [#uses=1] diff --git a/test/Analysis/ScalarEvolution/2007-08-06-Unsigned.ll b/test/Analysis/ScalarEvolution/2007-08-06-Unsigned.ll index ab96243..036abf5 100644 --- a/test/Analysis/ScalarEvolution/2007-08-06-Unsigned.ll +++ b/test/Analysis/ScalarEvolution/2007-08-06-Unsigned.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -scalar-evolution -analyze | grep {Loop %bb: backedge-taken count is (-1 + (-1 \\* %x) + %y)} +; RUN: opt < %s -scalar-evolution -analyze | grep "Loop %bb: backedge-taken count is (-1 + (-1 \* %x) + %y)" ; PR1597 define i32 @f(i32 %x, i32 %y) { diff --git a/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll b/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll index b678fee..a3192b9 100644 --- a/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll +++ b/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -analyze -scalar-evolution \ -; RUN: -scalar-evolution-max-iterations=0 | grep {backedge-taken count is 13} +; RUN: -scalar-evolution-max-iterations=0 | grep "backedge-taken count is 13" ; PR1706 define i32 @f() { diff --git a/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll b/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll index fe3a7f4..d0644f7 100644 --- a/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll +++ b/test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -scalar-evolution -analyze | grep {Loop %header: backedge-taken count is (0 smax %n)} +; RUN: opt < %s -scalar-evolution -analyze | grep "Loop %header: backedge-taken count is (0 smax %n)" define void @foo(i32 %n) { entry: diff --git a/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll b/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll index bcc124d..41734d7 100644 --- a/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll +++ b/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -analyze -scalar-evolution \ -; RUN: -scalar-evolution-max-iterations=0 | grep {backedge-taken count is 61} +; RUN: -scalar-evolution-max-iterations=0 | grep "backedge-taken count is 61" ; PR2364 define i32 @func_6() nounwind { diff --git a/test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect1.ll b/test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect1.ll index 9db9b71..5cf17a2 100644 --- a/test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect1.ll +++ b/test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect1.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -analyze -scalar-evolution |& not grep smax +; RUN: opt < %s -analyze -scalar-evolution 2>&1 | not grep smax ; PR2261 @lut = common global [256 x i8] zeroinitializer, align 32 ; <[256 x i8]*> [#uses=1] diff --git a/test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect2.ll b/test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect2.ll index 1847665..195dfaa 100644 --- a/test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect2.ll +++ b/test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect2.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -analyze -scalar-evolution |& not grep smax +; RUN: opt < %s -analyze -scalar-evolution 2>&1 | not grep smax ; PR2070 define i32 @a(i32 %x) nounwind { diff --git a/test/Analysis/ScalarEvolution/2008-07-19-WrappingIV.ll b/test/Analysis/ScalarEvolution/2008-07-19-WrappingIV.ll index 86e07ec4..cbf200e 100644 --- a/test/Analysis/ScalarEvolution/2008-07-19-WrappingIV.ll +++ b/test/Analysis/ScalarEvolution/2008-07-19-WrappingIV.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -analyze -scalar-evolution \ -; RUN: -scalar-evolution-max-iterations=0 | grep {backedge-taken count is 113} +; RUN: -scalar-evolution-max-iterations=0 | grep "backedge-taken count is 113" ; PR2088 define void @fun() { diff --git a/test/Analysis/ScalarEvolution/2008-11-18-LessThanOrEqual.ll b/test/Analysis/ScalarEvolution/2008-11-18-LessThanOrEqual.ll index 335bbaf..c25e4a3 100644 --- a/test/Analysis/ScalarEvolution/2008-11-18-LessThanOrEqual.ll +++ b/test/Analysis/ScalarEvolution/2008-11-18-LessThanOrEqual.ll @@ -1,5 +1,5 @@ -; RUN: opt < %s -analyze -scalar-evolution |& \ -; RUN: grep {Loop %bb: backedge-taken count is (7 + (-1 \\* %argc))} +; RUN: opt < %s -analyze -scalar-evolution 2>&1 | \ +; RUN: grep "Loop %bb: backedge-taken count is (7 + (-1 \* %argc))" define i32 @main(i32 %argc, i8** %argv) nounwind { entry: diff --git a/test/Analysis/ScalarEvolution/2008-11-18-Stride1.ll b/test/Analysis/ScalarEvolution/2008-11-18-Stride1.ll index db527fe..56a8343 100644 --- a/test/Analysis/ScalarEvolution/2008-11-18-Stride1.ll +++ b/test/Analysis/ScalarEvolution/2008-11-18-Stride1.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -analyze -scalar-evolution \ -; RUN: | grep {Loop %bb: Unpredictable backedge-taken count\\.} +; RUN: | grep "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 diff --git a/test/Analysis/ScalarEvolution/2008-11-18-Stride2.ll b/test/Analysis/ScalarEvolution/2008-11-18-Stride2.ll index fa9f21a..aaf6770 100644 --- a/test/Analysis/ScalarEvolution/2008-11-18-Stride2.ll +++ b/test/Analysis/ScalarEvolution/2008-11-18-Stride2.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -analyze -scalar-evolution |& grep {/u 3} +; RUN: opt < %s -analyze -scalar-evolution 2>&1 | grep "/u 3" ; XFAIL: * ; This is a tricky testcase for unsigned wrap detection which ScalarEvolution diff --git a/test/Analysis/ScalarEvolution/2008-12-08-FiniteSGE.ll b/test/Analysis/ScalarEvolution/2008-12-08-FiniteSGE.ll index 25a0434..a1b3b71 100644 --- a/test/Analysis/ScalarEvolution/2008-12-08-FiniteSGE.ll +++ b/test/Analysis/ScalarEvolution/2008-12-08-FiniteSGE.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -analyze -scalar-evolution | grep {backedge-taken count is 255} +; RUN: opt < %s -analyze -scalar-evolution | grep "backedge-taken count is 255" define i32 @foo(i32 %x, i32 %y, i32* %lam, i32* %alp) nounwind { bb1.thread: diff --git a/test/Analysis/ScalarEvolution/2008-12-14-StrideAndSigned.ll b/test/Analysis/ScalarEvolution/2008-12-14-StrideAndSigned.ll index 8152e98..bb14919 100644 --- a/test/Analysis/ScalarEvolution/2008-12-14-StrideAndSigned.ll +++ b/test/Analysis/ScalarEvolution/2008-12-14-StrideAndSigned.ll @@ -1,5 +1,5 @@ -; RUN: opt < %s -analyze -scalar-evolution |& \ -; RUN: grep {(((-1 \\* %i0) + (100005 smax %i0)) /u 5)} +; RUN: opt < %s -analyze -scalar-evolution 2>&1 | \ +; RUN: grep "(((-1 * %i0) + (100005 smax %i0)) /u 5)" ; XFAIL: * define i32 @foo0(i32 %i0) nounwind { diff --git a/test/Analysis/ScalarEvolution/2008-12-15-DontUseSDiv.ll b/test/Analysis/ScalarEvolution/2008-12-15-DontUseSDiv.ll index 3eaa492..7000626 100644 --- a/test/Analysis/ScalarEvolution/2008-12-15-DontUseSDiv.ll +++ b/test/Analysis/ScalarEvolution/2008-12-15-DontUseSDiv.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -analyze -scalar-evolution |& grep {/u 5} +; RUN: opt < %s -analyze -scalar-evolution 2>&1 | grep "/u 5" ; XFAIL: * define i8 @foo0(i8 %i0) nounwind { diff --git a/test/Analysis/ScalarEvolution/2009-01-02-SignedNegativeStride.ll b/test/Analysis/ScalarEvolution/2009-01-02-SignedNegativeStride.ll index cc2a2e4..82f2608 100644 --- a/test/Analysis/ScalarEvolution/2009-01-02-SignedNegativeStride.ll +++ b/test/Analysis/ScalarEvolution/2009-01-02-SignedNegativeStride.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -analyze -scalar-evolution | not grep {/u -1} +; RUN: opt < %s -analyze -scalar-evolution | not grep "/u -1" ; PR3275 @g_16 = external global i16 ; <i16*> [#uses=3] diff --git a/test/Analysis/ScalarEvolution/2009-04-22-TruncCast.ll b/test/Analysis/ScalarEvolution/2009-04-22-TruncCast.ll index c2e108a..ebd9f73 100644 --- a/test/Analysis/ScalarEvolution/2009-04-22-TruncCast.ll +++ b/test/Analysis/ScalarEvolution/2009-04-22-TruncCast.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -analyze -scalar-evolution | grep {(trunc i} | not grep ext +; RUN: opt < %s -analyze -scalar-evolution | grep "(trunc i" | not grep ext define i16 @test1(i8 %x) { %A = sext i8 %x to i32 diff --git a/test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll b/test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll index dc7bd29..8a78043 100644 --- a/test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll +++ b/test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -analyze -scalar-evolution | grep {count is 2} +; RUN: opt < %s -analyze -scalar-evolution | grep "count is 2" ; PR3171 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" diff --git a/test/Analysis/ScalarEvolution/2012-05-18-LoopPredRecurse.ll b/test/Analysis/ScalarEvolution/2012-05-18-LoopPredRecurse.ll new file mode 100644 index 0000000..52e6683 --- /dev/null +++ b/test/Analysis/ScalarEvolution/2012-05-18-LoopPredRecurse.ll @@ -0,0 +1,30 @@ +; RUN: opt < %s -iv-users -S -disable-output +; +; PR12868: Infinite recursion: +; getUDivExpr()->getZeroExtendExpr()->isLoopBackedgeGuardedBy() +; +; We actually want SCEV simplification to fail gracefully in this +; case, so there's no output to check, just the absense of stack overflow. + +@c = common global i8 0, align 1 + +define i32 @func() { +entry: + br label %for.cond + +for.cond: ; preds = %for.body, %entry + %storemerge = phi i8 [ -1, %entry ], [ %inc, %for.body ] + %ui.0 = phi i32 [ undef, %entry ], [ %div, %for.body ] + %tobool = icmp eq i8 %storemerge, 0 + br i1 %tobool, label %for.end, label %for.body + +for.body: ; preds = %for.cond + %conv = sext i8 %storemerge to i32 + %div = lshr i32 %conv, 1 + %tobool2 = icmp eq i32 %div, 0 + %inc = add i8 %storemerge, 1 + br i1 %tobool2, label %for.cond, label %for.end + +for.end: ; preds = %for.body, %for.cond + ret i32 0 +} diff --git a/test/Analysis/ScalarEvolution/2012-05-29-MulAddRec.ll b/test/Analysis/ScalarEvolution/2012-05-29-MulAddRec.ll new file mode 100644 index 0000000..eee4ec4 --- /dev/null +++ b/test/Analysis/ScalarEvolution/2012-05-29-MulAddRec.ll @@ -0,0 +1,45 @@ +; RUN: opt < %s -S -indvars -loop-unroll | FileCheck %s +; +; loop-unroll fully unrolls the inner loop, creating an interesting +; chain of multiplication. indvars forces SCEV to run again on the +; outer loop. While reducing the recurrence at %mul3, unsigned integer overflow +; causes one of the terms to reach zero. This forces all multiples in +; the recurrence to be zero, reducing the whole thing to a constant expression. +; +; PR12929: cast<Ty>() argument of incompatible type + +; CHECK: @func +; CHECK: for.cond: +; CHECK: %inc1 = phi i8 [ 0, %entry ], [ %0, %for.body ] +; CHECK: br label %for.body + +; CHECK: for.body: +; CHECK: %inc.9 = add i8 %inc.8, 1 +; CHECK: %0 = add i8 %inc1, 10 +; CHEKC: br label %for.cond + +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-n8:16:32:64-S128" +define void @func() noreturn nounwind uwtable ssp { +entry: + br label %for.cond + +for.cond.loopexit: ; preds = %for.body + %mul.lcssa = phi i8 [ %mul, %for.body ] + %0 = add i8 %inc1, 10 + %indvars.iv.next = add i8 %indvars.iv, 10 + br label %for.cond + +for.cond: ; preds = %for.cond.loopexit, %entry + %indvars.iv = phi i8 [ %indvars.iv.next, %for.cond.loopexit ], [ 10, %entry ] + %mul3 = phi i8 [ undef, %entry ], [ %mul.lcssa, %for.cond.loopexit ] + %inc1 = phi i8 [ 0, %entry ], [ %0, %for.cond.loopexit ] + br label %for.body + +for.body: ; preds = %for.body, %for.cond + %inc26 = phi i8 [ %inc1, %for.cond ], [ %inc, %for.body ] + %mul45 = phi i8 [ %mul3, %for.cond ], [ %mul, %for.body ] + %inc = add i8 %inc26, 1 + %mul = mul i8 %inc26, %mul45 + %exitcond = icmp ne i8 %inc, %indvars.iv + br i1 %exitcond, label %for.body, label %for.cond.loopexit +} diff --git a/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll b/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll index 06f1b6f..e946d7a 100644 --- a/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll +++ b/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll @@ -80,3 +80,24 @@ for.cond539.preheader: unreachable } ; CHECK: Determining loop execution counts for: @test3 + +; PR13489 +; We used to crash on this too. + +define void @test4() { +entry: + br label %for.body + +for.body: ; preds = %for.body, %entry + %v2.02 = phi i64 [ 2, %entry ], [ %phitmp, %for.body ] + %v1.01 = phi i64 [ -2, %entry ], [ %sub1, %for.body ] + %sub1 = sub i64 %v1.01, %v2.02 + %phitmp = add i64 %v2.02, 2 + %tobool = icmp eq i64 %sub1, %phitmp + br i1 %tobool, label %for.end, label %for.body + +for.end: ; preds = %for.body + ret void +} + +; CHECK: Determining loop execution counts for: @test4 diff --git a/test/Analysis/ScalarEvolution/and-xor.ll b/test/Analysis/ScalarEvolution/and-xor.ll index 1772573..06f4a85 100644 --- a/test/Analysis/ScalarEvolution/and-xor.ll +++ b/test/Analysis/ScalarEvolution/and-xor.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -scalar-evolution -analyze \ -; RUN: | grep {\\--> (zext} | count 2 +; RUN: | grep "\--> (zext" | count 2 define i32 @foo(i32 %x) { %n = and i32 %x, 255 diff --git a/test/Analysis/ScalarEvolution/avoid-smax-0.ll b/test/Analysis/ScalarEvolution/avoid-smax-0.ll index 24275f9..3d15c78 100644 --- a/test/Analysis/ScalarEvolution/avoid-smax-0.ll +++ b/test/Analysis/ScalarEvolution/avoid-smax-0.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -scalar-evolution -analyze | grep {Loop %bb3: backedge-taken count is (-1 + %n)} +; RUN: opt < %s -scalar-evolution -analyze | grep "Loop %bb3: backedge-taken count is (-1 + %n)" ; We don't want to use a max in the trip count expression in ; this testcase. diff --git a/test/Analysis/ScalarEvolution/div-overflow.ll b/test/Analysis/ScalarEvolution/div-overflow.ll index 4f6f1e2..2846797 100644 --- a/test/Analysis/ScalarEvolution/div-overflow.ll +++ b/test/Analysis/ScalarEvolution/div-overflow.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -scalar-evolution -analyze \ -; RUN: | grep {\\--> ((-128 \\* %a) /u -128)} +; RUN: | grep "\--> ((-128 \* %a) /u -128)" ; Don't let ScalarEvolution fold this div away. diff --git a/test/Analysis/ScalarEvolution/how-far-to-zero.ll b/test/Analysis/ScalarEvolution/how-far-to-zero.ll new file mode 100644 index 0000000..07af88f --- /dev/null +++ b/test/Analysis/ScalarEvolution/how-far-to-zero.ll @@ -0,0 +1,27 @@ +; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s + +; PR13228 +define void @f() nounwind uwtable readnone { +entry: + br label %for.cond + +for.cond: ; preds = %for.cond, %entry + %c.0 = phi i8 [ 1, %entry ], [ 0, %for.cond ] + %i.0 = phi i8 [ 0, %entry ], [ %inc, %for.cond ] + %lnot = icmp eq i8 %i.0, 0 + %inc = add i8 %i.0, 1 + br i1 %lnot, label %for.cond, label %while.cond + +while.cond: ; preds = %while.body, %for.cond + %b.2 = phi i8 [ %add, %while.body ], [ 0, %for.cond ] + br i1 undef, label %while.end, label %while.body + +while.body: ; preds = %while.cond + %add = add i8 %b.2, %c.0 + %tobool7 = icmp eq i8 %add, 0 + br i1 %tobool7, label %while.end, label %while.cond + +while.end: ; preds = %while.body, %while.cond + ret void +} +;CHECK: Loop %while.cond: <multiple exits> Unpredictable backedge-taken count. diff --git a/test/Analysis/ScalarEvolution/scev-aa.ll b/test/Analysis/ScalarEvolution/scev-aa.ll index dd5a66c..a0abbb7 100644 --- a/test/Analysis/ScalarEvolution/scev-aa.ll +++ b/test/Analysis/ScalarEvolution/scev-aa.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -scev-aa -aa-eval -print-all-alias-modref-info \ -; RUN: |& FileCheck %s +; RUN: 2>&1 | FileCheck %s ; At the time of this writing, -basicaa misses the example of the form ; A[i+(j+1)] != A[i+j], which can arise from multi-dimensional array references, diff --git a/test/Analysis/ScalarEvolution/sext-inreg.ll b/test/Analysis/ScalarEvolution/sext-inreg.ll index 23e1210..8b3d641 100644 --- a/test/Analysis/ScalarEvolution/sext-inreg.ll +++ b/test/Analysis/ScalarEvolution/sext-inreg.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -analyze -scalar-evolution > %t -; RUN: grep {sext i57 \{0,+,199\}<%bb> to i64} %t | count 1 -; RUN: grep {sext i59 \{0,+,199\}<%bb> to i64} %t | count 1 +; RUN: grep "sext i57 {0,+,199}<%bb> to i64" %t | count 1 +; RUN: grep "sext i59 {0,+,199}<%bb> to i64" %t | count 1 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "i386-apple-darwin9.6" diff --git a/test/Analysis/ScalarEvolution/sext-iv-1.ll b/test/Analysis/ScalarEvolution/sext-iv-1.ll index 9063cbb..c34596d 100644 --- a/test/Analysis/ScalarEvolution/sext-iv-1.ll +++ b/test/Analysis/ScalarEvolution/sext-iv-1.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -scalar-evolution -analyze \ -; RUN: | grep { --> (sext i. \{.\*,+,.\*\}<%bb1> to i64)} | count 5 +; RUN: | grep " --> (sext i. {.*,+,.*}<%bb1> to i64)" | count 5 ; Don't convert (sext {...,+,...}) to {sext(...),+,sext(...)} in cases ; where the trip count is not within range. diff --git a/test/Analysis/ScalarEvolution/smax.ll b/test/Analysis/ScalarEvolution/smax.ll index 15dd744..eceb429 100644 --- a/test/Analysis/ScalarEvolution/smax.ll +++ b/test/Analysis/ScalarEvolution/smax.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -analyze -scalar-evolution | grep smax | count 2 ; RUN: opt < %s -analyze -scalar-evolution | grep \ -; RUN: {%. smax %. smax %.} +; RUN: "%. smax %. smax %." ; PR1614 define i32 @x(i32 %a, i32 %b, i32 %c) { diff --git a/test/Analysis/ScalarEvolution/trip-count.ll b/test/Analysis/ScalarEvolution/trip-count.ll index cb4e267..94f6882 100644 --- a/test/Analysis/ScalarEvolution/trip-count.ll +++ b/test/Analysis/ScalarEvolution/trip-count.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -analyze -scalar-evolution \ -; RUN: -scalar-evolution-max-iterations=0 | grep {backedge-taken count is 10000} +; RUN: -scalar-evolution-max-iterations=0 | grep "backedge-taken count is 10000" ; PR1101 @A = weak global [1000 x i32] zeroinitializer, align 32 diff --git a/test/Analysis/ScalarEvolution/trip-count2.ll b/test/Analysis/ScalarEvolution/trip-count2.ll index e26cbea..d84e99f 100644 --- a/test/Analysis/ScalarEvolution/trip-count2.ll +++ b/test/Analysis/ScalarEvolution/trip-count2.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -analyze -scalar-evolution | \ -; RUN: grep {backedge-taken count is 4} +; RUN: grep "backedge-taken count is 4" ; PR1101 @A = weak global [1000 x i32] zeroinitializer, align 32 diff --git a/test/Analysis/ScalarEvolution/trip-count3.ll b/test/Analysis/ScalarEvolution/trip-count3.ll index 1bf86ae..0cb6c95 100644 --- a/test/Analysis/ScalarEvolution/trip-count3.ll +++ b/test/Analysis/ScalarEvolution/trip-count3.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -scalar-evolution -analyze \ -; RUN: | grep {Loop %bb3\\.i: Unpredictable backedge-taken count\\.} +; RUN: | grep "Loop %bb3\.i: 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 diff --git a/test/Analysis/ScalarEvolution/trip-count4.ll b/test/Analysis/ScalarEvolution/trip-count4.ll index 116f62d..c02ae14 100644 --- a/test/Analysis/ScalarEvolution/trip-count4.ll +++ b/test/Analysis/ScalarEvolution/trip-count4.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -analyze -scalar-evolution \ -; RUN: | grep {sext.*trunc.*Exits: 11} +; RUN: | grep "sext.*trunc.*Exits: 11" ; ScalarEvolution should be able to compute a loop exit value for %indvar.i8. diff --git a/test/Analysis/ScalarEvolution/trip-count5.ll b/test/Analysis/ScalarEvolution/trip-count5.ll index 1194a1d..68a1ae1 100644 --- a/test/Analysis/ScalarEvolution/trip-count5.ll +++ b/test/Analysis/ScalarEvolution/trip-count5.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -analyze -scalar-evolution > %t ; RUN: grep sext %t | count 2 -; RUN: not grep {(sext} %t +; RUN: not grep "(sext" %t ; ScalarEvolution should be able to compute a maximum trip count ; value sufficient to fold away both sext casts. diff --git a/test/Analysis/ScalarEvolution/trip-count6.ll b/test/Analysis/ScalarEvolution/trip-count6.ll index 956fb81..882f552 100644 --- a/test/Analysis/ScalarEvolution/trip-count6.ll +++ b/test/Analysis/ScalarEvolution/trip-count6.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -analyze -scalar-evolution \ -; RUN: | grep {max backedge-taken count is 1\$} +; RUN: | grep "max backedge-taken count is 1$" @mode_table = global [4 x i32] zeroinitializer ; <[4 x i32]*> [#uses=1] diff --git a/test/Analysis/ScalarEvolution/trip-count7.ll b/test/Analysis/ScalarEvolution/trip-count7.ll index a8b797e..2bcb9e9 100644 --- a/test/Analysis/ScalarEvolution/trip-count7.ll +++ b/test/Analysis/ScalarEvolution/trip-count7.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -analyze -scalar-evolution \ -; RUN: | grep {Loop %bb7.i: Unpredictable backedge-taken count\\.} +; RUN: | grep "Loop %bb7.i: Unpredictable backedge-taken count\." 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" diff --git a/test/Analysis/ScalarEvolution/trip-count8.ll b/test/Analysis/ScalarEvolution/trip-count8.ll index ac5ee60..005162b 100644 --- a/test/Analysis/ScalarEvolution/trip-count8.ll +++ b/test/Analysis/ScalarEvolution/trip-count8.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -analyze -scalar-evolution \ -; RUN: | grep {Loop %for\\.body: backedge-taken count is (-1 + \[%\]ecx)} +; RUN: | grep "Loop %for\.body: backedge-taken count is (-1 + [%]ecx)" ; 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" diff --git a/test/Analysis/ScalarEvolution/xor-and.ll b/test/Analysis/ScalarEvolution/xor-and.ll index c0530bb..4ab2f39 100644 --- a/test/Analysis/ScalarEvolution/xor-and.ll +++ b/test/Analysis/ScalarEvolution/xor-and.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -scalar-evolution -analyze \ -; RUN: | grep {\\--> (zext i4 (-8 + (trunc i64 (8 \\* %x) to i4)) to i64)} +; RUN: | grep "\--> (zext i4 (-8 + (trunc i64 (8 \* %x) to i4)) to i64)" ; ScalarEvolution shouldn't try to analyze %z into something like ; --> (zext i4 (-1 + (-1 * (trunc i64 (8 * %x) to i4))) to i64) |