If we have:
bb0:
INLINEASM_BR ... b bb2
bb1:
...
bb2:
ret
it would be nice to taildup that ret into bb0.
Paths
| Differential D143219
[llvm][TailDuplicator] permit taildup'ing pred MBB containing INLINEASM_BR AbandonedPublic Authored by nickdesaulniers on Feb 2 2023, 2:57 PM.
Details
Diff Detail
Unit TestsFailed Event Timeline
Revision Contents
Diff 494441 llvm/lib/CodeGen/TailDuplicator.cpp
llvm/test/CodeGen/X86/callbr-asm-sink.ll
llvm/test/CodeGen/X86/callbr-asm.ll
llvm/test/CodeGen/X86/inline-asm-pic.ll
|
This doesn't seem right... the reasons we want to abort taildup are:
Checking !PredBB->mayHaveInlineAsmBr() shortcuts all those potential reasons.
Might be worth considering implementing a form of taildup that doesn't merge the duplicated block with the predecessor; that would work in more cases without tripping over weird edge cases.