| Index: src/IceTargetLoweringMIPS32.cpp
|
| diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp
|
| index 5fd0901ffbd405b21db5da17fcc2fa7ee72ce9bd..9d1d57181733fdaedbdd3b0aadac8cf1ac325ada 100644
|
| --- a/src/IceTargetLoweringMIPS32.cpp
|
| +++ b/src/IceTargetLoweringMIPS32.cpp
|
| @@ -468,9 +468,10 @@ OperandMIPS32Mem *TargetMIPS32::formMemoryOperand(Operand *Operand, Type Ty) {
|
| // to work with. MIPS always requires a base register, so just use that to
|
| // hold the operand.
|
| auto *Base = llvm::cast<Variable>(legalize(Operand, Legal_Reg));
|
| + const int32_t Offset = Base->hasStackOffset() ? Base->getStackOffset() : 0;
|
| return OperandMIPS32Mem::create(
|
| - Func, Ty, Base, llvm::cast<ConstantInteger32>(
|
| - Ctx->getConstantInt32(Base->getStackOffset())));
|
| + Func, Ty, Base,
|
| + llvm::cast<ConstantInteger32>(Ctx->getConstantInt32(Offset)));
|
| }
|
|
|
| void TargetMIPS32::emitVariable(const Variable *Var) const {
|
|
|