llvm.org GIT mirror llvm / 8a977e2
-disable-output is no longer needed with -analyze. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94574 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 9 years ago
63 changed file(s) with 66 addition(s) and 66 deletion(s). Raw diff Collapse all Expand all
None ; RUN: opt < %s -disable-output -analyze -lda | FileCheck %s
0 ; RUN: opt < %s -analyze -lda | FileCheck %s
11
22 ;; x[5] = x[6] // with x being a pointer passed as argument
33
None ; RUN: opt < %s -disable-output -analyze -lda | FileCheck %s
0 ; RUN: opt < %s -analyze -lda | FileCheck %s
11
22 @x = common global [256 x i32] zeroinitializer, align 4
33 @y = common global [256 x i32] zeroinitializer, align 4
None ; RUN: opt < %s -disable-output -analyze -lda | FileCheck %s
0 ; RUN: opt < %s -analyze -lda | FileCheck %s
11
22 @x = common global [256 x i32] zeroinitializer, align 4
33 @y = common global [256 x i32] zeroinitializer, align 4
None ; RUN: opt < %s -disable-output -analyze -lda | FileCheck %s
0 ; RUN: opt < %s -analyze -lda | FileCheck %s
11
22 @x = common global [256 x i32] zeroinitializer, align 4
33 @y = common global [256 x i32] zeroinitializer, align 4
None ; RUN: opt < %s -disable-output -analyze -lda | FileCheck %s
0 ; RUN: opt < %s -analyze -lda | FileCheck %s
11
22 @x = common global [256 x i32] zeroinitializer, align 4
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: -scalar-evolution-max-iterations=0 | grep {Loop %bb: backedge-taken count is 100}
22 ; PR1533
33
None ; RUN: opt < %s -scalar-evolution -analyze -disable-output | grep {Loop %bb: backedge-taken count is (-1 + (-1 \\* %x) + %y)}
0 ; RUN: opt < %s -scalar-evolution -analyze | grep {Loop %bb: backedge-taken count is (-1 + (-1 \\* %x) + %y)}
11 ; PR1597
22
33 define i32 @f(i32 %x, i32 %y) {
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: -scalar-evolution-max-iterations=0 | grep {backedge-taken count is 13}
22 ; PR1706
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | FileCheck %s
0 ; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
11 ; PR1810
22
33 define void @fun() {
None ; RUN: opt < %s -scalar-evolution -analyze -disable-output | grep {Loop %header: backedge-taken count is (0 smax %n)}
0 ; RUN: opt < %s -scalar-evolution -analyze | grep {Loop %header: backedge-taken count is (0 smax %n)}
11
22 define void @foo(i32 %n) {
33 entry:
None ; RUN: opt < %s -scalar-evolution -analyze -disable-output | grep {Loop %loop: backedge-taken count is (100 + (-100 smax %n))}
0 ; RUN: opt < %s -scalar-evolution -analyze | grep {Loop %loop: backedge-taken count is (100 + (-100 smax %n))}
11 ; PR2002
22
33 define void @foo(i8 %n) {
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | grep umax
0 ; RUN: opt < %s -analyze -scalar-evolution | grep umax
11 ; PR2003
22
33 define i32 @foo(i32 %n) {
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: -scalar-evolution-max-iterations=0 | grep {backedge-taken count is 61}
22 ; PR2364
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output |& not grep smax
0 ; RUN: opt < %s -analyze -scalar-evolution |& not grep smax
11 ; PR2261
22
33 @lut = common global [256 x i8] zeroinitializer, align 32 ; <[256 x i8]*> [#uses=1]
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output |& not grep smax
0 ; RUN: opt < %s -analyze -scalar-evolution |& not grep smax
11 ; PR2070
22
33 define i32 @a(i32 %x) nounwind {
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: -scalar-evolution-max-iterations=0 | grep Unpredictable
22 ; PR2088
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: -scalar-evolution-max-iterations=0 | grep {backedge-taken count is 113}
22 ; PR2088
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: -scalar-evolution-max-iterations=0 | FileCheck %s
22 ; PR2607
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: -scalar-evolution-max-iterations=0 | FileCheck %s
22 ; PR2607
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: -scalar-evolution-max-iterations=0 | FileCheck %s
22 ; PR2621
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: -scalar-evolution-max-iterations=0 | FileCheck %s
22 ; PR2621
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output
0 ; RUN: opt < %s -analyze -scalar-evolution
11 ; PR1827
22
33 declare void @use(i32)
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output
0 ; RUN: opt < %s -analyze -scalar-evolution
11 ; PR2602
22
33 define i32 @a() nounwind {
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output |& \
0 ; RUN: opt < %s -analyze -scalar-evolution |& \
11 ; RUN: grep {Loop %bb: backedge-taken count is (7 + (-1 \\* %argc))}
22 ; XFAIL: *
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: | grep {Loop %bb: Unpredictable backedge-taken count\\.}
22
33 ; ScalarEvolution can't compute a trip count because it doesn't know if
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output |& grep {/u 3}
0 ; RUN: opt < %s -analyze -scalar-evolution |& grep {/u 3}
11 ; XFAIL: *
22
33 define i32 @f(i32 %x) nounwind readnone {
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | grep {backedge-taken count is 255}
0 ; RUN: opt < %s -analyze -scalar-evolution | grep {backedge-taken count is 255}
11 ; XFAIL: *
22
33 define i32 @foo(i32 %x, i32 %y, i32* %lam, i32* %alp) nounwind {
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | grep {0 smax}
0 ; RUN: opt < %s -analyze -scalar-evolution | grep {0 smax}
11 ; XFAIL: *
22
33 define i32 @f(i32 %c.idx.val) {
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output |& \
0 ; RUN: opt < %s -analyze -scalar-evolution |& \
11 ; RUN: grep {(((-1 \\* %i0) + (100005 smax %i0)) /u 5)}
22 ; XFAIL: *
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output |& grep {/u 5}
0 ; RUN: opt < %s -analyze -scalar-evolution |& grep {/u 5}
11 ; XFAIL: *
22
33 define i8 @foo0(i8 %i0) nounwind {
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | not grep {/u -1}
0 ; RUN: opt < %s -analyze -scalar-evolution | not grep {/u -1}
11 ; PR3275
22
33 @g_16 = external global i16 ; [#uses=3]
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | grep {(trunc i} | not grep ext
0 ; RUN: opt < %s -analyze -scalar-evolution | grep {(trunc i} | not grep ext
11
22 define i16 @test1(i8 %x) {
33 %A = sext i8 %x to i32
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | grep {count is 2}
0 ; RUN: opt < %s -analyze -scalar-evolution | grep {count is 2}
11 ; PR3171
22 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"
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: -scalar-evolution-max-iterations=0 | grep {backedge-taken count is 100}
22 ; PR1101
33
None ; RUN: opt < %s -scalar-evolution -analyze -disable-output \
0 ; RUN: opt < %s -scalar-evolution -analyze \
11 ; RUN: | grep {\\--> (zext} | count 2
22
33 define i32 @foo(i32 %x) {
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output
0 ; RUN: opt < %s -analyze -scalar-evolution
11 ; PR4537
22
33 ; ModuleID = 'b.bc'
None ; RUN: opt < %s -scalar-evolution -analyze -disable-output | grep {Loop %bb3: backedge-taken count is (-1 + %n)}
0 ; RUN: opt < %s -scalar-evolution -analyze | grep {Loop %bb3: backedge-taken count is (-1 + %n)}
11
22 ; We don't want to use a max in the trip count expression in
33 ; this testcase.
None ; RUN: opt < %s -scalar-evolution -analyze -disable-output \
0 ; RUN: opt < %s -scalar-evolution -analyze \
11 ; RUN: | grep {\\--> ((-128 \\* %a) /u -128)}
22
33 ; Don't let ScalarEvolution fold this div away.
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | grep smax
0 ; RUN: opt < %s -analyze -scalar-evolution | grep smax
11 ; PR1614
22
33 define i32 @f(i32 %x, i32 %y) {
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: | grep {\{%d,+,\[^\{\}\]\*\}<%bb>}
22
33 ; ScalarEvolution should be able to understand the loop and eliminate the casts.
None ; RUN: opt < %s -S -analyze -scalar-evolution -disable-output | FileCheck %s
0 ; RUN: opt < %s -S -analyze -scalar-evolution | FileCheck %s
11
22 ; ScalarEvolution should be able to fold away the sign-extensions
33 ; on this loop with a primary induction variable incremented with
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | grep { --> {.*,+,.*}<%bb>} | count 8
0 ; RUN: opt < %s -analyze -scalar-evolution | grep { --> {.*,+,.*}<%bb>} | count 8
11
22 ; The addrecs in this loop are analyzable only by using nsw information.
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output
0 ; RUN: opt < %s -analyze -scalar-evolution
11
22 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:32:32"
33 %JavaObject = type { [0 x i32 (...)*]*, i8* }
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output > %t
0 ; RUN: opt < %s -analyze -scalar-evolution > %t
11 ; RUN: grep {sext i57 \{0,+,199\}<%bb> to i64} %t | count 1
22 ; RUN: grep {sext i59 \{0,+,199\}<%bb> to i64} %t | count 1
33
None ; RUN: opt < %s -disable-output -scalar-evolution -analyze \
0 ; RUN: opt < %s -scalar-evolution -analyze \
11 ; RUN: | grep { --> \{-128,+,1\}<%bb1> Exits: 127} | count 5
22
33 ; Convert (sext {-128,+,1}) to {sext(-128),+,sext(1)}, since the
None ; RUN: opt < %s -disable-output -scalar-evolution -analyze \
0 ; RUN: opt < %s -scalar-evolution -analyze \
11 ; RUN: | grep { --> (sext i. \{.\*,+,.\*\}<%bb1> to i64)} | count 5
22
33 ; Don't convert (sext {...,+,...}) to {sext(...),+,sext(...)} in cases
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | FileCheck %s
0 ; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
11
22 ; CHECK: %tmp3 = sext i8 %tmp2 to i32
33 ; CHECK: --> (sext i8 {0,+,1}<%bb1> to i32) Exits: -1
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | grep smax | count 2
1 ; RUN: opt < %s -analyze -scalar-evolution -disable-output | grep \
0 ; RUN: opt < %s -analyze -scalar-evolution | grep smax | count 2
1 ; RUN: opt < %s -analyze -scalar-evolution | grep \
22 ; RUN: {%. smax %. smax %.}
33 ; PR1614
44
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: -scalar-evolution-max-iterations=0 | grep {backedge-taken count is 10000}
22 ; PR1101
33
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | \
0 ; RUN: opt < %s -analyze -scalar-evolution | \
11 ; RUN: grep {backedge-taken count is 4}
22 ; PR1101
33
None ; RUN: opt < %s -scalar-evolution -analyze -disable-output \
0 ; RUN: opt < %s -scalar-evolution -analyze \
11 ; RUN: | grep {Loop %bb3\\.i: Unpredictable backedge-taken count\\.}
22
33 ; ScalarEvolution can't compute a trip count because it doesn't know if
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: | grep {sext.*trunc.*Exits: 11}
22
33 ; ScalarEvolution should be able to compute a loop exit value for %indvar.i8.
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output > %t
0 ; RUN: opt < %s -analyze -scalar-evolution > %t
11 ; RUN: grep sext %t | count 2
22 ; RUN: not grep {(sext} %t
33
None ; RUN: opt < %s -analyze -disable-output -scalar-evolution \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: | grep {max backedge-taken count is 1\$}
22
33 @mode_table = global [4 x i32] zeroinitializer ; <[4 x i32]*> [#uses=1]
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: | grep {Loop %bb7.i: Unpredictable backedge-taken count\\.}
22
33 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"
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: | grep {Loop %for\\.body: backedge-taken count is (-1 + \[%\]ecx)}
22 ; PR4599
33
None ; RUN: opt < %s -scalar-evolution -disable-output -analyze \
0 ; RUN: opt < %s -scalar-evolution -analyze \
11 ; RUN: | grep {\\--> (zext i4 (-8 + (trunc i64 (8 \\* %x) to i4)) to i64)}
22
33 ; ScalarEvolution shouldn't try to analyze %z into something like
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
0 ; RUN: opt < %s -analyze -scalar-evolution \
11 ; RUN: | FileCheck %s
22 ; PR4569
33
None ;RUN: opt < %s -analyze -dot-cfg-only -disable-output 2>/dev/null
0 ;RUN: opt < %s -analyze -dot-cfg-only 2>/dev/null
11 ;PR 1497
22
33 define void @foo() {
None ; RUN: opt < %s -analyze -inline -disable-output
0 ; RUN: opt < %s -analyze -inline
11 ; PR1526
2 ; RUN: opt < %s -analyze -indvars -disable-output
2 ; RUN: opt < %s -analyze -indvars
33 ; PR1539
44 define i32 @test1() {
55 ret i32 0
None ; RUN: opt < %s -scalar-evolution -analyze -disable-output \
0 ; RUN: opt < %s -scalar-evolution -analyze \
11 ; RUN: | grep {\\--> (zext i4 {-7,+,-8}<%loop> to i32)}
22
33 define fastcc void @foo() nounwind {
None ; RUN: opt < %s -loop-reduce -disable-output
1 ; RUN: opt < %s -analyze -scalar-evolution -disable-output
0 ; RUN: opt < %s -loop-reduce
1 ; RUN: opt < %s -analyze -scalar-evolution
22 ; PR 3086
33
44 %struct.Cls = type { i32, i8, [2 x %struct.Cls*], [2 x %struct.Lit*] }
None ; RUN: opt < %s -analyze -iv-users -disable-output | grep {Stride i64 {3,+,2}<%loop>:}
0 ; RUN: opt < %s -analyze -iv-users | grep {Stride i64 {3,+,2}<%loop>:}
11
22 ; The value of %r is dependent on a polynomial iteration expression.
33