(Note: the problematic invocation of hoistIVInc that caused PR24804 came
from IndVarSimplify, not from SCEVExpander itself)
Fixes PR24804. Test case by David Majnemer.
Paths 
  |  Differential  D15058  
[SCEVExpander] Have hoistIVInc preserve LCSSA ClosedPublic Authored by sanjoy on Nov 29 2015, 2:29 PM. 
Details Summary (Note: the problematic invocation of hoistIVInc that caused PR24804 came Fixes PR24804. Test case by David Majnemer. 
Diff Detail Event Timelinesanjoy updated this object. Comment Actions Hi Sanjoy, A couple of comments inline, otherwise the patch looks good to me. Thanks, 
 sanjoy added inline comments. 
 Comment Actions 
 Yes, I agree. I actually meant LNT testsuite or any other real-world test-suite - I was just curious if it had any effect at all there. Closed by commit rL254976: [SCEVExpander] Have hoistIVInc 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 41354 include/llvm/Analysis/LoopInfo.h
 include/llvm/IR/Instruction.h
 lib/Analysis/ScalarEvolutionExpander.cpp
 lib/IR/Instruction.cpp
 test/Transforms/IndVarSimplify/pr24804.ll
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
With this change we should become more conservative in some cases; did you see any effect on the testsuite? E.g. how many tests would crash if we replace with condition with an assert?