Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: src/IceTargetLoweringMIPS32.cpp

Issue 2116213002: Subzero: Allow deeper levels of variable splitting. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rename getLinkedToTop() to getLinkedToRoot() Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 {

Powered by Google App Engine
This is Rietveld 408576698