| 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);
|
|
|