Commit 1646d14d authored by jarin's avatar jarin Committed by Commit bot

[turbofan] Representation inference: fail on operators with untested truncation mode.

Review URL: https://codereview.chromium.org/1820703003

Cr-Commit-Position: refs/heads/master@{#34932}
parent 06832bdc
...@@ -104,15 +104,6 @@ class UseInfo { ...@@ -104,15 +104,6 @@ class UseInfo {
static UseInfo None() { static UseInfo None() {
return UseInfo(MachineRepresentation::kNone, Truncation::None()); return UseInfo(MachineRepresentation::kNone, Truncation::None());
} }
// Truncation to a representation that is smaller than the preferred
// one.
static UseInfo Float64TruncatingToWord32() {
return UseInfo(MachineRepresentation::kFloat64, Truncation::Word32());
}
static UseInfo Word64TruncatingToWord32() {
return UseInfo(MachineRepresentation::kWord64, Truncation::Word32());
}
static UseInfo AnyTruncatingToBool() { static UseInfo AnyTruncatingToBool() {
return UseInfo(MachineRepresentation::kNone, Truncation::Bool()); return UseInfo(MachineRepresentation::kNone, Truncation::Bool());
} }
...@@ -1305,10 +1296,6 @@ class RepresentationSelector { ...@@ -1305,10 +1296,6 @@ class RepresentationSelector {
case IrOpcode::kTruncateFloat64ToInt32: case IrOpcode::kTruncateFloat64ToInt32:
return VisitUnop(node, UseInfo::Float64(), return VisitUnop(node, UseInfo::Float64(),
MachineRepresentation::kWord32); MachineRepresentation::kWord32);
case IrOpcode::kTruncateInt64ToInt32:
// TODO(titzer): Is kTypeInt32 correct here?
return VisitUnop(node, UseInfo::Word64TruncatingToWord32(),
MachineRepresentation::kWord32);
case IrOpcode::kChangeFloat32ToFloat64: case IrOpcode::kChangeFloat32ToFloat64:
return VisitUnop(node, UseInfo::Float32(), return VisitUnop(node, UseInfo::Float32(),
...@@ -1319,13 +1306,6 @@ class RepresentationSelector { ...@@ -1319,13 +1306,6 @@ class RepresentationSelector {
case IrOpcode::kChangeUint32ToFloat64: case IrOpcode::kChangeUint32ToFloat64:
return VisitUnop(node, UseInfo::TruncatingWord32(), return VisitUnop(node, UseInfo::TruncatingWord32(),
MachineRepresentation::kFloat64); MachineRepresentation::kFloat64);
case IrOpcode::kChangeFloat64ToInt32:
return VisitUnop(node, UseInfo::Float64TruncatingToWord32(),
MachineRepresentation::kWord32);
case IrOpcode::kChangeFloat64ToUint32:
return VisitUnop(node, UseInfo::Float64TruncatingToWord32(),
MachineRepresentation::kWord32);
case IrOpcode::kFloat64Add: case IrOpcode::kFloat64Add:
case IrOpcode::kFloat64Sub: case IrOpcode::kFloat64Sub:
case IrOpcode::kFloat64Mul: case IrOpcode::kFloat64Mul:
...@@ -1360,6 +1340,15 @@ class RepresentationSelector { ...@@ -1360,6 +1340,15 @@ class RepresentationSelector {
case IrOpcode::kStateValues: case IrOpcode::kStateValues:
VisitStateValues(node); VisitStateValues(node);
break; break;
// The following opcodes are not produced before representation
// inference runs, so we do not have any real test coverage.
// Simply fail here.
case IrOpcode::kChangeFloat64ToInt32:
case IrOpcode::kChangeFloat64ToUint32:
case IrOpcode::kTruncateInt64ToInt32:
FATAL("Representation inference: unsupported opcodes.");
default: default:
VisitInputs(node); VisitInputs(node);
// Assume the output is tagged. // Assume the output is tagged.
......
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