summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-03-22 17:10:07 +0000
committerAndrew Trick <atrick@apple.com>2012-03-22 17:10:07 +0000
commit0c0a3effdeb8d90b314a48f6306ce7dbd05b6255 (patch)
tree1576d2587dcd05da674cda3d49c843b1049f54f4 /test/Transforms
parentf6399a65f011a64e8d57c3ebe51350c4aecc7cfd (diff)
downloadllvm-0c0a3effdeb8d90b314a48f6306ce7dbd05b6255.tar.gz
llvm-0c0a3effdeb8d90b314a48f6306ce7dbd05b6255.tar.bz2
llvm-0c0a3effdeb8d90b314a48f6306ce7dbd05b6255.tar.xz
Convert -indvars tests that rely on SCEV expansion to -loop-reduce tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/LoopStrengthReduce/addrec-gep.ll (renamed from test/Transforms/IndVarSimplify/addrec-gep.ll)12
-rw-r--r--test/Transforms/LoopStrengthReduce/preserve-gep-loop-variant.ll (renamed from test/Transforms/IndVarSimplify/preserve-gep-loop-variant.ll)2
2 files changed, 9 insertions, 5 deletions
diff --git a/test/Transforms/IndVarSimplify/addrec-gep.ll b/test/Transforms/LoopStrengthReduce/addrec-gep.ll
index b62d093960..3e4e369657 100644
--- a/test/Transforms/IndVarSimplify/addrec-gep.ll
+++ b/test/Transforms/LoopStrengthReduce/addrec-gep.ll
@@ -1,13 +1,17 @@
-; RUN: opt < %s -indvars -S -enable-iv-rewrite | FileCheck %s
-; CHECK: getelementptr
-; CHECK: mul {{.*}}, 37
-; CHECK: add {{.*}}, 5203
+; RUN: opt < %s -loop-reduce -S | FileCheck %s
+; CHECK: bb1:
+; CHECK: load double* [[IV:%[^,]+]]
+; CHECK: store double {{.*}}, double* [[IV]]
+; CHECK: getelementptr double*
; CHECK-NOT: cast
+; CHECK: br {{.*}} label %bb1
; This test tests several things. The load and store should use the
; same address instead of having it computed twice, and SCEVExpander should
; be able to reconstruct the full getelementptr, despite it having a few
; obstacles set in its way.
+; We only check that the inner loop (bb1-bb2) is "reduced" because LSR
+; currently only operates on inner loops.
target datalayout = "e-p:64:64:64-n32:64"
diff --git a/test/Transforms/IndVarSimplify/preserve-gep-loop-variant.ll b/test/Transforms/LoopStrengthReduce/preserve-gep-loop-variant.ll
index 251d34ec38..f90d030800 100644
--- a/test/Transforms/IndVarSimplify/preserve-gep-loop-variant.ll
+++ b/test/Transforms/LoopStrengthReduce/preserve-gep-loop-variant.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -indvars -S -enable-iv-rewrite | FileCheck %s
+; RUN: opt < %s -loop-reduce -S | FileCheck %s
; CHECK-NOT: {{inttoptr|ptrtoint}}
; CHECK: scevgep
; CHECK-NOT: {{inttoptr|ptrtoint}}