[llvm-branch-commits] [llvm-branch] r367808 - Merging r367753:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 5 00:49:21 PDT 2019


Author: hans
Date: Mon Aug  5 00:49:21 2019
New Revision: 367808

URL: http://llvm.org/viewvc/llvm-project?rev=367808&view=rev
Log:
Merging r367753:
------------------------------------------------------------------------
r367753 | nikic | 2019-08-03 08:47:23 +0200 (Sat, 03 Aug 2019) | 12 lines

[Thumb] Fix invalid symbol redefinition due to duplicated jumptable (PR42760)

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/Thumb instructions are already marked as not duplicable.
Additionally also mark tTBB_JT and tTBH_JT to be consistent with
Thumb2, even though this shouldn't be strictly necessary.

Differential Revision: https://reviews.llvm.org/D65606
------------------------------------------------------------------------

Added:
    llvm/branches/release_90/test/CodeGen/Thumb/pr42760.ll
      - copied unchanged from r367753, llvm/trunk/test/CodeGen/Thumb/pr42760.ll
Modified:
    llvm/branches/release_90/   (props changed)
    llvm/branches/release_90/lib/Target/ARM/ARMInstrThumb.td

Propchange: llvm/branches/release_90/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug  5 00:49:21 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,366431,366481,366487,366527,366570,366925,367030,367062,367124,367215,367292,367304,367314,367340-367341,367394,367396,367398,367417
+/llvm/trunk:155241,366431,366481,366487,366527,366570,366925,367030,367062,367124,367215,367292,367304,367314,367340-367341,367394,367396,367398,367417,367753

Modified: llvm/branches/release_90/lib/Target/ARM/ARMInstrThumb.td
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/lib/Target/ARM/ARMInstrThumb.td?rev=367808&r1=367807&r2=367808&view=diff
==============================================================================
--- llvm/branches/release_90/lib/Target/ARM/ARMInstrThumb.td (original)
+++ llvm/branches/release_90/lib/Target/ARM/ARMInstrThumb.td Mon Aug  5 00:49:21 2019
@@ -592,6 +592,7 @@ let isBranch = 1, isTerminator = 1, isBa
                       [(ARMbrjt tGPR:$target, tjumptable:$jt)]>,
                       Sched<[WriteBrTbl]> {
     let Size = 2;
+    let isNotDuplicable = 1;
     list<Predicate> Predicates = [IsThumb, IsThumb1Only];
   }
 }
@@ -1465,7 +1466,7 @@ def tLEApcrelJT : tPseudoInst<(outs tGPR
 // Thumb-1 doesn't have the TBB or TBH instructions, but we can synthesize them
 // and make use of the same compressed jump table format as Thumb-2.
 let Size = 2, isBranch = 1, isTerminator = 1, isBarrier = 1,
-    isIndirectBranch = 1 in {
+    isIndirectBranch = 1, isNotDuplicable = 1 in {
 def tTBB_JT : tPseudoInst<(outs),
         (ins tGPRwithpc:$base, tGPR:$index, i32imm:$jt, i32imm:$pclbl), 0,
          IIC_Br, []>, Sched<[WriteBr]>;




More information about the llvm-branch-commits mailing list