diff --git a/lib/Target/PowerPC/PPCCodeEmitter.cpp b/lib/Target/PowerPC/PPCCodeEmitter.cpp index 68f9cccc4ad..2b0c0cfa73f 100644 --- a/lib/Target/PowerPC/PPCCodeEmitter.cpp +++ b/lib/Target/PowerPC/PPCCodeEmitter.cpp @@ -197,7 +197,8 @@ int PPC32CodeEmitter::getMachineOpValue(MachineInstr &MI, MachineOperand &MO) { assert(MovePCtoLROffset && "MovePCtoLR not seen yet?"); Reloc = PPC::reloc_absolute_loadhi; Offset = -((intptr_t)MovePCtoLROffset+4); - } else if (MI.getOpcode() == PPC::LA) { + } else if (MI.getOpcode() == PPC::LA || MI.getOpcode() == PPC::LWZ || + MI.getOpcode() == PPC::LFS || MI.getOpcode() == PPC::LFD) { assert(MovePCtoLROffset && "MovePCtoLR not seen yet?"); Reloc = PPC::reloc_absolute_la; Offset = -((intptr_t)MovePCtoLROffset+4);