[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
Thu Aug 1 13:47:45 PDT 2019


nikic created this revision.
nikic added reviewers: t.p.northover, efriedma.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls, javed.absar.
Herald added a project: LLVM.

Fix for https://bugs.llvm.org/show_bug.cgi?id=42760. A `tBR_JTr` instruction is duplicated by tail duplication, which results in the same jumptable with the same label being emitted twice.

Fix this by marking `tBR_JTr` as not duplicable. The corresponding ARM instructions (`BR_JTr`, `BR_JTm_i12`, `BR_JTm_rs` and `BR_JTadd`) are already marked as not duplicable.

Not sure whether the test-case adds any value, it's a fairly ugly bugpoint reduction of the original issue.


Repository:
  rL LLVM

https://reviews.llvm.org/D65606

Files:
  llvm/lib/Target/ARM/ARMInstrThumb.td
  llvm/test/CodeGen/Thumb/pr42760.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65606.212897.patch
Type: text/x-patch
Size: 10850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190801/33f32c79/attachment.bin>


More information about the llvm-commits mailing list