[PATCH] D76961: [BranchFolder] don't remove MBB's that have their address taken
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 18:45:02 PDT 2020
nickdesaulniers added a comment.
In D76961#1951350 <https://reviews.llvm.org/D76961#1951350>, @nickdesaulniers wrote:
> Everything looks good. I don't understand why `INLINEASM_BR` isn't the terminal instruction of `bb.0`. Isn't it marked a terminator in `llvm/include/llvm/Target/Target.td` line 1021? I also also don't understand why the `MachineBasicBlock` has a `terminators` method plural? I thought all blocks have 1 and only 1 terminal instruction?
A colleague today explained to me that this happens with conditional jumps, and later I found such a case with multiple conditional jumps with an unconditional jump being the final instruction.
I have a fix for my test case, but it regresses one of the previous existing test cases. I need to spend more time on it tomorrow. Essentially, ISel is now emitting a messed up PHI node that's missing cases for some of the predecessors, which the machine verifier complains about. I suppose this may be the `agita` (sic) referred to in the comment above `ScheduleDAGSDNodes::EmitSchedule`'s handling of `INLINEASM_BR. :P
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76961/new/
https://reviews.llvm.org/D76961
More information about the llvm-commits
mailing list