mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
Match SelectionDAG logic for enabling movt.
Darwin doesn't do static, and ELF targets only support static. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147740 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eb3d460b25
commit
8f37a2422e
@ -620,7 +620,11 @@ unsigned ARMFastISel::ARMMaterializeGV(const GlobalValue *GV, EVT VT) {
|
||||
unsigned DestReg = createResultReg(TLI.getRegClassFor(VT));
|
||||
|
||||
// Use movw+movt when possible, it avoids constant pool entries.
|
||||
if (Subtarget->isTargetDarwin() && Subtarget->useMovt()) {
|
||||
// Darwin targets don't support movt with Reloc::Static, see
|
||||
// ARMTargetLowering::LowerGlobalAddressDarwin. Other targets only support
|
||||
// static movt relocations.
|
||||
if (Subtarget->useMovt() &&
|
||||
Subtarget->isTargetDarwin() == (RelocM != Reloc::Static)) {
|
||||
unsigned Opc;
|
||||
switch (RelocM) {
|
||||
case Reloc::PIC_:
|
||||
|
@ -2166,7 +2166,8 @@ SDValue ARMTargetLowering::LowerGlobalAddressDarwin(SDValue Op,
|
||||
MachineFunction &MF = DAG.getMachineFunction();
|
||||
ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
|
||||
|
||||
// FIXME: Enable this for static codegen when tool issues are fixed.
|
||||
// FIXME: Enable this for static codegen when tool issues are fixed. Also
|
||||
// update ARMFastISel::ARMMaterializeGV.
|
||||
if (Subtarget->useMovt() && RelocM != Reloc::Static) {
|
||||
++NumMovwMovt;
|
||||
// FIXME: Once remat is capable of dealing with instructions with register
|
||||
|
Loading…
Reference in New Issue
Block a user