Commit 79c8cfe2 authored by titzer@chromium.org's avatar titzer@chromium.org

Fix expectations of lowering tests.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 14e190bb
......@@ -69,7 +69,7 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) {
Float64Matcher m(node->InputAt(0));
if (m.HasValue()) return ReplaceInt32(DoubleToInt32(m.Value()));
if (m.IsChangeFloat64ToTagged()) {
return Change(node, machine()->TruncateFloat64ToInt32(),
return Change(node, machine()->ChangeFloat64ToInt32(),
m.node()->InputAt(0));
}
if (m.IsChangeInt32ToTagged()) return Replace(m.node()->InputAt(0));
......@@ -79,7 +79,7 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) {
Float64Matcher m(node->InputAt(0));
if (m.HasValue()) return ReplaceUint32(DoubleToUint32(m.Value()));
if (m.IsChangeFloat64ToTagged()) {
return Change(node, machine()->TruncateFloat64ToInt32(),
return Change(node, machine()->ChangeFloat64ToUint32(),
m.node()->InputAt(0));
}
if (m.IsChangeUint32ToTagged()) return Replace(m.node()->InputAt(0));
......
......@@ -269,7 +269,7 @@ TARGET_TEST_F(ChangeLowering32Test, ChangeTaggedToInt32) {
Capture<Node*> branch, if_true;
EXPECT_THAT(
phi,
IsPhi(IsTruncateFloat64ToInt32(IsLoad(
IsPhi(IsChangeFloat64ToInt32(IsLoad(
kMachFloat64, val, IsInt32Constant(HeapNumberValueOffset()),
IsControlEffect(CaptureEq(&if_true)))),
IsWord32Sar(val, IsInt32Constant(SmiShiftAmount())),
......@@ -294,7 +294,7 @@ TARGET_TEST_F(ChangeLowering32Test, ChangeTaggedToUint32) {
Capture<Node*> branch, if_true;
EXPECT_THAT(
phi,
IsPhi(IsTruncateFloat64ToInt32(IsLoad(
IsPhi(IsChangeFloat64ToUint32(IsLoad(
kMachFloat64, val, IsInt32Constant(HeapNumberValueOffset()),
IsControlEffect(CaptureEq(&if_true)))),
IsWord32Sar(val, IsInt32Constant(SmiShiftAmount())),
......@@ -403,7 +403,7 @@ TARGET_TEST_F(ChangeLowering64Test, ChangeTaggedToInt32) {
Capture<Node*> branch, if_true;
EXPECT_THAT(
phi,
IsPhi(IsTruncateFloat64ToInt32(IsLoad(
IsPhi(IsChangeFloat64ToInt32(IsLoad(
kMachFloat64, val, IsInt32Constant(HeapNumberValueOffset()),
IsControlEffect(CaptureEq(&if_true)))),
IsTruncateInt64ToInt32(
......@@ -429,7 +429,7 @@ TARGET_TEST_F(ChangeLowering64Test, ChangeTaggedToUint32) {
Capture<Node*> branch, if_true;
EXPECT_THAT(
phi,
IsPhi(IsTruncateFloat64ToInt32(IsLoad(
IsPhi(IsChangeFloat64ToUint32(IsLoad(
kMachFloat64, val, IsInt32Constant(HeapNumberValueOffset()),
IsControlEffect(CaptureEq(&if_true)))),
IsTruncateInt64ToInt32(
......
......@@ -744,6 +744,7 @@ IS_BINOP_MATCHER(Uint32LessThanOrEqual)
return MakeMatcher(new IsUnopMatcher(IrOpcode::k##Name, input_matcher)); \
}
IS_UNOP_MATCHER(ChangeFloat64ToInt32)
IS_UNOP_MATCHER(ChangeFloat64ToUint32)
IS_UNOP_MATCHER(ChangeInt32ToFloat64)
IS_UNOP_MATCHER(ChangeInt32ToInt64)
IS_UNOP_MATCHER(ChangeUint32ToFloat64)
......
......@@ -113,6 +113,7 @@ Matcher<Node*> IsInt32AddWithOverflow(const Matcher<Node*>& lhs_matcher,
Matcher<Node*> IsUint32LessThanOrEqual(const Matcher<Node*>& lhs_matcher,
const Matcher<Node*>& rhs_matcher);
Matcher<Node*> IsChangeFloat64ToInt32(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsChangeFloat64ToUint32(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsChangeInt32ToFloat64(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsChangeInt32ToInt64(const Matcher<Node*>& input_matcher);
Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher);
......
......@@ -364,7 +364,7 @@ TEST_F(SimplifiedOperatorReducerTest,
simplified()->ChangeTaggedToInt32(),
graph()->NewNode(simplified()->ChangeFloat64ToTagged(), param0)));
ASSERT_TRUE(reduction.Changed());
EXPECT_THAT(reduction.replacement(), IsTruncateFloat64ToInt32(param0));
EXPECT_THAT(reduction.replacement(), IsChangeFloat64ToInt32(param0));
}
......@@ -418,7 +418,7 @@ TEST_F(SimplifiedOperatorReducerTest,
simplified()->ChangeTaggedToUint32(),
graph()->NewNode(simplified()->ChangeFloat64ToTagged(), param0)));
ASSERT_TRUE(reduction.Changed());
EXPECT_THAT(reduction.replacement(), IsTruncateFloat64ToInt32(param0));
EXPECT_THAT(reduction.replacement(), IsChangeFloat64ToUint32(param0));
}
......
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