Index: test/unittests/compiler/common-operator-unittest.cc |
diff --git a/test/unittests/compiler/common-operator-unittest.cc b/test/unittests/compiler/common-operator-unittest.cc |
index 1f0c0fdaa4ab0b04900b701fd06e6e2d5dea7107..6e60cfd12ae228884390d8a388bc4b21c4a00155 100644 |
--- a/test/unittests/compiler/common-operator-unittest.cc |
+++ b/test/unittests/compiler/common-operator-unittest.cc |
@@ -133,7 +133,7 @@ class CommonOperatorTest : public TestWithZone { |
const int kArguments[] = {1, 5, 6, 42, 100, 10000, 65000}; |
-const size_t kCases[] = {2, 3, 4, 100, 255}; |
+const size_t kCases[] = {3, 4, 100, 255, 1024, 65000}; |
const float kFloatValues[] = {-std::numeric_limits<float>::infinity(), |
@@ -160,6 +160,20 @@ const double kDoubleValues[] = {-std::numeric_limits<double>::infinity(), |
std::numeric_limits<double>::signaling_NaN()}; |
+const int32_t kInt32Values[] = { |
+ std::numeric_limits<int32_t>::min(), -1914954528, -1698749618, -1578693386, |
+ -1577976073, -1573998034, -1529085059, -1499540537, -1299205097, |
+ -1090814845, -938186388, -806828902, -750927650, -520676892, -513661538, |
+ -453036354, -433622833, -282638793, -28375, -27788, -22770, -18806, -14173, |
+ -11956, -11200, -10212, -8160, -3751, -2758, -1522, -121, -120, -118, -117, |
+ -106, -84, -80, -74, -59, -52, -48, -39, -35, -17, -11, -10, -9, -7, -5, 0, |
+ 9, 12, 17, 23, 29, 31, 33, 35, 40, 47, 55, 56, 62, 64, 67, 68, 69, 74, 79, |
+ 84, 89, 90, 97, 104, 118, 124, 126, 127, 7278, 17787, 24136, 24202, 25570, |
+ 26680, 30242, 32399, 420886487, 642166225, 821912648, 822577803, 851385718, |
+ 1212241078, 1411419304, 1589626102, 1596437184, 1876245816, 1954730266, |
+ 2008792749, 2045320228, std::numeric_limits<int32_t>::max()}; |
+ |
+ |
const BranchHint kHints[] = {BranchHint::kNone, BranchHint::kTrue, |
BranchHint::kFalse}; |
@@ -199,12 +213,12 @@ TEST_F(CommonOperatorTest, Switch) { |
} |
-TEST_F(CommonOperatorTest, Case) { |
- TRACED_FORRANGE(size_t, index, 0, 1024) { |
- const Operator* const op = common()->Case(index); |
- EXPECT_EQ(IrOpcode::kCase, op->opcode()); |
+TEST_F(CommonOperatorTest, IfValue) { |
+ TRACED_FOREACH(int32_t, value, kInt32Values) { |
+ const Operator* const op = common()->IfValue(value); |
+ EXPECT_EQ(IrOpcode::kIfValue, op->opcode()); |
EXPECT_EQ(Operator::kKontrol, op->properties()); |
- EXPECT_EQ(index, CaseIndexOf(op)); |
+ EXPECT_EQ(value, OpParameter<int32_t>(op)); |
EXPECT_EQ(0, op->ValueInputCount()); |
EXPECT_EQ(0, op->EffectInputCount()); |
EXPECT_EQ(1, op->ControlInputCount()); |