llvm/test/Transforms/LoopSimplify
Michael Zolotukhin 4b4709686d [LoopSimplify] Rebuild LCSSA for the inner loop after separating nested loops.
Summary:
This hopefully fixes PR28825. The problem now was that a value from the
original loop was used in a subloop, which became a sibling after separation.
While a subloop doesn't need an lcssa phi node, a sibling does, and that's
where we broke LCSSA. The most natural way to fix this now is to simply call
formLCSSA on the original loop: it'll do what we've been doing before plus
it'll cover situations described above.

I think we don't need to run formLCSSARecursively here, and we have an assert
to verify this (I've tried testing it on LLVM testsuite + SPECs). I'd be happy
to be corrected here though.

I also changed a run line in the test from '-lcssa -loop-unroll' to
'-lcssa -loop-simplify -indvars', because it exercises LCSSA
preservation to the same extent, but also makes less unrelated
transformation on the CFG, which makes it easier to verify.

Reviewers: chandlerc, sanjoy, silvas

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23288

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278173 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-09 22:44:56 +00:00
..
2003-04-25-AssertFail.ll
2003-05-12-PreheaderExitOfChild.ll
2003-08-15-PreheadersFail.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2003-12-10-ExitBlocksProblem.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2004-02-05-DominatorInfoCorruption.ll
2004-03-15-IncorrectDomUpdate.ll
2004-04-01-IncorrectDomUpdate.ll
2004-04-12-LoopSimplify-SwitchBackedges.ll
2004-04-13-LoopSimplifyUpdateDomFrontier.ll Remove the ScalarReplAggregates pass 2016-06-15 00:19:09 +00:00
2007-10-28-InvokeCrash.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2010-07-15-IncorrectDomFrontierUpdate.ll
2010-12-26-PHIInfiniteLoop.ll
2011-12-14-LandingpadHeader.ll Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
2012-03-20-indirectbr.ll
ashr-crash.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
basictest.ll [PM] Port LoopSimplify to the new pass manager. 2016-07-09 03:03:01 +00:00
dbg-loc.ll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
dup-preds.ll Verifier: Call verifyModule() from llc and opt 2015-03-27 22:04:28 +00:00
hardertest.ll
indirectbr-backedge.ll
indirectbr.ll
merge-exits.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
notify-scev.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
phi-node-simplify.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
pr26682.ll [LoopSimplify] Preserve LCSSA when merging exit blocks. 2016-06-08 23:13:21 +00:00
pr28272.ll [LoopSimplify] Rebuild LCSSA for the inner loop after separating nested loops. 2016-08-09 22:44:56 +00:00
preserve-scev.ll Make DataLayout Non-Optional in the Module 2015-03-04 18:43:29 +00:00
single-backedge.ll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
unreachable-loop-pred.ll