[LoopSimplify] Update LCSSA after separating nested loops.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Mon, 18 Jul 2016 19:44:19 +0000 (19:44 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Mon, 18 Jul 2016 19:44:19 +0000 (19:44 +0000)
commitea5b72825b52b3063ecaab135c9594d087f16a08
treecf97b6858697b7ad442150fa315b9b0435351c60
parentc93e10fcbb84f3a9e350104828f8c75bc02a7d51
[LoopSimplify] Update LCSSA after separating nested loops.

Summary:
Usually LCSSA survives this transformation, but in some cases (see
attached test) it doesn't: values from the original loop after
separating might be used from the outer loop. Before the transformation
it was the same loop, so LCSSA phis were not required.

This fixes PR28272.

Reviewers: sanjoy, hfinkel, chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D21665

llvm-svn: 275891
llvm/lib/Transforms/Utils/LoopSimplify.cpp
llvm/test/Transforms/LoopSimplify/pr28272.ll [new file with mode: 0644]