llvm.org GIT mirror llvm / 54e3ade
Test scalar evolution directly instead of testing the result of canonical indvars. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153256 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Trick 8 years ago
1 changed file(s) with 9 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
None ; RUN: opt < %s -indvars -S -enable-iv-rewrite | FileCheck %s
1
2 ; Indvars should be able to insert a canonical induction variable
3 ; for the bb6 loop without using a maximum calculation (icmp, select)
4 ; because it should be able to prove that the comparison is guarded
5 ; by an appropriate conditional branch. Unfortunately, indvars is
6 ; not yet able to find the comparison for the other two loops in
7 ; this testcase.
8 ; CHECK: entry:
9 ; CHECK-NOT: select
10 ; CHECK: bb6:
0 ; RUN: opt < %s -analyze -scalar-evolution -S | FileCheck %s
1
2 ; Indvars should be able to find the trip count for the bb6 loop
3 ; without using a maximum calculation (icmp, select) because it should
4 ; be able to prove that the comparison is guarded by an appropriate
5 ; conditional branch. Unfortunately, indvars is not yet able to find
6 ; the comparison for the other two loops in this testcase.
7 ;
8 ; CHECK: Loop %bb6: backedge-taken count is (-1 + %w)
119
1210 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"
1311 target triple = "i386-apple-darwin9"