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

Side by Side Diff: test/compiler-unittests/machine-operator-unittest.cc

Issue 484103002: [turbofan] Add TruncateFloat64ToInt32 machine operator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Disable test-run-machops/RunTruncateFloat64ToInt32P on arm64. Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/compiler-unittests/instruction-selector-unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/machine-operator.h" 5 #include "src/compiler/machine-operator.h"
6 #include "src/compiler/operator-properties-inl.h" 6 #include "src/compiler/operator-properties-inl.h"
7 #include "test/compiler-unittests/compiler-unittests.h" 7 #include "test/compiler-unittests/compiler-unittests.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 9
10 using testing::IsNull; 10 using testing::IsNull;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 TEST_P(MachineOperatorCommonTest, ChangeUint32ToUint64) { 50 TEST_P(MachineOperatorCommonTest, ChangeUint32ToUint64) {
51 Operator* op = machine()->ChangeUint32ToUint64(); 51 Operator* op = machine()->ChangeUint32ToUint64();
52 EXPECT_EQ(1, OperatorProperties::GetValueInputCount(op)); 52 EXPECT_EQ(1, OperatorProperties::GetValueInputCount(op));
53 EXPECT_EQ(1, OperatorProperties::GetTotalInputCount(op)); 53 EXPECT_EQ(1, OperatorProperties::GetTotalInputCount(op));
54 EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); 54 EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op));
55 EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op)); 55 EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op));
56 EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); 56 EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op));
57 } 57 }
58 58
59 59
60 TEST_P(MachineOperatorCommonTest, TruncateFloat64ToInt32) {
61 Operator* op = machine()->TruncateFloat64ToInt32();
62 EXPECT_EQ(1, OperatorProperties::GetValueInputCount(op));
63 EXPECT_EQ(1, OperatorProperties::GetTotalInputCount(op));
64 EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op));
65 EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op));
66 EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op));
67 }
68
69
60 TEST_P(MachineOperatorCommonTest, TruncateInt64ToInt32) { 70 TEST_P(MachineOperatorCommonTest, TruncateInt64ToInt32) {
61 Operator* op = machine()->TruncateInt64ToInt32(); 71 Operator* op = machine()->TruncateInt64ToInt32();
62 EXPECT_EQ(1, OperatorProperties::GetValueInputCount(op)); 72 EXPECT_EQ(1, OperatorProperties::GetValueInputCount(op));
63 EXPECT_EQ(1, OperatorProperties::GetTotalInputCount(op)); 73 EXPECT_EQ(1, OperatorProperties::GetTotalInputCount(op));
64 EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); 74 EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op));
65 EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op)); 75 EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op));
66 EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); 76 EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op));
67 } 77 }
68 78
69 79
70 INSTANTIATE_TEST_CASE_P(MachineOperatorTest, MachineOperatorCommonTest, 80 INSTANTIATE_TEST_CASE_P(MachineOperatorTest, MachineOperatorCommonTest,
71 ::testing::Values(kRepWord32, kRepWord64)); 81 ::testing::Values(kRepWord32, kRepWord64));
72 82
73 } // namespace compiler 83 } // namespace compiler
74 } // namespace internal 84 } // namespace internal
75 } // namespace v8 85 } // namespace v8
OLDNEW
« no previous file with comments | « test/compiler-unittests/instruction-selector-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698