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

[ptr-compr][turbofan] Adding missing Pointer representation changes

There was a case missing when we have a compressed value that:
* Can be compressed signed
* We know can't be a smi
* Has to be converted to tagged pointer

The case from tagged to compressed was also missing.

This was the proper way of fixing the chromium bug (963917), and it could
fix more things since a conversion was missing.

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: chromium:963917, v8:8977, v8:7703, v8:8982
Change-Id: Id1df8e81bc900fef9bed3539c0ace621810ab1da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1621941Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61690}
parent 9155ea61
......@@ -1735,11 +1735,6 @@ Node* EffectControlLinearizer::LowerPoisonIndex(Node* node) {
void EffectControlLinearizer::LowerCheckMaps(Node* node, Node* frame_state) {
CheckMapsParameters const& p = CheckMapsParametersOf(node->op());
Node* value = node->InputAt(0);
// TODO(v8:8982): Eliminate this decompression when the lightweight map and
// equality checks of compressed values are in place
if (COMPRESS_POINTERS_BOOL) {
value = graph()->NewNode(machine()->ChangeCompressedToTagged(), value);
}
ZoneHandleSet<Map> const& maps = p.maps();
size_t const map_count = maps.size();
......@@ -1849,11 +1844,6 @@ Node* EffectControlLinearizer::LowerCompareMaps(Node* node) {
ZoneHandleSet<Map> const& maps = CompareMapsParametersOf(node->op());
size_t const map_count = maps.size();
Node* value = node->InputAt(0);
// TODO(v8:8982): Eliminate this decompression when the lightweight map and
// equality checks of compressed values are in place
if (COMPRESS_POINTERS_BOOL) {
value = graph()->NewNode(machine()->ChangeCompressedToTagged(), value);
}
auto done = __ MakeLabel(MachineRepresentation::kBit);
......
......@@ -452,7 +452,7 @@ Node* RepresentationChanger::GetTaggedPointerRepresentationFor(
} else if (CanBeCompressedSigned(output_rep) &&
use_info.type_check() == TypeCheckKind::kHeapObject) {
if (!output_type.Maybe(Type::SignedSmall())) {
return node;
op = machine()->ChangeCompressedPointerToTaggedPointer();
}
// TODO(turbofan): Consider adding a Bailout operator that just deopts
// for CompressedSigned output representation.
......@@ -644,7 +644,7 @@ Node* RepresentationChanger::GetCompressedPointerRepresentationFor(
} else if (CanBeTaggedSigned(output_rep) &&
use_info.type_check() == TypeCheckKind::kHeapObject) {
if (!output_type.Maybe(Type::SignedSmall())) {
return node;
op = machine()->ChangeTaggedPointerToCompressedPointer();
}
// TODO(turbofan): Consider adding a Bailout operator that just deopts
// for TaggedSigned output representation.
......
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