llvm.org GIT mirror llvm / 4086bb5
FileCheckify and prepare for -disable-iv-rewrite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133998 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Trick 8 years ago
1 changed file(s) with 11 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
None ; RUN: opt < %s -indvars -S > %t
1 ; RUN: grep phi %t | count 4
2 ; RUN: grep {= phi i32} %t | count 4
3 ; RUN: not grep {sext i} %t
4 ; RUN: not grep {zext i} %t
5 ; RUN: not grep {trunc i} %t
6 ; RUN: not grep {add i8} %t
0 ; RUN: opt < %s -indvars -S | FileCheck %s
1 ; RUN: opt < %s -indvars -disable-iv-rewrite -S | FileCheck %s
2 ;
73 ; PR1301
84
95 ; Do a bunch of analysis and prove that the loops can use an i32 trip
106 ; count without casting.
7 ;
8 ; Note that all four functions should actually be converted to
9 ; memset. However, this test case validates indvars behavior. We
10 ; don't check that phis are "folded together" because that is a job
11 ; for loop strength reduction. But indvars must remove sext, zext,
12 ; trunc, and add i8.
13 ;
14 ; CHECK-NOT: {{sext|zext|trunc|add i8}}
1115
1216 ; ModuleID = 'ada.bc'
1317 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-n:8:16:32"