HomePhabricator

[LoopInterchange] Handle lcssa PHIs with multiple predecessors

Authored by congzhe on May 11 2021, 6:25 PM.

Description

[LoopInterchange] Handle lcssa PHIs with multiple predecessors

This is a bugfix in the transformation phase.

If the original outer loop header branches to both the inner loop
(header) and the outer loop latch, and if there is an lcssa PHI
node outside the loop nest, then after interchange the new outer latch
will have an lcssa PHI node inserted which has two predecessors, i.e.,
the original outer header and the original outer latch. Currently
the transformation assumes it has only one predecessor (the original
outer latch) and crashes, since the inserted lcssa PHI node does
not take both predecessors as incoming BBs.

Reviewed By: Whitney

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

Details

Committed
congzheMay 11 2021, 6:30 PM
Reviewer
Whitney
Differential Revision
D100792: [LoopInterchange] Handle lcssa PHIs with multiple predecessors
Parents
rG10c309ad81e2: Removing test...
Branches
Unknown
Tags
Unknown