[llvm][CallBrPrepare] split critical edges
authorNick Desaulniers <ndesaulniers@google.com>
Fri, 17 Feb 2023 01:46:21 +0000 (17:46 -0800)
committerNick Desaulniers <ndesaulniers@google.com>
Fri, 17 Feb 2023 01:58:33 +0000 (17:58 -0800)
commit0a39af0eb72d0fb1cce592aa5e5a1e3bd08110be
tree695f8c386096bcf285c2a2481fe96a0240636692
parentfb471158aa0da2690beb3be3af2618af2f5bf4df
[llvm][CallBrPrepare] split critical edges

If we have a CallBrInst with output that's used, we need to split
critical edges so that we have some place to insert COPYs for physregs
to virtregs.

Part 2a of
https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8.

Test cases and logic re-purposed from D138078.

Reviewed By: efriedma, void, jyknight

Differential Revision: https://reviews.llvm.org/D139872
llvm/lib/CodeGen/CallBrPrepare.cpp
llvm/test/CodeGen/AArch64/callbr-prepare.ll