summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/PowerPC/PPCInstrInfo.cpp2
-rw-r--r--llvm/test/CodeGen/PowerPC/stack-protector.ll2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
index 9b682dae7a5..204dc28ba25 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -1864,7 +1864,7 @@ bool PPCInstrInfo::expandPostRAPseudo(MachineBasicBlock::iterator MI) const {
"Only Linux target is expected to contain LOAD_STACK_GUARD");
const int64_t Offset = Subtarget.isPPC64() ? -0x7010 : -0x7008;
const unsigned Reg = Subtarget.isPPC64() ? PPC::X13 : PPC::R2;
- MI->setDesc(get(PPC::LD));
+ MI->setDesc(get(Subtarget.isPPC64() ? PPC::LD : PPC::LWZ));
MachineInstrBuilder(*MI->getParent()->getParent(), MI)
.addImm(Offset)
.addReg(Reg);
diff --git a/llvm/test/CodeGen/PowerPC/stack-protector.ll b/llvm/test/CodeGen/PowerPC/stack-protector.ll
index 8760f193e50..57d1c7e52b1 100644
--- a/llvm/test/CodeGen/PowerPC/stack-protector.ll
+++ b/llvm/test/CodeGen/PowerPC/stack-protector.ll
@@ -5,7 +5,7 @@
; DARWIN32: __stack_chk_guard
; DARWIN64: __stack_chk_guard
-; LINUX32: ld {{[0-9]+}}, -28680(2)
+; LINUX32: lwz {{[0-9]+}}, -28680(2)
; LINUX64: ld {{[0-9]+}}, -28688(13)
; DARWIN32: __stack_chk_fail
OpenPOWER on IntegriCloud