llvm.org GIT mirror llvm / 4ea7d4c
Convert Analysis tests to FileCheck in regards to PR5307. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85241 91177308-0d34-0410-b5e6-96231b3b80d8 Edward O'Callaghan 10 years ago
5 changed file(s) with 17 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
None ; RUN: opt < %s -analyze -scalar-evolution -disable-output | grep -e {--> %b}
0 ; RUN: opt < %s -analyze -scalar-evolution -disable-output | FileCheck %s
11 ; PR1810
22
33 define void @fun() {
1515 exit:
1616 ret void
1717 }
18
19 ; CHECK: --> %b
20
0 ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
1 ; RUN: -scalar-evolution-max-iterations=0 | \
2 ; RUN: grep -F "backedge-taken count is (-1 + (-1 * %j))"
1 ; RUN: -scalar-evolution-max-iterations=0 | FileCheck %s
32 ; PR2607
43
54 define i32 @_Z1aj(i32 %j) nounwind {
2423 ret i32 %i.0.lcssa
2524 }
2625
26 ; CHECK: backedge-taken count is (-1 + (-1 * %j))
27
0 ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
1 ; RUN: -scalar-evolution-max-iterations=0 | \
2 ; RUN: grep -F "backedge-taken count is (-2147483632 + ((-1 + (-1 * %x)) smax (-1 + (-1 * %y))))"
1 ; RUN: -scalar-evolution-max-iterations=0 | FileCheck %s
32 ; PR2607
43
54 define i32 @b(i32 %x, i32 %y) nounwind {
2120 %j.0.lcssa = phi i32 [ -2147483632, %entry ], [ %dec, %forinc ]
2221 ret i32 %j.0.lcssa
2322 }
23
24 ; CHECK: backedge-taken count is (-2147483632 + ((-1 + (-1 * %x)) smax (-1 + (-1 * %y))))
25
0 ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
1 ; RUN: -scalar-evolution-max-iterations=0 | grep -F "Exits: 20028"
1 ; RUN: -scalar-evolution-max-iterations=0 | FileCheck %s
22 ; PR2621
33
44 define i32 @a() nounwind {
2222 ret i32 %4
2323 }
2424
25 ; CHECK: Exits: 20028
26
0 ; RUN: opt < %s -analyze -scalar-evolution -disable-output \
1 ; RUN: -scalar-evolution-max-iterations=0 | grep -F "Exits: -19168"
1 ; RUN: -scalar-evolution-max-iterations=0 | FileCheck %s
22 ; PR2621
33
44 define i32 @a() nounwind {
5353 ret i32 %19
5454 }
5555
56 ; CHECK: Exits: -19168
57