Skip to content

Commit 9083ef1

Browse files
committed
FileCheckify and prepare for -disable-iv-rewrite.
llvm-svn: 133998
1 parent 74dd400 commit 9083ef1

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

llvm/test/Transforms/IndVarSimplify/ada-loops.ll

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
; RUN: opt < %s -indvars -S > %t
2-
; RUN: grep phi %t | count 4
3-
; RUN: grep {= phi i32} %t | count 4
4-
; RUN: not grep {sext i} %t
5-
; RUN: not grep {zext i} %t
6-
; RUN: not grep {trunc i} %t
7-
; RUN: not grep {add i8} %t
1+
; RUN: opt < %s -indvars -S | FileCheck %s
2+
; RUN: opt < %s -indvars -disable-iv-rewrite -S | FileCheck %s
3+
;
84
; PR1301
95

106
; Do a bunch of analysis and prove that the loops can use an i32 trip
117
; count without casting.
8+
;
9+
; Note that all four functions should actually be converted to
10+
; memset. However, this test case validates indvars behavior. We
11+
; don't check that phis are "folded together" because that is a job
12+
; for loop strength reduction. But indvars must remove sext, zext,
13+
; trunc, and add i8.
14+
;
15+
; CHECK-NOT: {{sext|zext|trunc|add i8}}
1216

1317
; ModuleID = 'ada.bc'
1418
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"

0 commit comments

Comments
 (0)