| Index: src/hydrogen-load-elimination.cc
|
| diff --git a/src/hydrogen-load-elimination.cc b/src/hydrogen-load-elimination.cc
|
| index 222811678b4c8175fd027670f7e9d16d869dfa0c..f84eac046b5d88297ba9d75eda72c57e356037af 100644
|
| --- a/src/hydrogen-load-elimination.cc
|
| +++ b/src/hydrogen-load-elimination.cc
|
| @@ -76,7 +76,9 @@ class HLoadEliminationTable : public ZoneObject {
|
| FieldOf(l->access()),
|
| l->object()->ActualValue()->id()));
|
| HValue* result = load(l);
|
| - if (result != instr) {
|
| + if (result != instr &&
|
| + result->type().Equals(instr->type()) &&
|
| + result->representation().Equals(instr->representation())) {
|
| // 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);
|
|
|