diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc index 994026bf3a..31770836f5 100644 --- a/src/compiler/simplified-lowering.cc +++ b/src/compiler/simplified-lowering.cc @@ -1237,12 +1237,16 @@ class RepresentationSelector { MachineRepresentation field_representation, int field_offset, Type* field_type, MachineRepresentation value_representation, Node* value) { - if (base_taggedness == kTaggedBase && - field_offset == HeapObject::kMapOffset) { - return kMapWriteBarrier; + WriteBarrierKind write_barrier_kind = + WriteBarrierKindFor(base_taggedness, field_representation, field_type, + value_representation, value); + if (write_barrier_kind != kNoWriteBarrier) { + if (base_taggedness == kTaggedBase && + field_offset == HeapObject::kMapOffset) { + write_barrier_kind = kMapWriteBarrier; + } } - return WriteBarrierKindFor(base_taggedness, field_representation, - field_type, value_representation, value); + return write_barrier_kind; } Graph* graph() const { return jsgraph_->graph(); }