diff --git a/llvm/lib/Target/PowerPC/PPC.h b/llvm/lib/Target/PowerPC/PPC.h --- a/llvm/lib/Target/PowerPC/PPC.h +++ b/llvm/lib/Target/PowerPC/PPC.h @@ -105,7 +105,7 @@ /// MO_GOT_FLAG - If this bit is set the symbol reference is to be computed /// via the GOT. For example when combined with the MO_PCREL_FLAG it should /// produce the relocation @got@pcrel. Fixup is VK_PPC_GOT_PCREL. - MO_GOT_FLAG = 32, + MO_GOT_FLAG = 8, /// The next are not flags but distinct values. MO_ACCESS_MASK = 0xf00, diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -2809,7 +2809,7 @@ // 64-bit SVR4 ABI and AIX ABI code are always position-independent. // The actual address of the GlobalValue is stored in the TOC. if (Subtarget.is64BitELFABI() || Subtarget.isAIXABI()) { - if (Subtarget.hasPCRelativeMemops()) { + if (Subtarget.isUsingPCRelativeCalls()) { SDLoc DL(CP); EVT Ty = getPointerTy(DAG.getDataLayout()); SDValue ConstPool = DAG.getTargetConstantPool(C, Ty,