Index: src/compiler/load-elimination.cc |
diff --git a/src/compiler/load-elimination.cc b/src/compiler/load-elimination.cc |
index e19368d107623f6975c687b8c455b52d13c2d1a9..4980bccacd277e550c089e473e4b2039bf97bd66 100644 |
--- a/src/compiler/load-elimination.cc |
+++ b/src/compiler/load-elimination.cc |
@@ -34,8 +34,9 @@ Reduction LoadElimination::ReduceLoadField(Node* node) { |
effect = NodeProperties::GetEffectInput(effect)) { |
switch (effect->opcode()) { |
case IrOpcode::kLoadField: { |
+ FieldAccess const effect_access = FieldAccessOf(effect->op()); |
if (object == NodeProperties::GetValueInput(effect, 0) && |
- access == FieldAccessOf(effect->op())) { |
+ access == effect_access && effect_access.type->Is(access.type)) { |
Node* const value = effect; |
ReplaceWithValue(node, value); |
return Replace(value); |