Add workaround for <rdar://problem/7098328>.
authorDavid Goodwin <david_goodwin@apple.com>
Tue, 28 Jul 2009 18:15:38 +0000 (18:15 +0000)
committerDavid Goodwin <david_goodwin@apple.com>
Tue, 28 Jul 2009 18:15:38 +0000 (18:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77340 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrThumb2.td
test/CodeGen/Thumb2/thumb2-lsr3.ll

index 2affa6389c6e986a9d313f755d412d738a06037d..693040273678d3113b9518540db0a139bf605228 100644 (file)
@@ -714,8 +714,9 @@ defm t2LSR  : T2I_sh_ir<"lsr", BinOpFrag<(srl  node:$LHS, node:$RHS)>>;
 defm t2ASR  : T2I_sh_ir<"asr", BinOpFrag<(sra  node:$LHS, node:$RHS)>>;
 defm t2ROR  : T2I_sh_ir<"ror", BinOpFrag<(rotr node:$LHS, node:$RHS)>>;
 
+// FIXME should be "rrx $dst,$src" once <rdar://problem/7098328> is fixed
 def t2MOVrx : T2sI<(outs GPR:$dst), (ins GPR:$src),
-                   "rrx", " $dst, $src",
+                   "mov", ".w $dst, $src, rrx",
                    [(set GPR:$dst, (ARMrrx GPR:$src))]>;
 
 let Defs = [CPSR] in {
index 9bc4b5b7c511c293ed499b1127d570ce108e3a24..a3f7a1a60353dc7799495461662740223bea297b 100644 (file)
@@ -2,7 +2,7 @@
 
 define i1 @test1(i64 %poscnt, i32 %work) {
 entry:
-; CHECK: rrx r0, r0
+; CHECK: mov.w r0, r0, rrx
 ; CHECK: lsrs.w r1, r1, #1
        %0 = lshr i64 %poscnt, 1
        %1 = icmp eq i64 %0, 0
@@ -11,7 +11,7 @@ entry:
 
 define i1 @test2(i64 %poscnt, i32 %work) {
 entry:
-; CHECK: rrx r0, r0
+; CHECK: mov.w r0, r0, rrx
 ; CHECK: asrs.w r1, r1, #1
        %0 = ashr i64 %poscnt, 1
        %1 = icmp eq i64 %0, 0