[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/+/1621941
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61690}
This commit is contained in:
Santiago Aboy Solanes 2019-05-21 12:50:23 +01:00 committed by Commit Bot
parent 9155ea6196
commit a98ebe98f6
2 changed files with 2 additions and 12 deletions

View File

@ -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);

View File

@ -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.