[PATCH] D65606: [ARM] Fix invalid symbol redefinition due to duplicated jumptable (PR42760)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 14:43:16 PDT 2019
nikic marked 3 inline comments as done.
nikic added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMInstrThumb.td:1469
let Size = 2, isBranch = 1, isTerminator = 1, isBarrier = 1,
- isIndirectBranch = 1 in {
+ isIndirectBranch = 1, isNotDuplicable = 1 in {
def tTBB_JT : tPseudoInst<(outs),
----------------
efriedma wrote:
> I can't imagine this actually matters, given we only form tbb/tbh in constant islands, but fine.
I've added this for consistency with the t2TBB_JT/t2TBH_JT opcodes. Happy to drop if not needed.
================
Comment at: llvm/test/CodeGen/Thumb/pr42760.ll:2
+; RUN: llc -tail-dup-placement-threshold=3 < %s
+; We only check that this doesn't trigger an error due to duplicated jumptable.
+
----------------
efriedma wrote:
> The goal is that it doesn't crash, yes, but CHECK lines are also important to ensure that you're actually triggering the codepath you think you're triggering, if the compiler changes in the future. In particular, that you're generating a jump table, and it would be feasible to tail-duplicate the jump table branch if it wasn't marked noduplicate).
I've added the CHECK lines now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65606/new/
https://reviews.llvm.org/D65606
More information about the llvm-commits
mailing list