Commit fabfa417 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[ptr-compr] Remove ChangeTaggedSignedToCompressedSigned optimization

CheckedInt32ToTaggedSigned -> ChangeTaggedSignedToCompressedSigned was
being simplified to CheckedInt32ToCompressedSigned. However, sometimes
the effect chain is not propagated correctly. Since we have plans to
remove the Compressed MachineRepresentation, we can remove this
optimization now.

Bug: v8:7703, chromium:1011980
Change-Id: I9198c73666848f89db96928259af68400d442229
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1847363Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64178}
parent 06d0bcbe
......@@ -155,23 +155,6 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) {
Node* new_node = graph()->NewNode(
simplified()->ChangeInt31ToCompressedSigned(), m.InputAt(0));
return Replace(new_node);
} else if (m.IsCheckedInt32ToTaggedSigned()) {
// Create a new checked node that outputs CompressedSigned values, with
// an explicit decompression after it.
Node* new_checked = graph()->CloneNode(m.node());
NodeProperties::ChangeOp(
new_checked, simplified()->CheckedInt32ToCompressedSigned(
CheckParametersOf(m.node()->op()).feedback()));
Node* new_decompression = graph()->NewNode(
machine()->ChangeCompressedSignedToTaggedSigned(), new_checked);
// For all uses of the old checked node, instead insert the new "checked
// + decompression". Also, update control and effect.
ReplaceWithValue(m.node(), new_decompression, new_checked, new_checked);
// In the current node, we can skip the decompression since we are going
// to have a Decompression + Compression combo.
return Replace(new_checked);
}
break;
}
......
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --allow-natives-syntax
let hex_b = 0x0b;
let hex_d = 0x0d;
let hex_20 = 0x20;
let hex_52 = 0x52;
let hex_fe = 0xfe;
function f(a) {
let unused = [ a / 8, ...[ ...[ ...[], a / 8, ...[ 7, hex_fe, a, 0, 0, hex_20,
6, hex_52, hex_d, 0, hex_b], 0, hex_b], hex_b]];
}
%PrepareFunctionForOptimization(f)
f(64)
f(64);
%OptimizeFunctionOnNextCall(f);
f(64);
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