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

Unified Diff: src/IceInst.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: Code review changes 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
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInst.cpp
diff --git a/src/IceInst.cpp b/src/IceInst.cpp
index f9cfdddf60c13b41771fd4a9fa80dd6d46edd2db..3a07b52e4f97a755a6249f0ac1e1691332483941 100644
--- a/src/IceInst.cpp
+++ b/src/IceInst.cpp
@@ -1094,9 +1094,15 @@ bool checkForRedundantAssign(const Variable *Dest, const Operand *Source) {
// upper 32 bits of rax. We need to recognize and preserve these.
return true;
}
- if (!Dest->hasReg() && !SrcVar->hasReg() &&
- Dest->getStackOffset() == SrcVar->getStackOffset())
+ if (!Dest->hasReg() && !SrcVar->hasReg()) {
+ if (!Dest->hasStackOffset() || !SrcVar->hasStackOffset()) {
+ return false;
+ }
+ if (Dest->getStackOffset() != SrcVar->getStackOffset()) {
+ return false;
+ }
return true;
+ }
return false;
}
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698