[IROutliner] Accomodate blocks containing PHINodes with one entry outside the region...
authorAndrew Litteken <andrew.litteken@gmail.com>
Sun, 1 May 2022 23:14:18 +0000 (18:14 -0500)
committerAndrew Litteken <andrew.litteken@gmail.com>
Sat, 7 May 2022 22:11:21 +0000 (17:11 -0500)
commite38f014c40e94205925403fa75e48244ee31b6c0
tree026240b19e5e66101eb1d0612065a3b4a66ee0d6
parenta385645b470e2d3a1534aae618ea56b31177639f
[IROutliner] Accomodate blocks containing PHINodes with one entry outside the region and others inside the region.

When a PHINode has an incoming block from outside the region, it must be handled specially when assigning a global value number to each incoming value. A PHINode has multiple predecessors, and we must handle this case rather than only the single predecessor case.

Reviewer: paquette

Differential Revision: https://reviews.llvm.org/D124777
llvm/lib/Transforms/IPO/IROutliner.cpp
llvm/test/Transforms/IROutliner/no-external-block-entries.ll [new file with mode: 0644]
llvm/test/Transforms/IROutliner/one-external-incoming-block-phi-node.ll [new file with mode: 0644]