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

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

Issue 974313002: [turbofan] Support for %_DoubleHi, %_DoubleLo and %_ConstructDouble. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: arm port. Created 5 years, 10 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/machine-operator-reducer-unittest.cc
diff --git a/test/unittests/compiler/machine-operator-reducer-unittest.cc b/test/unittests/compiler/machine-operator-reducer-unittest.cc
index e41b01506117dced5c7bd1db8cbb11c9736ae961..5a986e87eea172578fc426b521ed947ace54e98a 100644
--- a/test/unittests/compiler/machine-operator-reducer-unittest.cc
+++ b/test/unittests/compiler/machine-operator-reducer-unittest.cc
@@ -1436,6 +1436,28 @@ TEST_F(MachineOperatorReducerTest, Float64MulWithMinusOne) {
// -----------------------------------------------------------------------------
+// Float64InsertWord32
+
+
+TEST_F(MachineOperatorReducerTest, Float64InsertWord32WithConstant) {
+ TRACED_FOREACH(double, x, kFloat64Values) {
+ TRACED_FOREACH(uint32_t, y, kUint32Values) {
+ TRACED_FORRANGE(int, location, 0, 1) {
+ Reduction const r =
+ Reduce(graph()->NewNode(machine()->Float64InsertWord32(location),
+ Float64Constant(x), Uint32Constant(y)));
+ ASSERT_TRUE(r.Changed());
+ EXPECT_THAT(r.replacement(),
+ IsFloat64Constant(
+ BitEq(bit_cast<double>(base::bits::InsertElement64(
+ bit_cast<uint64_t>(x), y, location)))));
+ }
+ }
+ }
+}
+
+
+// -----------------------------------------------------------------------------
// Store

Powered by Google App Engine
This is Rietveld 408576698