From ec60f7d335c9e18011383036533dbd606bec324e Mon Sep 17 00:00:00 2001 From: Reed Kotler Date: Thu, 7 Feb 2013 03:49:51 +0000 Subject: [PATCH] Enable jumps when in -static mode. llvm-svn: 174580 --- llvm/lib/Target/Mips/Mips16InstrInfo.td | 2 +- llvm/test/CodeGen/Mips/br-jmp.ll | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/Mips/Mips16InstrInfo.td b/llvm/lib/Target/Mips/Mips16InstrInfo.td index b906f6b..f0d6a2a 100644 --- a/llvm/lib/Target/Mips/Mips16InstrInfo.td +++ b/llvm/lib/Target/Mips/Mips16InstrInfo.td @@ -1088,7 +1088,7 @@ def: StoreM16_pat; // Unconditional branch class UncondBranch16_pat: Mips16Pat<(OpNode bb:$imm16), (I bb:$imm16)> { - let Predicates = [RelocPIC, InMips16Mode]; + let Predicates = [InMips16Mode]; } def : Mips16Pat<(MipsJmpLink (i32 tglobaladdr:$dst)), diff --git a/llvm/test/CodeGen/Mips/br-jmp.ll b/llvm/test/CodeGen/Mips/br-jmp.ll index 1b5513a..9c48e91 100644 --- a/llvm/test/CodeGen/Mips/br-jmp.ll +++ b/llvm/test/CodeGen/Mips/br-jmp.ll @@ -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 -- 2.7.4