OSDN Git Service

[SCEV] Do not cache S -> V if S is not equivalent of V
authorSerguei Katkov <serguei.katkov@azul.com>
Tue, 9 Jan 2018 06:47:14 +0000 (06:47 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Tue, 9 Jan 2018 06:47:14 +0000 (06:47 +0000)
commit090a0d657fb3736b90ea60f242971b58fabfdf68
tree231f72a8156810575d9042d1fac8caad353dfa6b
parenta377183cff12e7b95689f0d44e10eb595fe0519b
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322058 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll
unittests/Analysis/ScalarEvolutionTest.cpp