summaryrefslogtreecommitdiff
path: root/test/Transforms/IndVarSimplify
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-06-28 06:34:10 +0000
committerAndrew Trick <atrick@apple.com>2011-06-28 06:34:10 +0000
commit4086bb5ba58ed83dba4991599c00bfba34693d3a (patch)
tree9a6ba4c84301d2a404a83e06949e944e59cf1ea5 /test/Transforms/IndVarSimplify
parentc1ce95fc256b6b83479304b67db58265f36af6ef (diff)
downloadllvm-4086bb5ba58ed83dba4991599c00bfba34693d3a.tar.gz
llvm-4086bb5ba58ed83dba4991599c00bfba34693d3a.tar.bz2
llvm-4086bb5ba58ed83dba4991599c00bfba34693d3a.tar.xz
FileCheckify and prepare for -disable-iv-rewrite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133998 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/IndVarSimplify')
-rw-r--r--test/Transforms/IndVarSimplify/ada-loops.ll18
1 files changed, 11 insertions, 7 deletions
diff --git a/test/Transforms/IndVarSimplify/ada-loops.ll b/test/Transforms/IndVarSimplify/ada-loops.ll
index 4a07d997e7..9e635fdc00 100644
--- a/test/Transforms/IndVarSimplify/ada-loops.ll
+++ b/test/Transforms/IndVarSimplify/ada-loops.ll
@@ -1,14 +1,18 @@
-; RUN: opt < %s -indvars -S > %t
-; RUN: grep phi %t | count 4
-; RUN: grep {= phi i32} %t | count 4
-; RUN: not grep {sext i} %t
-; RUN: not grep {zext i} %t
-; RUN: not grep {trunc i} %t
-; RUN: not grep {add i8} %t
+; RUN: opt < %s -indvars -S | FileCheck %s
+; RUN: opt < %s -indvars -disable-iv-rewrite -S | FileCheck %s
+;
; PR1301
; Do a bunch of analysis and prove that the loops can use an i32 trip
; count without casting.
+;
+; Note that all four functions should actually be converted to
+; memset. However, this test case validates indvars behavior. We
+; don't check that phis are "folded together" because that is a job
+; for loop strength reduction. But indvars must remove sext, zext,
+; trunc, and add i8.
+;
+; CHECK-NOT: {{sext|zext|trunc|add i8}}
; ModuleID = 'ada.bc'
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"