[CodeGen][TailDuplicator] Don't duplicate blocks with INLINEASM_BR
authorBill Wendling <isanbard@gmail.com>
Wed, 7 Oct 2020 00:54:36 +0000 (17:54 -0700)
committerBill Wendling <isanbard@gmail.com>
Wed, 7 Oct 2020 01:44:59 +0000 (18:44 -0700)
commitd2c61d2bf9bd1efad49acba2f2751112522686aa
tree37ef2785e21cd85e1f2676dcdb42f0e407dde0b0
parent2f40e20613758b3e11a15494c09f4b6973673d6b
[CodeGen][TailDuplicator] Don't duplicate blocks with INLINEASM_BR

Tail duplication of a block with an INLINEASM_BR may result in a PHI
node on the indirect branch. This is okay, but it also introduces a copy
for that PHI node *after* the INLINEASM_BR, which is not okay.

See: https://github.com/ClangBuiltLinux/linux/issues/1125

Differential Revision: https://reviews.llvm.org/D88823
llvm/lib/CodeGen/TailDuplicator.cpp
llvm/test/CodeGen/X86/tail-dup-asm-goto.ll [new file with mode: 0644]