Commit 29d74c78 authored by Ivica Bogosavljevic's avatar Ivica Bogosavljevic Committed by Commit Bot

MIPS64: Add missing case in optimized 32-bit integer compare

MIPS64 doesn't support 32-bit compare operations, instead it
relies that values in registers are properly sign extended to
64-bit. Sign extending and then comparing is a costly operation
that we want to avoid. We use costly compare only in those cases
when one operand is signed and other is unsigned.

This CL adds marks PoisonedLoad and ProtectedLoad of unsigned
values as needing full compare instead of optimized one.

TEST=mjsunit/empirical_max_arraybuffer

Change-Id: I7e6599d7c6e6969b74301cf88f1e5f32ee7b18ce
Reviewed-on: https://chromium-review.googlesource.com/1150536
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54718}
parent db02a0eb
......@@ -1927,10 +1927,8 @@ void VisitWordCompare(InstructionSelector* selector, Node* node,
bool IsNodeUnsigned(Node* n) {
NodeMatcher m(n);
if (m.IsLoad()) {
LoadRepresentation load_rep = LoadRepresentationOf(n->op());
return load_rep.IsUnsigned();
} else if (m.IsUnalignedLoad()) {
if (m.IsLoad() || m.IsUnalignedLoad() || m.IsPoisonedLoad() ||
m.IsProtectedLoad() || m.IsWord32AtomicLoad() || m.IsWord64AtomicLoad()) {
LoadRepresentation load_rep = LoadRepresentationOf(n->op());
return load_rep.IsUnsigned();
} else {
......
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