Index: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td =================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td @@ -4799,7 +4799,7 @@ // Pseudo instruction ldr Rt, =immediate def t2LDRConstPool : t2AsmPseudo<"ldr${p} $Rt, $immediate", - (ins GPRnopc:$Rt, const_pool_asm_imm:$immediate, pred:$p)>; + (ins GPR:$Rt, const_pool_asm_imm:$immediate, pred:$p)>; // Version w/ the .w suffix. def : t2InstAlias<"ldr${p}.w $Rt, $immediate", (t2LDRConstPool GPRnopc:$Rt, Index: llvm/trunk/test/MC/ARM/ldr-pseudo-unpredictable.s =================================================================== --- llvm/trunk/test/MC/ARM/ldr-pseudo-unpredictable.s +++ llvm/trunk/test/MC/ARM/ldr-pseudo-unpredictable.s @@ -1,8 +1,8 @@ @RUN: llvm-mc -triple armv5-unknown-linux-gnueabi %s | FileCheck --check-prefix=CHECK-ARM %s -@RUN: not llvm-mc -triple thumbv7-unknown-linux-gnueabi %s 2>&1 | FileCheck --check-prefix=CHECK-SP %s +@RUN: llvm-mc -triple thumbv7-unknown-linux-gnueabi %s 2>&1 | FileCheck --check-prefix=CHECK-T2 %s @RUN: not llvm-mc -triple thumbv5-unknown-linux-gnueabi %s 2>&1 | FileCheck --check-prefix=CHECK-NONE %s @RUN: llvm-mc -triple armv5-base-apple-darwin %s | FileCheck --check-prefix=CHECK-DARWIN-ARM %s -@RUN: not llvm-mc -triple thumbv7-base-apple-darwin %s 2>&1 | FileCheck --check-prefix=CHECK-DARWIN-SP %s +@RUN: llvm-mc -triple thumbv7-base-apple-darwin %s 2>&1 | FileCheck --check-prefix=CHECK-DARWIN-T2 %s @RUN: not llvm-mc -triple thumbv5-base.apple.darwin %s 2>&1 | FileCheck --check-prefix=CHECK-NONE %s @ We dont't do the transformation for rt = sp or pc @@ -10,12 +10,12 @@ ldr pc, = 0x4 @ CHECK-ARM: ldr pc, .Ltmp[[TMP0:[0-9]+]] @ CHECK-DARWIN-ARM: ldr pc, Ltmp0 -@ CHECK-SP: error: instruction requires: arm-mode -@ CHECK-DARWIN-SP: error: instruction requires: arm-mode -@ CHECK-NONE: error: instruction requires: arm-mode +@ CHECK-T2: ldr.w pc, .Ltmp[[TMP0:[0-9]+]] +@ CHECK-DARWIN-T2: ldr.w pc, Ltmp0 +@ CHECK-NONE: error: instruction requires: thumb2 ldr sp, = 0x8 @ CHECK-ARM: ldr sp, .Ltmp[[TMP1:[0-9]+]] @ CHECK-DARWIN-ARM: ldr sp, Ltmp1 -@ CHECK-SP: ldr.w sp, .Ltmp[[TMP0:[0-9]+]] -@ CHECK-DARWIN-SP: ldr.w sp, Ltmp0 -@ CHECK-NONE: error: instruction requires: arm-mode +@ CHECK-T2: ldr.w sp, .Ltmp[[TMP1:[0-9]+]] +@ CHECK-DARWIN-T2: ldr.w sp, Ltmp1 +@ CHECK-NONE: error: instruction requires: thumb2