[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/+/1847363 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#64178}
This commit is contained in:
parent
06d0bcbeb3
commit
fabfa417b4
@ -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;
|
||||
}
|
||||
|
22
test/mjsunit/regress/regress-1011980.js
Normal file
22
test/mjsunit/regress/regress-1011980.js
Normal file
@ -0,0 +1,22 @@
|
||||
// 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);
|
Loading…
Reference in New Issue
Block a user