diff options
author | Max Kazantsev <max.kazantsev@azul.com> | 2018-11-08 11:54:35 +0000 |
---|---|---|
committer | Max Kazantsev <max.kazantsev@azul.com> | 2018-11-08 11:54:35 +0000 |
commit | 36c468a39f987255c0e08b904a2a17b695fd489f (patch) | |
tree | 64df9b815793dbdaee195c5136cb7cdbc8b8aaf4 /test/Analysis | |
parent | b6454d3ba48464429c94240fe52c64244d5e0042 (diff) |
Return "[IndVars] Smart hard uses detection"
The patch has been reverted because it ended up prohibiting propagation
of a constant to exit value. For such values, we should skip all checks
related to hard uses because propagating a constant is always profitable.
Differential Revision: https://reviews.llvm.org/D53691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346397 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/ScalarEvolution/pr28705.ll | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/Analysis/ScalarEvolution/pr28705.ll b/test/Analysis/ScalarEvolution/pr28705.ll index 8fbc08e3ca6..9a8487a6c66 100644 --- a/test/Analysis/ScalarEvolution/pr28705.ll +++ b/test/Analysis/ScalarEvolution/pr28705.ll @@ -1,11 +1,11 @@ ; PR28705 ; RUN: opt < %s -indvars -S | FileCheck %s -; Check IndVarSimplify replaces the exitval use of the induction var "%inc.i.i" -; with "%.sroa.speculated + 1". +; Check IndVarSimplify doesn't replace external use of the induction var +; "%inc.i.i" with "%.sroa.speculated + 1" because it is not profitable. ; ; CHECK-LABEL: @foo( -; CHECK: %[[EXIT:.+]] = sub i32 %.sroa.speculated, -1 +; CHECK: %[[EXIT:.+]] = phi i32 [ %inc.i.i, %for.body650 ] ; CHECK: %DB.sroa.9.0.lcssa = phi i32 [ 1, %entry ], [ %[[EXIT]], %loopexit ] ; define void @foo(i32 %sub.ptr.div.i, i8* %ref.i1174) local_unnamed_addr { |