Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: test/cctest/compiler/test-simplified-lowering.cc

Issue 2139183002: [turbofan] Unify BooleanToNumber, StringToNumber and PlainPrimitiveToNumber. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/compiler/test-simplified-lowering.cc
diff --git a/test/cctest/compiler/test-simplified-lowering.cc b/test/cctest/compiler/test-simplified-lowering.cc
index dd43993d5b07c6dfb217c1a27219d139db648a0a..d1ceaa06206ed1c900ae26f6f73c0129a8a87f73 100644
--- a/test/cctest/compiler/test-simplified-lowering.cc
+++ b/test/cctest/compiler/test-simplified-lowering.cc
@@ -899,63 +899,6 @@ TEST(LowerBooleanNot_tagged_tagged) {
CHECK(f == cmp->InputAt(0) || f == cmp->InputAt(1));
}
-
-TEST(LowerBooleanToNumber_bit_int32) {
- // BooleanToNumber(x: kRepBit) used as MachineType::Int32()
- TestingGraph t(Type::Boolean());
- Node* b = t.ExampleWithOutput(MachineType::Bool());
- Node* cnv = t.graph()->NewNode(t.simplified()->BooleanToNumber(), b);
- Node* use = t.Use(cnv, MachineType::Int32());
- t.Return(use);
- t.Lower();
- CHECK_EQ(b, use->InputAt(0));
-}
-
-
-TEST(LowerBooleanToNumber_tagged_int32) {
- // BooleanToNumber(x: kRepTagged) used as MachineType::Int32()
- TestingGraph t(Type::Boolean());
- Node* b = t.p0;
- Node* cnv = t.graph()->NewNode(t.simplified()->BooleanToNumber(), b);
- Node* use = t.Use(cnv, MachineType::Int32());
- t.Return(use);
- t.Lower();
- CHECK_EQ(t.machine()->WordEqual()->opcode(), cnv->opcode());
- CHECK(b == cnv->InputAt(0) || b == cnv->InputAt(1));
- Node* c = t.jsgraph.TrueConstant();
- CHECK(c == cnv->InputAt(0) || c == cnv->InputAt(1));
-}
-
-
-TEST(LowerBooleanToNumber_bit_tagged) {
- // BooleanToNumber(x: kRepBit) used as MachineType::AnyTagged()
- TestingGraph t(Type::Boolean());
- Node* b = t.ExampleWithOutput(MachineType::Bool());
- Node* cnv = t.graph()->NewNode(t.simplified()->BooleanToNumber(), b);
- Node* use = t.Use(cnv, MachineType::AnyTagged());
- t.Return(use);
- t.Lower();
- CHECK_EQ(b, use->InputAt(0)->InputAt(0));
- CHECK_EQ(IrOpcode::kChangeInt31ToTaggedSigned, use->InputAt(0)->opcode());
-}
-
-
-TEST(LowerBooleanToNumber_tagged_tagged) {
- // BooleanToNumber(x: kRepTagged) used as MachineType::AnyTagged()
- TestingGraph t(Type::Boolean());
- Node* b = t.p0;
- Node* cnv = t.graph()->NewNode(t.simplified()->BooleanToNumber(), b);
- Node* use = t.Use(cnv, MachineType::AnyTagged());
- t.Return(use);
- t.Lower();
- CHECK_EQ(cnv, use->InputAt(0)->InputAt(0));
- CHECK_EQ(IrOpcode::kChangeInt31ToTaggedSigned, use->InputAt(0)->opcode());
- CHECK_EQ(t.machine()->WordEqual()->opcode(), cnv->opcode());
- CHECK(b == cnv->InputAt(0) || b == cnv->InputAt(1));
- Node* c = t.jsgraph.TrueConstant();
- CHECK(c == cnv->InputAt(0) || c == cnv->InputAt(1));
-}
-
static Type* test_types[] = {Type::Signed32(), Type::Unsigned32(),
Type::Number()};
« no previous file with comments | « test/cctest/compiler/test-js-typed-lowering.cc ('k') | test/unittests/compiler/simplified-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698