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

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: 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
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceOperand.h » ('j') | src/IceOperand.h » ('J')
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..af1b6e19b664ee7f9442ec68188d948e578d3500 100644
--- a/src/IceInst.cpp
+++ b/src/IceInst.cpp
@@ -1094,9 +1094,14 @@ 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())
- return true;
+ if (!Dest->hasReg() && !SrcVar->hasReg()) {
+ if (!Dest->hasStackOffset() || !SrcVar->hasStackOffset()) {
+ return false;
+ }
+ if (Dest->getStackOffset() == SrcVar->getStackOffset()) {
John 2016/07/06 16:07:39 I would do: if (Dest.StackOffset != Src.StackOffs
Jim Stichnoth 2016/07/08 10:37:54 Done.
+ return true;
+ }
+ }
return false;
}
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceOperand.h » ('j') | src/IceOperand.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698