[PATCH] D65606: [ARM] Fix invalid symbol redefinition due to duplicated jumptable (PR42760)

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 14:30:52 PDT 2019


efriedma 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),
----------------
I can't imagine this actually matters, given we only form tbb/tbh in constant islands, but fine.


================
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.
+
----------------
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).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65606/new/

https://reviews.llvm.org/D65606





More information about the llvm-commits mailing list