diff options
| author | Tim Northover <tnorthover@apple.com> | 2013-11-26 12:45:05 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2013-11-26 12:45:05 +0000 |
| commit | fa36dfeeca7701fa26c578785749a6a3fffc090b (patch) | |
| tree | 41c717d3811197156ab00249dd0dacd7641652d9 /llvm/lib/Target | |
| parent | 954ee105287c1b86c743f02a7a8c9ac4bda93f0e (diff) | |
| download | bcm5719-llvm-fa36dfeeca7701fa26c578785749a6a3fffc090b.tar.gz bcm5719-llvm-fa36dfeeca7701fa26c578785749a6a3fffc090b.zip | |
Darwin-ARM: use movw/movt for static relocations
llvm-svn: 195759
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMFastISel.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp index e04a4ef1a1c..975417eba0b 100644 --- a/llvm/lib/Target/ARM/ARMFastISel.cpp +++ b/llvm/lib/Target/ARM/ARMFastISel.cpp @@ -679,14 +679,12 @@ unsigned ARMFastISel::ARMMaterializeGV(const GlobalValue *GV, MVT VT) { if (!Subtarget->isTargetDarwin() && IsThreadLocal) return 0; // Use movw+movt when possible, it avoids constant pool entries. - // Darwin targets don't support movt with Reloc::Static, see - // ARMTargetLowering::LowerGlobalAddressDarwin. Other targets only support - // static movt relocations. + // Non-darwin targets only support static movt relocations in FastISel. if (Subtarget->useMovt() && - Subtarget->isTargetDarwin() == (RelocM != Reloc::Static)) { + (Subtarget->isTargetDarwin() || RelocM == Reloc::Static)) { unsigned Opc; unsigned char TF = 0; - if (Subtarget->isTargetDarwin() && RelocM != Reloc::Static) + if (Subtarget->isTargetDarwin()) TF = ARMII::MO_NONLAZY; switch (RelocM) { diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index f66ff35aaa9..4938c863b6f 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -2537,9 +2537,7 @@ SDValue ARMTargetLowering::LowerGlobalAddressDarwin(SDValue Op, const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal(); Reloc::Model RelocM = getTargetMachine().getRelocationModel(); - // FIXME: Enable this for static codegen when tool issues are fixed. Also - // update ARMFastISel::ARMMaterializeGV. - if (Subtarget->useMovt() && RelocM != Reloc::Static) { + if (Subtarget->useMovt()) { ++NumMovwMovt; // FIXME: Once remat is capable of dealing with instructions with register // operands, expand this into two nodes. |

