[LoopInterchange] Only skip PHIs with incoming values from the inner loop.
authorFlorian Hahn <flo@fhahn.com>
Tue, 12 Nov 2019 10:23:26 +0000 (10:23 +0000)
committerFlorian Hahn <flo@fhahn.com>
Tue, 12 Nov 2019 10:30:51 +0000 (10:30 +0000)
commit1ee93240c02b0fd505a539691d58565376f8acdf
tree48bfc02c116e851c3225cbff82c19719cd72848d
parentec4c96d68566debcc4588c4189b4ef8a5f78729a
[LoopInterchange] Only skip PHIs with incoming values from the inner loop.

Currently we have limited support for outer loops with multiple basic
blocks after the inner loop exit. But the current checks for creating
PHIs for loop exit values only assumes the header and latches of the
outer loop. It is better to just skip incoming values defined in the
original inner loops. Those are handled earlier.

Reviewers: efriedma, mcrosier

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D70059
llvm/lib/Transforms/Scalar/LoopInterchange.cpp
llvm/test/Transforms/LoopInterchange/pr43797-lcssa-for-multiple-outer-loop-blocks.ll [new file with mode: 0644]