[PATCH] D130323: revert "[MC] Don't recreate a label if it's already used"
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 17 14:38:05 PDT 2022
nickdesaulniers added a comment.
I think I've found the issue: `AddrLabelMap::getAddrLabelSymbolToEmit` uses `createNamedTempSymbol()` when a `BasicBlock` has its address taken (i.e. `blockaddress`), but it doesn't update the symbol table (`MCContext`'s `Symbols` member), so `AsmParser` can't find the existing symbol.
It looks like in the failing test case `llvm/test/CodeGen/RISCV/inline-asm-S-constraint.ll` that
`createSymbol` is called with `.Ltmp` to create the initial BB label, but then later `getOrCreateSymbol` calls `createSymbol` for `.Ltmp0`.
It seems like `AddrLabelMap::getAddrLabelSymbolToEmit` should have just added `.Ltmp0` to `MCContext`'s `Symbols` then and there.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130323/new/
https://reviews.llvm.org/D130323
More information about the llvm-commits
mailing list