Don't use movw / movt for iOS static codegen for now to workaround some tools issues. rdar://9514789

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132211 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2011-05-27 20:11:27 +00:00
parent 6205769741
commit 4abce0c90b
2 changed files with 6 additions and 5 deletions

View File

@ -2082,7 +2082,8 @@ SDValue ARMTargetLowering::LowerGlobalAddressDarwin(SDValue Op,
MachineFunction &MF = DAG.getMachineFunction();
ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
if (Subtarget->useMovt()) {
// FIXME: Enable this for static codegen when tool issues are fixed.
if (Subtarget->useMovt() && RelocM != Reloc::Static) {
++NumMovwMovt;
// FIXME: Once remat is capable of dealing with instructions with register
// operands, expand this into two nodes.

View File

@ -16,8 +16,8 @@ entry:
; IOS-PIC: movw r0, :lower16:(L_foo$non_lazy_ptr-(LPC0_0+8))
; IOS-PIC-NEXT: movt r0, :upper16:(L_foo$non_lazy_ptr-(LPC0_0+8))
; IOS-STATIC: movw r0, :lower16:_foo
; IOS-STATIC-NEXT: movt r0, :upper16:_foo
; IOS-STATIC-NOT: movw r0, :lower16:_foo
; IOS-STATIC-NOT: movt r0, :upper16:_foo
ret i32* @foo
}
@ -32,8 +32,8 @@ entry:
; IOS-PIC: movw r1, :lower16:(L_foo$non_lazy_ptr-(LPC1_0+8))
; IOS-PIC-NEXT: movt r1, :upper16:(L_foo$non_lazy_ptr-(LPC1_0+8))
; IOS-STATIC: movw r1, :lower16:_foo
; IOS-STATIC-NEXT: movt r1, :upper16:_foo
; IOS-STATIC-NOT: movw r1, :lower16:_foo
; IOS-STATIC-NOT: movt r1, :upper16:_foo
store i32 %baz, i32* @foo, align 4
ret void
}