Commit f5961f90 authored by jarin's avatar jarin Committed by Commit bot

[turbofan] Change number operations to handle Undefined as well.

This allows us to remove the turbofan bailout that we introduced
as a response to crbug.com/589792.

BUG=chromium:589792
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#35493}
parent b9a2cf9e
......@@ -284,7 +284,8 @@ Reduction ChangeLowering::ChangeTaggedToUI32(Node* value, Node* control,
? machine()->ChangeFloat64ToInt32()
: machine()->ChangeFloat64ToUint32();
if (NodeProperties::GetType(value)->Is(Type::TaggedPointer())) {
if (NodeProperties::GetType(value)->Is(Type::TaggedPointer()) &&
NodeProperties::GetType(value)->Is(Type::Number())) {
return Replace(graph()->NewNode(op, LoadHeapNumberValue(value, control)));
}
......@@ -292,15 +293,38 @@ Reduction ChangeLowering::ChangeTaggedToUI32(Node* value, Node* control,
Node* branch =
graph()->NewNode(common()->Branch(BranchHint::kFalse), check, control);
Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
Node* vtrue = graph()->NewNode(op, LoadHeapNumberValue(value, if_true));
Node* if_not_smi = graph()->NewNode(common()->IfTrue(), branch);
Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
Node* vfalse = ChangeSmiToInt32(value);
Node* vnot_smi;
if (NodeProperties::GetType(value)->Maybe(Type::Undefined())) {
Node* check_undefined = graph()->NewNode(machine()->WordEqual(), value,
jsgraph()->UndefinedConstant());
Node* branch_undefined = graph()->NewNode(
common()->Branch(BranchHint::kFalse), check_undefined, if_not_smi);
Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false);
Node* if_undefined = graph()->NewNode(common()->IfTrue(), branch_undefined);
Node* vundefined = jsgraph()->Int32Constant(0);
Node* if_not_undefined =
graph()->NewNode(common()->IfFalse(), branch_undefined);
Node* vheap_number =
graph()->NewNode(op, LoadHeapNumberValue(value, if_not_undefined));
if_not_smi =
graph()->NewNode(common()->Merge(2), if_undefined, if_not_undefined);
vnot_smi =
graph()->NewNode(common()->Phi(MachineRepresentation::kWord32, 2),
vundefined, vheap_number, if_not_smi);
} else {
vnot_smi = graph()->NewNode(op, LoadHeapNumberValue(value, if_not_smi));
}
Node* if_smi = graph()->NewNode(common()->IfFalse(), branch);
Node* vfrom_smi = ChangeSmiToInt32(value);
Node* merge = graph()->NewNode(common()->Merge(2), if_not_smi, if_smi);
Node* phi = graph()->NewNode(common()->Phi(MachineRepresentation::kWord32, 2),
vtrue, vfalse, merge);
vnot_smi, vfrom_smi, merge);
return Replace(phi);
}
......@@ -389,15 +413,39 @@ Reduction ChangeLowering::ChangeTaggedToFloat64(Node* value, Node* control) {
Node* branch =
graph()->NewNode(common()->Branch(BranchHint::kFalse), check, control);
Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
Node* vtrue = LoadHeapNumberValue(value, if_true);
Node* if_not_smi = graph()->NewNode(common()->IfTrue(), branch);
Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
Node* vfalse = ChangeSmiToFloat64(value);
Node* vnot_smi;
if (NodeProperties::GetType(value)->Maybe(Type::Undefined())) {
Node* check_undefined = graph()->NewNode(machine()->WordEqual(), value,
jsgraph()->UndefinedConstant());
Node* branch_undefined = graph()->NewNode(
common()->Branch(BranchHint::kFalse), check_undefined, if_not_smi);
Node* merge = graph()->NewNode(common()->Merge(2), if_true, if_false);
Node* phi = graph()->NewNode(
common()->Phi(MachineRepresentation::kFloat64, 2), vtrue, vfalse, merge);
Node* if_undefined = graph()->NewNode(common()->IfTrue(), branch_undefined);
Node* vundefined =
jsgraph()->Float64Constant(std::numeric_limits<double>::quiet_NaN());
Node* if_not_undefined =
graph()->NewNode(common()->IfFalse(), branch_undefined);
Node* vheap_number = LoadHeapNumberValue(value, if_not_undefined);
if_not_smi =
graph()->NewNode(common()->Merge(2), if_undefined, if_not_undefined);
vnot_smi =
graph()->NewNode(common()->Phi(MachineRepresentation::kFloat64, 2),
vundefined, vheap_number, if_not_smi);
} else {
vnot_smi = LoadHeapNumberValue(value, if_not_smi);
}
Node* if_smi = graph()->NewNode(common()->IfFalse(), branch);
Node* vfrom_smi = ChangeSmiToFloat64(value);
Node* merge = graph()->NewNode(common()->Merge(2), if_not_smi, if_smi);
Node* phi =
graph()->NewNode(common()->Phi(MachineRepresentation::kFloat64, 2),
vnot_smi, vfrom_smi, merge);
return Replace(phi);
}
......
......@@ -640,7 +640,13 @@ std::ostream& operator<<(std::ostream& os, const AsRPO& ar) {
if (j++ > 0) os << ", ";
os << "#" << SafeId(i) << ":" << SafeMnemonic(i);
}
os << ")" << std::endl;
os << ")";
if (NodeProperties::IsTyped(n)) {
os << " [Type: ";
NodeProperties::GetType(n)->PrintTo(os);
os << "]";
}
os << std::endl;
}
}
return os;
......
......@@ -27,7 +27,7 @@ class JSBinopReduction final {
JSBinopReduction(JSTypedLowering* lowering, Node* node)
: lowering_(lowering), node_(node) {}
void ConvertInputsToNumber(Node* frame_state) {
void ConvertInputsToNumberOrUndefined(Node* frame_state) {
// To convert the inputs to numbers, we have to provide frame states
// for lazy bailouts in the ToNumber conversions.
// We use a little hack here: we take the frame state before the binary
......@@ -46,11 +46,11 @@ class JSBinopReduction final {
ConvertBothInputsToNumber(&left_input, &right_input, frame_state);
} else {
left_input = left_is_primitive
? ConvertPlainPrimitiveToNumber(left())
? ConvertPlainPrimitiveToNumberOrUndefined(left())
: ConvertSingleInputToNumber(
left(), CreateFrameStateForLeftInput(frame_state));
right_input = right_is_primitive
? ConvertPlainPrimitiveToNumber(right())
? ConvertPlainPrimitiveToNumberOrUndefined(right())
: ConvertSingleInputToNumber(
right(), CreateFrameStateForRightInput(
frame_state, left_input));
......@@ -242,11 +242,14 @@ class JSBinopReduction final {
frame_state->InputAt(kFrameStateOuterStateInput));
}
Node* ConvertPlainPrimitiveToNumber(Node* node) {
Node* ConvertPlainPrimitiveToNumberOrUndefined(Node* node) {
DCHECK(NodeProperties::GetType(node)->Is(Type::PlainPrimitive()));
// Avoid inserting too many eager ToNumber() operations.
Reduction const reduction = lowering_->ReduceJSToNumberInput(node);
if (reduction.Changed()) return reduction.replacement();
if (NodeProperties::GetType(node)->Is(Type::NumberOrUndefined())) {
return node;
}
return graph()->NewNode(
javascript()->ToNumber(), node, jsgraph()->NoContextConstant(),
jsgraph()->EmptyFrameState(), graph()->start(), graph()->start());
......@@ -360,14 +363,14 @@ Reduction JSTypedLowering::ReduceJSAdd(Node* node) {
if (flags() & kDisableBinaryOpReduction) return NoChange();
JSBinopReduction r(this, node);
if (r.BothInputsAre(Type::Number())) {
if (r.BothInputsAre(Type::NumberOrUndefined())) {
// JSAdd(x:number, y:number) => NumberAdd(x, y)
return r.ChangeToPureOperator(simplified()->NumberAdd(), Type::Number());
return ReduceNumberBinop(node, simplified()->NumberAdd());
}
if (r.NeitherInputCanBe(Type::StringOrReceiver())) {
// JSAdd(x:-string, y:-string) => NumberAdd(ToNumber(x), ToNumber(y))
Node* frame_state = NodeProperties::GetFrameStateInput(node, 1);
r.ConvertInputsToNumber(frame_state);
r.ConvertInputsToNumberOrUndefined(frame_state);
return r.ChangeToPureOperator(simplified()->NumberAdd(), Type::Number());
}
if (r.OneInputIs(Type::String())) {
......@@ -414,13 +417,13 @@ Reduction JSTypedLowering::ReduceNumberBinop(Node* node,
JSBinopReduction r(this, node);
if (numberOp == simplified()->NumberModulus()) {
if (r.BothInputsAre(Type::Number())) {
if (r.BothInputsAre(Type::NumberOrUndefined())) {
return r.ChangeToPureOperator(numberOp, Type::Number());
}
return NoChange();
}
Node* frame_state = NodeProperties::GetFrameStateInput(node, 1);
r.ConvertInputsToNumber(frame_state);
r.ConvertInputsToNumberOrUndefined(frame_state);
return r.ChangeToPureOperator(numberOp, Type::Number());
}
......@@ -430,7 +433,7 @@ Reduction JSTypedLowering::ReduceInt32Binop(Node* node, const Operator* intOp) {
JSBinopReduction r(this, node);
Node* frame_state = NodeProperties::GetFrameStateInput(node, 1);
r.ConvertInputsToNumber(frame_state);
r.ConvertInputsToNumberOrUndefined(frame_state);
r.ConvertInputsToUI32(kSigned, kSigned);
return r.ChangeToPureOperator(intOp, Type::Integral32());
}
......@@ -443,7 +446,7 @@ Reduction JSTypedLowering::ReduceUI32Shift(Node* node,
JSBinopReduction r(this, node);
Node* frame_state = NodeProperties::GetFrameStateInput(node, 1);
r.ConvertInputsToNumber(frame_state);
r.ConvertInputsToNumberOrUndefined(frame_state);
r.ConvertInputsToUI32(left_signedness, kUnsigned);
return r.ChangeToPureOperator(shift_op);
}
......@@ -489,7 +492,7 @@ Reduction JSTypedLowering::ReduceJSComparison(Node* node) {
} else {
// TODO(turbofan): mixed signed/unsigned int32 comparisons.
Node* frame_state = NodeProperties::GetFrameStateInput(node, 1);
r.ConvertInputsToNumber(frame_state);
r.ConvertInputsToNumberOrUndefined(frame_state);
less_than = simplified()->NumberLessThan();
less_than_or_equal = simplified()->NumberLessThanOrEqual();
}
......@@ -611,7 +614,7 @@ Reduction JSTypedLowering::ReduceJSStrictEqual(Node* node, bool invert) {
return r.ChangeToStringComparisonOperator(simplified()->StringEqual(),
invert);
}
if (r.BothInputsAre(Type::Number())) {
if (r.BothInputsAre(Type::NumberOrUndefined())) {
return r.ChangeToPureOperator(simplified()->NumberEqual(), invert);
}
// TODO(turbofan): js-typed-lowering of StrictEqual(mixed types)
......@@ -1018,7 +1021,7 @@ Reduction JSTypedLowering::ReduceJSStoreProperty(Node* node) {
Node* effect = NodeProperties::GetEffectInput(node);
Node* control = NodeProperties::GetControlInput(node);
// Convert to a number first.
if (!value_type->Is(Type::Number())) {
if (!value_type->Is(Type::NumberOrUndefined())) {
Reduction number_reduction = ReduceJSToNumberInput(value);
if (number_reduction.Changed()) {
value = number_reduction.replacement();
......
......@@ -253,7 +253,7 @@ Node* RepresentationChanger::GetFloat32RepresentationFor(
op = machine()->TruncateFloat64ToFloat32();
}
} else if (output_rep == MachineRepresentation::kTagged) {
if (output_type->Is(Type::Number())) {
if (output_type->Is(Type::NumberOrUndefined())) {
op = simplified()
->ChangeTaggedToFloat64(); // tagged -> float64 -> float32
node = jsgraph()->graph()->NewNode(op, node);
......@@ -305,7 +305,7 @@ Node* RepresentationChanger::GetFloat64RepresentationFor(
op = machine()->ChangeUint32ToFloat64();
}
} else if (output_rep == MachineRepresentation::kTagged) {
if (output_type->Is(Type::Number())) {
if (output_type->Is(Type::NumberOrUndefined())) {
op = simplified()->ChangeTaggedToFloat64();
}
} else if (output_rep == MachineRepresentation::kFloat32) {
......
......@@ -31,6 +31,9 @@ class Truncation final {
bool TruncatesToWord32() const {
return LessGeneral(kind_, TruncationKind::kWord32);
}
bool TruncatesToFloat64() const {
return LessGeneral(kind_, TruncationKind::kFloat64);
}
bool TruncatesNaNToZero() {
return LessGeneral(kind_, TruncationKind::kWord32) ||
LessGeneral(kind_, TruncationKind::kBool);
......
......@@ -84,10 +84,10 @@ class UseInfo {
static UseInfo Bool() {
return UseInfo(MachineRepresentation::kBit, Truncation::Bool());
}
static UseInfo Float32() {
static UseInfo TruncatingFloat32() {
return UseInfo(MachineRepresentation::kFloat32, Truncation::Float32());
}
static UseInfo Float64() {
static UseInfo TruncatingFloat64() {
return UseInfo(MachineRepresentation::kFloat64, Truncation::Float64());
}
static UseInfo PointerInt() {
......@@ -122,15 +122,15 @@ UseInfo TruncatingUseInfoFromRepresentation(MachineRepresentation rep) {
case MachineRepresentation::kTagged:
return UseInfo::AnyTagged();
case MachineRepresentation::kFloat64:
return UseInfo::Float64();
return UseInfo::TruncatingFloat64();
case MachineRepresentation::kFloat32:
return UseInfo::Float32();
return UseInfo::TruncatingFloat32();
case MachineRepresentation::kWord64:
return UseInfo::TruncatingWord64();
return UseInfo::TruncatingWord64();
case MachineRepresentation::kWord8:
case MachineRepresentation::kWord16:
case MachineRepresentation::kWord32:
return UseInfo::TruncatingWord32();
return UseInfo::TruncatingWord32();
case MachineRepresentation::kBit:
return UseInfo::Bool();
case MachineRepresentation::kSimd128: // Fall through.
......@@ -511,7 +511,8 @@ class RepresentationSelector {
// Helpers for specific types of binops.
void VisitFloat64Binop(Node* node) {
VisitBinop(node, UseInfo::Float64(), MachineRepresentation::kFloat64);
VisitBinop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kFloat64);
}
void VisitInt32Binop(Node* node) {
VisitBinop(node, UseInfo::TruncatingWord32(),
......@@ -534,7 +535,7 @@ class RepresentationSelector {
MachineRepresentation::kWord64);
}
void VisitFloat64Cmp(Node* node) {
VisitBinop(node, UseInfo::Float64(), MachineRepresentation::kBit);
VisitBinop(node, UseInfo::TruncatingFloat64(), MachineRepresentation::kBit);
}
void VisitInt32Cmp(Node* node) {
VisitBinop(node, UseInfo::TruncatingWord32(), MachineRepresentation::kBit);
......@@ -563,6 +564,8 @@ class RepresentationSelector {
return MachineRepresentation::kBit;
} else if (type->Is(Type::Number())) {
return MachineRepresentation::kFloat64;
} else if (use.TruncatesToFloat64()) {
return MachineRepresentation::kFloat64;
} else if (type->Is(Type::Internal())) {
// We mark (u)int64 as Type::Internal.
// TODO(jarin) This is a workaround for our lack of (u)int64
......@@ -969,22 +972,26 @@ class RepresentationSelector {
break;
}
case IrOpcode::kNumberCeil: {
VisitUnop(node, UseInfo::Float64(), MachineRepresentation::kFloat64);
VisitUnop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kFloat64);
if (lower()) DeferReplacement(node, lowering->Float64Ceil(node));
break;
}
case IrOpcode::kNumberFloor: {
VisitUnop(node, UseInfo::Float64(), MachineRepresentation::kFloat64);
VisitUnop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kFloat64);
if (lower()) DeferReplacement(node, lowering->Float64Floor(node));
break;
}
case IrOpcode::kNumberRound: {
VisitUnop(node, UseInfo::Float64(), MachineRepresentation::kFloat64);
VisitUnop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kFloat64);
if (lower()) DeferReplacement(node, lowering->Float64Round(node));
break;
}
case IrOpcode::kNumberTrunc: {
VisitUnop(node, UseInfo::Float64(), MachineRepresentation::kFloat64);
VisitUnop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kFloat64);
if (lower()) DeferReplacement(node, lowering->Float64Trunc(node));
break;
}
......@@ -1003,7 +1010,8 @@ class RepresentationSelector {
break;
}
case IrOpcode::kNumberIsHoleNaN: {
VisitUnop(node, UseInfo::Float64(), MachineRepresentation::kBit);
VisitUnop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kBit);
if (lower()) {
// NumberIsHoleNaN(x) => Word32Equal(Float64ExtractLowWord32(x),
// #HoleNaNLower32)
......@@ -1137,18 +1145,10 @@ class RepresentationSelector {
MachineRepresentation::kFloat32) {
output = access.machine_type().representation();
} else {
if (access.machine_type().representation() !=
MachineRepresentation::kFloat64) {
// TODO(bmeurer): See comment on abort_compilation_.
if (lower()) lowering->abort_compilation_ = true;
}
output = MachineRepresentation::kFloat64;
}
}
} else {
// TODO(bmeurer): See comment on abort_compilation_.
if (lower()) lowering->abort_compilation_ = true;
// If undefined is not truncated away, we need to have the tagged
// representation.
output = MachineRepresentation::kTagged;
......@@ -1300,14 +1300,15 @@ class RepresentationSelector {
return VisitUnop(node, UseInfo::TruncatingWord32(),
MachineRepresentation::kWord64);
case IrOpcode::kTruncateFloat64ToFloat32:
return VisitUnop(node, UseInfo::Float64(),
return VisitUnop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kFloat32);
case IrOpcode::kTruncateFloat64ToInt32:
return VisitUnop(node, UseInfo::Float64(),
return VisitUnop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kWord32);
case IrOpcode::kChangeFloat32ToFloat64:
return VisitUnop(node, UseInfo::Float32(),
UNREACHABLE();
return VisitUnop(node, UseInfo::TruncatingFloat32(),
MachineRepresentation::kFloat64);
case IrOpcode::kChangeInt32ToFloat64:
return VisitUnop(node, UseInfo::TruncatingWord32(),
......@@ -1328,7 +1329,7 @@ class RepresentationSelector {
case IrOpcode::kFloat64RoundTruncate:
case IrOpcode::kFloat64RoundTiesAway:
case IrOpcode::kFloat64RoundUp:
return VisitUnop(node, UseInfo::Float64(),
return VisitUnop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kFloat64);
case IrOpcode::kFloat64Equal:
case IrOpcode::kFloat64LessThan:
......@@ -1336,11 +1337,12 @@ class RepresentationSelector {
return VisitFloat64Cmp(node);
case IrOpcode::kFloat64ExtractLowWord32:
case IrOpcode::kFloat64ExtractHighWord32:
return VisitUnop(node, UseInfo::Float64(),
return VisitUnop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kWord32);
case IrOpcode::kFloat64InsertLowWord32:
case IrOpcode::kFloat64InsertHighWord32:
return VisitBinop(node, UseInfo::Float64(), UseInfo::TruncatingWord32(),
return VisitBinop(node, UseInfo::TruncatingFloat64(),
UseInfo::TruncatingWord32(),
MachineRepresentation::kFloat64);
case IrOpcode::kLoadStackPointer:
case IrOpcode::kLoadFramePointer:
......@@ -1484,9 +1486,11 @@ void SimplifiedLowering::DoLoadBuffer(Node* node,
Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
Node* etrue = graph()->NewNode(machine()->Load(access_type), buffer, index,
effect, if_true);
Type* element_type =
Type::Intersect(NodeProperties::GetType(node), Type::Number(), zone());
Node* vtrue = changer->GetRepresentationFor(
etrue, access_type.representation(), NodeProperties::GetType(node),
output_rep, Truncation::None());
etrue, access_type.representation(), element_type, output_rep,
Truncation::None());
Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
Node* efalse = effect;
......
......@@ -1949,9 +1949,9 @@ Type* Typer::Visitor::TypeLoadBuffer(Node* node) {
// TODO(bmeurer): This typing is not yet correct. Since we can still access
// out of bounds, the type in the general case has to include Undefined.
switch (BufferAccessOf(node->op()).external_array_type()) {
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
case kExternal##Type##Array: \
return typer_->cache_.k##Type;
#define TYPED_ARRAY_CASE(ElemType, type, TYPE, ctype, size) \
case kExternal##ElemType##Array: \
return Type::Union(typer_->cache_.k##ElemType, Type::Undefined(), zone());
TYPED_ARRAYS(TYPED_ARRAY_CASE)
#undef TYPED_ARRAY_CASE
}
......
......@@ -650,17 +650,27 @@ void Verifier::Visitor::Check(Node* node) {
CheckUpperIs(node, Type::Number());
break;
case IrOpcode::kNumberEqual:
// (NumberOrUndefined, NumberOrUndefined) -> Boolean
CheckValueInputIs(node, 0, Type::NumberOrUndefined());
CheckValueInputIs(node, 1, Type::NumberOrUndefined());
CheckUpperIs(node, Type::Boolean());
break;
case IrOpcode::kNumberLessThan:
case IrOpcode::kNumberLessThanOrEqual:
// (Number, Number) -> Boolean
CheckValueInputIs(node, 0, Type::Number());
CheckValueInputIs(node, 1, Type::Number());
CheckValueInputIs(node, 0, Type::NumberOrUndefined());
CheckValueInputIs(node, 1, Type::NumberOrUndefined());
CheckUpperIs(node, Type::Boolean());
break;
case IrOpcode::kNumberAdd:
case IrOpcode::kNumberSubtract:
case IrOpcode::kNumberMultiply:
case IrOpcode::kNumberDivide:
// (Number, Number) -> Number
CheckValueInputIs(node, 0, Type::NumberOrUndefined());
CheckValueInputIs(node, 1, Type::NumberOrUndefined());
// CheckUpperIs(node, Type::Number());
break;
case IrOpcode::kNumberModulus:
// (Number, Number) -> Number
CheckValueInputIs(node, 0, Type::Number());
......@@ -704,12 +714,12 @@ void Verifier::Visitor::Check(Node* node) {
break;
case IrOpcode::kNumberToInt32:
// Number -> Signed32
CheckValueInputIs(node, 0, Type::Number());
CheckValueInputIs(node, 0, Type::NumberOrUndefined());
CheckUpperIs(node, Type::Signed32());
break;
case IrOpcode::kNumberToUint32:
// Number -> Unsigned32
CheckValueInputIs(node, 0, Type::Number());
CheckValueInputIs(node, 0, Type::NumberOrUndefined());
CheckUpperIs(node, Type::Unsigned32());
break;
case IrOpcode::kNumberIsHoleNaN:
......
......@@ -151,9 +151,9 @@ TARGET_TEST_P(ChangeLoweringCommonTest, ChangeTaggedToInt32WithTaggedSigned) {
EXPECT_THAT(r.replacement(), IsChangeSmiToInt32(value));
}
TARGET_TEST_P(ChangeLoweringCommonTest, ChangeTaggedToInt32WithTaggedPointer) {
Node* value = Parameter(Type::TaggedPointer());
TARGET_TEST_P(ChangeLoweringCommonTest, ChangeTaggedToInt32WithTaggedNumber) {
Node* value =
Parameter(Type::Intersect(Type::TaggedPointer(), Type::Number(), zone()));
Reduction r =
Reduce(graph()->NewNode(simplified()->ChangeTaggedToInt32(), value));
ASSERT_TRUE(r.Changed());
......@@ -172,7 +172,8 @@ TARGET_TEST_P(ChangeLoweringCommonTest, ChangeTaggedToUint32WithTaggedSigned) {
TARGET_TEST_P(ChangeLoweringCommonTest, ChangeTaggedToUint32WithTaggedPointer) {
Node* value = Parameter(Type::TaggedPointer());
Node* value =
Parameter(Type::Intersect(Type::TaggedPointer(), Type::Number(), zone()));
Reduction r =
Reduce(graph()->NewNode(simplified()->ChangeTaggedToUint32(), value));
ASSERT_TRUE(r.Changed());
......
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