Commit e31678df authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[compiler,x64] Be more permissive in CanBeMemoryOperand

I noticed that, with pointer-compression enabled, in map checks we no
longer load the map as part of the cmp instruction:

movl rcx,[rdx-0x1]
movl rdi,0x8286f8d  ;; (compressed) object: <Map(HOLEY_ELEMENTS)>
cmpl rdi,rcx

This CL restores that:

movl rcx,0x82c6f8d  ;; (compressed) object: <Map(HOLEY_ELEMENTS)>
cmpl [rdx-0x1],rcx

Change-Id: Ifcc7f34fddf6aa423c0a26066ac124e9757cb9ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320653Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69130}
parent 49749bb9
...@@ -83,7 +83,8 @@ class X64OperandGenerator final : public OperandGenerator { ...@@ -83,7 +83,8 @@ class X64OperandGenerator final : public OperandGenerator {
// When pointer compression is enabled 32-bit memory operands can be // When pointer compression is enabled 32-bit memory operands can be
// used for tagged values. // used for tagged values.
return rep == MachineRepresentation::kWord32 || return rep == MachineRepresentation::kWord32 ||
(COMPRESS_POINTERS_BOOL && IsAnyTagged(rep)); (COMPRESS_POINTERS_BOOL &&
(IsAnyTagged(rep) || IsAnyCompressed(rep)));
case kX64Cmp16: case kX64Cmp16:
case kX64Test16: case kX64Test16:
return rep == MachineRepresentation::kWord16; return rep == MachineRepresentation::kWord16;
......
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