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

Unified Diff: test/unittests/compiler/simplified-operator-reducer-unittest.cc

Issue 850013003: [turbofan] Fix truncation/representation sloppiness wrt. bool/bit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes/Cleanups Created 5 years, 11 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/unittests/compiler/simplified-operator-reducer-unittest.cc
diff --git a/test/unittests/compiler/simplified-operator-reducer-unittest.cc b/test/unittests/compiler/simplified-operator-reducer-unittest.cc
index 1a5b76a994d07a0ce6cb0133d2011df2fe2ca90b..b6c041057aff5e0cf6064cc3c31c377d081fa472 100644
--- a/test/unittests/compiler/simplified-operator-reducer-unittest.cc
+++ b/test/unittests/compiler/simplified-operator-reducer-unittest.cc
@@ -124,57 +124,6 @@ static const uint32_t kUint32Values[] = {
// -----------------------------------------------------------------------------
-// Unary operators
-
-
-namespace {
-
-struct UnaryOperator {
- const Operator* (SimplifiedOperatorBuilder::*constructor)();
- const char* constructor_name;
-};
-
-
-std::ostream& operator<<(std::ostream& os, const UnaryOperator& unop) {
- return os << unop.constructor_name;
-}
-
-
-static const UnaryOperator kUnaryOperators[] = {
- {&SimplifiedOperatorBuilder::AnyToBoolean, "AnyToBoolean"},
- {&SimplifiedOperatorBuilder::BooleanNot, "BooleanNot"},
- {&SimplifiedOperatorBuilder::ChangeBitToBool, "ChangeBitToBool"},
- {&SimplifiedOperatorBuilder::ChangeBoolToBit, "ChangeBoolToBit"},
- {&SimplifiedOperatorBuilder::ChangeFloat64ToTagged,
- "ChangeFloat64ToTagged"},
- {&SimplifiedOperatorBuilder::ChangeInt32ToTagged, "ChangeInt32ToTagged"},
- {&SimplifiedOperatorBuilder::ChangeTaggedToFloat64,
- "ChangeTaggedToFloat64"},
- {&SimplifiedOperatorBuilder::ChangeTaggedToInt32, "ChangeTaggedToInt32"},
- {&SimplifiedOperatorBuilder::ChangeTaggedToUint32, "ChangeTaggedToUint32"},
- {&SimplifiedOperatorBuilder::ChangeUint32ToTagged, "ChangeUint32ToTagged"}};
-
-} // namespace
-
-
-typedef SimplifiedOperatorReducerTestWithParam<UnaryOperator>
- SimplifiedUnaryOperatorTest;
-
-
-TEST_P(SimplifiedUnaryOperatorTest, Parameter) {
- const UnaryOperator& unop = GetParam();
- Reduction reduction = Reduce(graph()->NewNode(
- (simplified()->*unop.constructor)(), Parameter(Type::Any())));
- EXPECT_FALSE(reduction.Changed());
-}
-
-
-INSTANTIATE_TEST_CASE_P(SimplifiedOperatorReducerTest,
- SimplifiedUnaryOperatorTest,
- ::testing::ValuesIn(kUnaryOperators));
-
-
-// -----------------------------------------------------------------------------
// AnyToBoolean
@@ -298,27 +247,6 @@ TEST_F(SimplifiedOperatorReducerTest, ChangeBoolToBitWithChangeBitToBool) {
// -----------------------------------------------------------------------------
-// ChangeWord32ToBit
-
-
-TEST_F(SimplifiedOperatorReducerTest, ChangeWord32ToBitWithBitType) {
- Handle<Object> zero = factory()->NewNumber(0);
- Handle<Object> one = factory()->NewNumber(1);
- Type* const kBitTypes[] = {
- Type::Constant(zero, zone()), Type::Constant(one, zone()),
- Type::Range(zero, zero, zone()), Type::Range(one, one, zone()),
- Type::Range(zero, one, zone())};
- TRACED_FOREACH(Type*, type, kBitTypes) {
- Node* param0 = Parameter(type, 0);
- Reduction reduction =
- Reduce(graph()->NewNode(simplified()->ChangeWord32ToBit(), param0));
- ASSERT_TRUE(reduction.Changed());
- EXPECT_EQ(param0, reduction.replacement());
- }
-}
-
-
-// -----------------------------------------------------------------------------
// ChangeFloat64ToTagged
« no previous file with comments | « test/unittests/compiler/change-lowering-unittest.cc ('k') | test/unittests/compiler/simplified-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698