diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2017-01-15 09:29:27 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2017-01-15 09:29:27 +0000 |
| commit | 0952750faea70aeb600f4416203e80b516c434c9 (patch) | |
| tree | 90b97f010e903f48a3939c39a2fe5ac98b1c19e8 /llvm/test/Transforms/LoopStrengthReduce | |
| parent | aac56849a141e22379e9824da41086f03111714d (diff) | |
| download | bcm5719-llvm-0952750faea70aeb600f4416203e80b516c434c9.tar.gz bcm5719-llvm-0952750faea70aeb600f4416203e80b516c434c9.zip | |
[PM] Clean up the testing for IVUsers, especially with the new PM.
First, I've moved a test of IVUsers from the LSR tree to a dedicated
IVUsers test directory. I've also simplified its RUN line now that the
new pass manager's loop PM is providing analyses on their own.
No functionality changed, but it makes subsequent changes cleaner.
llvm-svn: 292060
Diffstat (limited to 'llvm/test/Transforms/LoopStrengthReduce')
| -rw-r--r-- | llvm/test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/llvm/test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll b/llvm/test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll deleted file mode 100644 index 09f0e1aa2a0..00000000000 --- a/llvm/test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll +++ /dev/null @@ -1,54 +0,0 @@ -; RUN: opt < %s -analyze -iv-users | FileCheck %s -; RUN: opt -passes='function(require<scalar-evolution>,loop(print<ivusers>))' -S < %s 2>&1| FileCheck %s - -; Provide legal integer types. -target datalayout = "n8:16:32:64" - -; The value of %r is dependent on a polynomial iteration expression. -; -; CHECK-LABEL: IV Users for loop %foo.loop -; CHECK: {1,+,3,+,2}<%foo.loop> -define i64 @foo(i64 %n) { -entry: - br label %foo.loop - -foo.loop: - %indvar = phi i64 [ 0, %entry ], [ %indvar.next, %foo.loop ] - %indvar.next = add i64 %indvar, 1 - %c = icmp eq i64 %indvar.next, %n - br i1 %c, label %exit, label %foo.loop - -exit: - %r = mul i64 %indvar.next, %indvar.next - ret i64 %r -} - -; PR15470: LSR miscompile. The test2 function should return '1'. -; -; SCEV does not know how to denormalize chained recurrences, so make -; sure they aren't marked as post-inc users. -; -; CHECK-LABEL: IV Users for loop %test2.loop -; CHECK: %sext.us = {0,+,(16777216 + (-16777216 * %sub.us))<nuw><nsw>,+,33554432}<%test2.loop> in %f = ashr i32 %sext.us, 24 -define i32 @test2() { -entry: - br label %test2.loop - -test2.loop: - %inc1115.us = phi i32 [ 0, %entry ], [ %inc11.us, %test2.loop ] - %inc11.us = add nsw i32 %inc1115.us, 1 - %cmp.us = icmp slt i32 %inc11.us, 2 - br i1 %cmp.us, label %test2.loop, label %for.end - -for.end: - %tobool.us = icmp eq i32 %inc1115.us, 0 - %sub.us = select i1 %tobool.us, i32 0, i32 0 - %mul.us = shl i32 %inc1115.us, 24 - %sub.cond.us = sub nsw i32 %inc1115.us, %sub.us - %sext.us = mul i32 %mul.us, %sub.cond.us - %f = ashr i32 %sext.us, 24 - br label %exit - -exit: - ret i32 %f -} |

