[PATCH] D13460: [IndVars] Don't break dominance in `eliminateIdentitySCEV`
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 01:46:25 PDT 2015
sanjoy created this revision.
sanjoy added reviewers: atrick, hfinkel.
sanjoy added a subscriber: llvm-commits.
sanjoy added a dependency: D13459: [IndVars] Extract out eliminateIdentitySCEV, NFC.
Herald added a subscriber: sanjoy.
After r249211, `getSCEV(X) == getSCEV(Y)` does not guarantee that X and
Y are related in the dominator tree, even if X is an operand to Y (I've
included a toy example in comments, and a real example as a test case).
This commit changes `SimplifyIndVar` to require a `DominatorTree`. I
don't think this is a problem because `ScalarEvolution` requires it
anyway.
Fixes PR25051.
Depends on D13459.
http://reviews.llvm.org/D13460
Files:
include/llvm/Transforms/Utils/SimplifyIndVar.h
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Utils/LoopUnroll.cpp
lib/Transforms/Utils/SimplifyIndVar.cpp
test/Transforms/IndVarSimplify/pr25051.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13460.36591.patch
Type: text/x-patch
Size: 7553 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151006/102bffa3/attachment.bin>
More information about the llvm-commits
mailing list