summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll
diff options
context:
space:
mode:
authorSerguei Katkov <serguei.katkov@azul.com>2018-01-09 06:47:14 +0000
committerSerguei Katkov <serguei.katkov@azul.com>2018-01-09 06:47:14 +0000
commit6a7a4c6a55faef2da7e5f82bdf4c737095114564 (patch)
tree631c48cf6da9f7bd9b511bcf5a8b4b61e315344e /llvm/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll
parentbfa48a14ab307995beedf5c81c12addd9f6bc827 (diff)
downloadbcm5719-llvm-6a7a4c6a55faef2da7e5f82bdf4c737095114564.tar.gz
bcm5719-llvm-6a7a4c6a55faef2da7e5f82bdf4c737095114564.zip
[SCEV] Do not cache S -> V if S is not equivalent of V
SCEV tracks the correspondence of created SCEV to original instruction. However during creation of SCEV it is possible that nuw/nsw/exact flags are lost. As a result during expansion of the SCEV the instruction with nuw/nsw/exact will be used where it was expected and we produce poison incorreclty. Reviewers: sanjoy, mkazantsev, sebpop, jbhateja Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41578 llvm-svn: 322058
Diffstat (limited to 'llvm/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll')
-rw-r--r--llvm/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll b/llvm/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll
index cbf177c0d4b..6d670c84c48 100644
--- a/llvm/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll
+++ b/llvm/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll
@@ -6,11 +6,12 @@
; CHECK: [[r1:%[a-z0-9\.]+]] = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
; CHECK: [[r2:%[a-z0-9\.]+]] = lshr exact i64 [[r1]], 1
+; CHECK: [[r3:%[a-z0-9\.]+]] = bitcast i64 [[r2]] to i64
; CHECK: for.body.lr.ph:
-; CHECK: [[r3:%[a-z0-9]+]] = shl i64 [[r2]], 1
+; CHECK: [[r4:%[a-z0-9]+]] = shl i64 [[r3]], 1
; CHECK: br label %for.body
; CHECK: for.body:
-; CHECK: %lsr.iv2 = phi i64 [ %lsr.iv.next, %for.body ], [ [[r3]], %for.body.lr.ph ]
+; CHECK: %lsr.iv2 = phi i64 [ %lsr.iv.next, %for.body ], [ [[r4]], %for.body.lr.ph ]
; CHECK: %lsr.iv.next = add i64 %lsr.iv2, -2
; CHECK: %lsr.iv.next3 = inttoptr i64 %lsr.iv.next to i16*
; CHECK: %cmp27 = icmp eq i16* %lsr.iv.next3, null
OpenPOWER on IntegriCloud