Commit f641b7e6 authored by Jaroslav Sevcik's avatar Jaroslav Sevcik Committed by Commit Bot

[turbofan] Fix truncation query names.

Change-Id: I8a1e53d1836f4c68f571d397c35dd6f091e68076
Reviewed-on: https://chromium-review.googlesource.com/577537Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46829}
parent 990dd947
...@@ -53,11 +53,11 @@ class Truncation final { ...@@ -53,11 +53,11 @@ class Truncation final {
bool IsUsedAsFloat64() const { bool IsUsedAsFloat64() const {
return LessGeneral(kind_, TruncationKind::kFloat64); return LessGeneral(kind_, TruncationKind::kFloat64);
} }
bool IdentifiesNaNAndZero() { bool IdentifiesUndefinedAndZero() {
return LessGeneral(kind_, TruncationKind::kWord32) || return LessGeneral(kind_, TruncationKind::kWord32) ||
LessGeneral(kind_, TruncationKind::kBool); LessGeneral(kind_, TruncationKind::kBool);
} }
bool IdentifiesUndefinedAndNaNAndZero() { bool IdentifiesUndefinedAndNaN() {
return LessGeneral(kind_, TruncationKind::kFloat64) || return LessGeneral(kind_, TruncationKind::kFloat64) ||
LessGeneral(kind_, TruncationKind::kWord64); LessGeneral(kind_, TruncationKind::kWord64);
} }
......
...@@ -127,12 +127,12 @@ UseInfo TruncatingUseInfoFromRepresentation(MachineRepresentation rep) { ...@@ -127,12 +127,12 @@ UseInfo TruncatingUseInfoFromRepresentation(MachineRepresentation rep) {
return UseInfo::TruncatingFloat64(); return UseInfo::TruncatingFloat64();
case MachineRepresentation::kFloat32: case MachineRepresentation::kFloat32:
return UseInfo::Float32(); return UseInfo::Float32();
case MachineRepresentation::kWord64:
return UseInfo::TruncatingWord64();
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
case MachineRepresentation::kWord16: case MachineRepresentation::kWord16:
case MachineRepresentation::kWord32: case MachineRepresentation::kWord32:
return UseInfo::TruncatingWord32(); return UseInfo::TruncatingWord32();
case MachineRepresentation::kWord64:
return UseInfo::TruncatingWord64();
case MachineRepresentation::kBit: case MachineRepresentation::kBit:
return UseInfo::Bool(); return UseInfo::Bool();
case MachineRepresentation::kSimd128: case MachineRepresentation::kSimd128:
...@@ -2517,8 +2517,8 @@ class RepresentationSelector { ...@@ -2517,8 +2517,8 @@ class RepresentationSelector {
ProcessRemainingInputs(node, 3); ProcessRemainingInputs(node, 3);
MachineRepresentation output; MachineRepresentation output;
if (truncation.IdentifiesUndefinedAndNaNAndZero()) { if (truncation.IdentifiesUndefinedAndNaN()) {
if (truncation.IdentifiesNaNAndZero()) { if (truncation.IdentifiesUndefinedAndZero()) {
// If undefined is truncated to a non-NaN number, we can use // If undefined is truncated to a non-NaN number, we can use
// the load's representation. // the load's representation.
output = access.machine_type().representation(); output = access.machine_type().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