Commit c0e65ea8 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Extend the type fixup to LoadField as well.

For LoadElimination we must not replace LoadField nodes with other nodes
whose types are not a subtype of the original LoadField type, as that
breaks the verifier. We already fixed that earlier for store to load
forwarding, but the fix didn't cover LoadField forwarding.

This actually still generates the correct code even w/o the fix, but
since recently fails due to stronger checking in representation
selection. So this makes clusterfuzz happy again.

R=mvstanton@chromium.org
BUG=chromium:607899
LOG=n

Review-Url: https://codereview.chromium.org/1934973002
Cr-Commit-Position: refs/heads/master@{#35930}
parent 4aa02441
...@@ -34,8 +34,9 @@ Reduction LoadElimination::ReduceLoadField(Node* node) { ...@@ -34,8 +34,9 @@ Reduction LoadElimination::ReduceLoadField(Node* node) {
effect = NodeProperties::GetEffectInput(effect)) { effect = NodeProperties::GetEffectInput(effect)) {
switch (effect->opcode()) { switch (effect->opcode()) {
case IrOpcode::kLoadField: { case IrOpcode::kLoadField: {
FieldAccess const effect_access = FieldAccessOf(effect->op());
if (object == NodeProperties::GetValueInput(effect, 0) && if (object == NodeProperties::GetValueInput(effect, 0) &&
access == FieldAccessOf(effect->op())) { access == effect_access && effect_access.type->Is(access.type)) {
Node* const value = effect; Node* const value = effect;
ReplaceWithValue(node, value); ReplaceWithValue(node, value);
return Replace(value); return Replace(value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment