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

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

Issue 2053893003: [builtins] Introduce proper base::ieee754::log. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: BUILD.gn Created 4 years, 6 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
« no previous file with comments | « test/cctest/compiler/value-helper.h ('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-reducer.h"
5 #include "src/base/bits.h" 6 #include "src/base/bits.h"
6 #include "src/base/division-by-constant.h" 7 #include "src/base/division-by-constant.h"
8 #include "src/base/ieee754.h"
7 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
8 #include "src/compiler/machine-operator-reducer.h"
9 #include "src/compiler/typer.h" 10 #include "src/compiler/typer.h"
10 #include "src/conversions-inl.h" 11 #include "src/conversions-inl.h"
11 #include "test/unittests/compiler/graph-unittest.h" 12 #include "test/unittests/compiler/graph-unittest.h"
12 #include "test/unittests/compiler/node-test-utils.h" 13 #include "test/unittests/compiler/node-test-utils.h"
13 #include "testing/gmock-support.h" 14 #include "testing/gmock-support.h"
14 15
15 using testing::AllOf; 16 using testing::AllOf;
16 using testing::BitEq; 17 using testing::BitEq;
17 using testing::Capture; 18 using testing::Capture;
18 using testing::CaptureEq; 19 using testing::CaptureEq;
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 1402
1402 // ----------------------------------------------------------------------------- 1403 // -----------------------------------------------------------------------------
1403 // Float64Log 1404 // Float64Log
1404 1405
1405 TEST_F(MachineOperatorReducerTest, Float64LogWithConstant) { 1406 TEST_F(MachineOperatorReducerTest, Float64LogWithConstant) {
1406 TRACED_FOREACH(double, x, kFloat64Values) { 1407 TRACED_FOREACH(double, x, kFloat64Values) {
1407 Reduction const r = 1408 Reduction const r =
1408 Reduce(graph()->NewNode(machine()->Float64Log(), Float64Constant(x))); 1409 Reduce(graph()->NewNode(machine()->Float64Log(), Float64Constant(x)));
1409 ASSERT_TRUE(r.Changed()); 1410 ASSERT_TRUE(r.Changed());
1410 EXPECT_THAT(r.replacement(), 1411 EXPECT_THAT(r.replacement(),
1411 IsFloat64Constant(NanSensitiveDoubleEq(std::log(x)))); 1412 IsFloat64Constant(NanSensitiveDoubleEq(base::ieee754::log(x))));
1412 } 1413 }
1413 } 1414 }
1414 1415
1415 // ----------------------------------------------------------------------------- 1416 // -----------------------------------------------------------------------------
1416 // Float64InsertLowWord32 1417 // Float64InsertLowWord32
1417 1418
1418 TEST_F(MachineOperatorReducerTest, Float64InsertLowWord32WithConstant) { 1419 TEST_F(MachineOperatorReducerTest, Float64InsertLowWord32WithConstant) {
1419 TRACED_FOREACH(double, x, kFloat64Values) { 1420 TRACED_FOREACH(double, x, kFloat64Values) {
1420 TRACED_FOREACH(uint32_t, y, kUint32Values) { 1421 TRACED_FOREACH(uint32_t, y, kUint32Values) {
1421 Reduction const r = 1422 Reduction const r =
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 Reduction r = Reduce(node); 1657 Reduction r = Reduce(node);
1657 ASSERT_TRUE(r.Changed()); 1658 ASSERT_TRUE(r.Changed());
1658 EXPECT_THAT(r.replacement(), 1659 EXPECT_THAT(r.replacement(),
1659 IsStore(rep, base, index, value, effect, control)); 1660 IsStore(rep, base, index, value, effect, control));
1660 } 1661 }
1661 } 1662 }
1662 1663
1663 } // namespace compiler 1664 } // namespace compiler
1664 } // namespace internal 1665 } // namespace internal
1665 } // namespace v8 1666 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/value-helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698