This fixes a crash observed after
https://reviews.llvm.org/D129997.
Similar to D88823.
Differential D130127
[llvm][TailDuplicator] don't taildup isInlineAsmBrIndirectTargets nickdesaulniers on Jul 19 2022, 2:55 PM. Authored by
Details
Diff Detail
Event TimelineComment Actions Going to throw a -1 on this; I think we should instead revert https://reviews.llvm.org/D129997 for now. This patch needs the test case from https://reviews.llvm.org/D129997#3663878 added anyways. I also think it might be something else going wrong in TailDuplicator::tailDuplicate that's messing up the predaccessor list.
|
If I'm understanding correctly, the issue here is that PredBB might contain an INLINEASM_BR. We're checking TailBB->isInlineAsmBrIndirectTarget because we don't have any convenient way to check the relevant property of PredBB. This makes the code in callbr-asm-outputs.ll, but we can't easily avoid it. Is that correct?
Please add a comment to explain that. And maybe we should consider adding some more direct way to check if a block contains an INLINEASM_BR.