diff --git a/lib/Target/ARM/ARMInstrThumb.td b/lib/Target/ARM/ARMInstrThumb.td index ffc74990dd2..f9278773228 100644 --- a/lib/Target/ARM/ARMInstrThumb.td +++ b/lib/Target/ARM/ARMInstrThumb.td @@ -1189,7 +1189,7 @@ let usesCustomInserter = 1 in // Expanded after instruction selection. // assembler. def tADR : T1I<(outs tGPR:$Rd), (ins t_adrlabel:$addr, pred:$p), - IIC_iALUi, "adr{$p}\t$Rd, #$addr", []>, + IIC_iALUi, "adr{$p}\t$Rd, $addr", []>, T1Encoding<{1,0,1,0,0,?}> { bits<3> Rd; bits<8> addr; diff --git a/test/CodeGen/ARM/select.ll b/test/CodeGen/ARM/select.ll index d1493ee56e4..a19c04452a7 100644 --- a/test/CodeGen/ARM/select.ll +++ b/test/CodeGen/ARM/select.ll @@ -81,7 +81,7 @@ define double @f7(double %a, double %b) { ; CHECK-NEON-NEXT: cmp r0, [[REGISTER_1]] ; CHECK-NEON-NEXT: it eq ; CHECK-NEON-NEXT: moveq [[REGISTER_2]], #4 -; CHECK-NEON-NEXT: adr [[REGISTER_3:r[0-9]+]], #LCPI +; CHECK-NEON-NEXT: adr [[REGISTER_3:r[0-9]+]], LCPI ; CHECK-NEON-NEXT: ldr ; CHECK-NEON: bx diff --git a/test/MC/ARM/basic-thumb-instructions.s b/test/MC/ARM/basic-thumb-instructions.s index 4cdbf61e32d..340743ed098 100644 --- a/test/MC/ARM/basic-thumb-instructions.s +++ b/test/MC/ARM/basic-thumb-instructions.s @@ -47,3 +47,12 @@ _func: @------------------------------------------------------------------------------ @ FIXME: ADD (SP plus register) @------------------------------------------------------------------------------ + + +@------------------------------------------------------------------------------ +@ ADR +@------------------------------------------------------------------------------ + adr r2, _baz + +@ CHECK: adr r2, _baz @ encoding: [A,0xa2] + @ fixup A - offset: 0, value: _baz, kind: fixup_thumb_adr_pcrel_10