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

Unified Diff: src/hydrogen-load-elimination.cc

Issue 244383002: Fix field type handling in load elimination. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 6 years, 8 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/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-load-elimination.cc
diff --git a/src/hydrogen-load-elimination.cc b/src/hydrogen-load-elimination.cc
index f84eac046b5d88297ba9d75eda72c57e356037af..094793473aeacb7ac4f25a981194f836780a3091 100644
--- a/src/hydrogen-load-elimination.cc
+++ b/src/hydrogen-load-elimination.cc
@@ -78,7 +78,10 @@ class HLoadEliminationTable : public ZoneObject {
HValue* result = load(l);
if (result != instr &&
result->type().Equals(instr->type()) &&
- result->representation().Equals(instr->representation())) {
+ result->representation().Equals(instr->representation()) &&
+ (!result->IsLoadNamedField() ||
+ HLoadNamedField::cast(instr)->map_set()->IsSubset(
+ HLoadNamedField::cast(result)->map_set()))) {
// The load can be replaced with a previous load or a value.
TRACE((" replace L%d -> v%d\n", instr->id(), result->id()));
instr->DeleteAndReplaceWith(result);
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698