Also add a stricter post-condition for IndVarSimplify.
Fixes PR25578. Test case by Michael Zolotukhin.
Paths
| Differential D15059
[IndVars] Have getInsertPointForUses preserve LCSSA ClosedPublic Authored by sanjoy on Nov 29 2015, 2:31 PM.
Details Summary Also add a stricter post-condition for IndVarSimplify. Fixes PR25578. Test case by Michael Zolotukhin.
Diff Detail
Event Timelinesanjoy updated this object. mzolotukhin edited edge metadata. Comment ActionsHi Sanjoy, Thanks for fixing this, and sorry for the delayed response - I was on vacation. The patch looks good to me! One question: are you certain that ind-vars was only breaking LCSSA for inner loops, and it's been always preserving LCSSA for other loops? Michael
This revision is now accepted and ready to land.Dec 4 2015, 11:58 AM Comment Actions
No, I'm far from certain that IndVars preserves LCSSA for outer loops always. This is change just fixing the case that we have seen in practice. My guess / intuition is that we'll eventually have to move to a more principled and more obviously correct approach around preserving LCSSA in IndVars in the future.
Comment Actions
That totally makes sense. Thanks for working on it! Michael Closed by commit rL254977: [IndVars] Have getInsertPointForUses preserve LCSSA (authored by sanjoy). · Explain WhyDec 7 2015, 4:16 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 42125 llvm/trunk/include/llvm/Analysis/LoopInfo.h
llvm/trunk/lib/Analysis/LoopInfo.cpp
llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/trunk/test/Transforms/IndVarSimplify/pr25578.ll
|