Enable jumps when in -static mode.
authorReed Kotler <rkotler@mips.com>
Thu, 7 Feb 2013 03:49:51 +0000 (03:49 +0000)
committerReed Kotler <rkotler@mips.com>
Thu, 7 Feb 2013 03:49:51 +0000 (03:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174580 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/Mips16InstrInfo.td
test/CodeGen/Mips/br-jmp.ll

index b906f6bcbf87e6281b6477b01ee0f35c5257e090..f0d6a2ace1220d2d611720c8852829a9950b2898 100644 (file)
@@ -1088,7 +1088,7 @@ def: StoreM16_pat<store, SwRxRyOffMemX16>;
 // Unconditional branch
 class UncondBranch16_pat<SDNode OpNode, Instruction I>:
   Mips16Pat<(OpNode bb:$imm16), (I bb:$imm16)> {
-    let Predicates = [RelocPIC, InMips16Mode];
+    let Predicates = [InMips16Mode];
   }
 
 def : Mips16Pat<(MipsJmpLink (i32 tglobaladdr:$dst)),
index 1b5513ab394d545fd92067e39db0a4bf8123edd0..9c48e9162a658a8b060679be42b9fb59dd33340f 100644 (file)
@@ -1,5 +1,7 @@
 ; RUN: llc -march=mipsel -relocation-model=pic < %s | FileCheck %s -check-prefix=CHECK-PIC
 ; RUN: llc -march=mipsel -relocation-model=static < %s | FileCheck %s -check-prefix=CHECK-STATIC
+; RUN: llc -march=mipsel -mcpu=mips16 -relocation-model=pic < %s | FileCheck %s -check-prefix=CHECK-PIC16
+; RUN: llc -march=mipsel -mcpu=mips16 -relocation-model=static < %s | FileCheck %s -check-prefix=CHECK-STATIC16
 
 define void @count(i32 %x, i32 %y, i32 %z) noreturn nounwind readnone {
 entry:
@@ -11,3 +13,5 @@ bosco:                                            ; preds = %bosco, %entry
 
 ; CHECK-PIC: b $BB0_1
 ; CHECK-STATIC: j      $BB0_1
+; CHECK-PIC16: b       $BB0_1
+; CHECK-STATIC16: b    $BB0_1
\ No newline at end of file