| Index: src/compiler/load-elimination.cc
|
| diff --git a/src/compiler/load-elimination.cc b/src/compiler/load-elimination.cc
|
| index c579673ba8c1ca9176d86aaeef5c3340e3b83ea8..d922d3268e42344018b77e5b9708f78cecde23fc 100644
|
| --- a/src/compiler/load-elimination.cc
|
| +++ b/src/compiler/load-elimination.cc
|
| @@ -393,6 +393,11 @@ Reduction LoadElimination::ReduceTransitionElementsKind(Node* node) {
|
| AbstractState const* state = node_states_.Get(effect);
|
| if (state == nullptr) return NoChange();
|
| if (Node* const object_map = state->LookupField(object, 0)) {
|
| + if (target_map == object_map) {
|
| + // The {object} already has the {target_map}, so this TransitionElements
|
| + // {node} is fully redundant (independent of what {source_map} is).
|
| + return Replace(effect);
|
| + }
|
| state = state->KillField(object, 0, zone());
|
| if (source_map == object_map) {
|
| state = state->AddField(object, 0, target_map, zone());
|
|
|