| Index: src/hydrogen-load-elimination.cc
|
| diff --git a/src/hydrogen-load-elimination.cc b/src/hydrogen-load-elimination.cc
|
| index 836bd2d3560676739cebc4669031e30153f8ef26..1198d2b7ab59afeb6318745c0cf45fcf440138bf 100644
|
| --- a/src/hydrogen-load-elimination.cc
|
| +++ b/src/hydrogen-load-elimination.cc
|
| @@ -53,12 +53,7 @@ class HLoadEliminationTable : public ZoneObject {
|
| FieldOf(l->access()),
|
| l->object()->ActualValue()->id()));
|
| HValue* result = load(l);
|
| - if (result != instr &&
|
| - result->type().Equals(instr->type()) &&
|
| - result->representation().Equals(instr->representation()) &&
|
| - (!result->IsLoadNamedField() ||
|
| - HLoadNamedField::cast(instr)->maps()->IsSubset(
|
| - HLoadNamedField::cast(result)->maps()))) {
|
| + if (result != instr && l->CanBeReplacedWith(result)) {
|
| // 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);
|
|
|