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

Side by Side Diff: src/compiler/machine-operator-reducer.cc

Issue 2077533002: [builtins] Introduce proper Float64Exp operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Import tests from Raymond. 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
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/compiler/machine-operator-reducer.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/base/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 if (m.left().IsNaN()) { 396 if (m.left().IsNaN()) {
397 return Replace(m.left().node()); 397 return Replace(m.left().node());
398 } 398 }
399 if (m.IsFoldable()) { 399 if (m.IsFoldable()) {
400 return ReplaceFloat64( 400 return ReplaceFloat64(
401 base::ieee754::atan2(m.left().Value(), m.right().Value())); 401 base::ieee754::atan2(m.left().Value(), m.right().Value()));
402 } 402 }
403 break; 403 break;
404 } 404 }
405 case IrOpcode::kFloat64Exp: {
406 Float64Matcher m(node->InputAt(0));
407 if (m.HasValue()) return ReplaceFloat64(base::ieee754::exp(m.Value()));
408 break;
409 }
405 case IrOpcode::kFloat64Log: { 410 case IrOpcode::kFloat64Log: {
406 Float64Matcher m(node->InputAt(0)); 411 Float64Matcher m(node->InputAt(0));
407 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log(m.Value())); 412 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log(m.Value()));
408 break; 413 break;
409 } 414 }
410 case IrOpcode::kFloat64Log1p: { 415 case IrOpcode::kFloat64Log1p: {
411 Float64Matcher m(node->InputAt(0)); 416 Float64Matcher m(node->InputAt(0));
412 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log1p(m.Value())); 417 if (m.HasValue()) return ReplaceFloat64(base::ieee754::log1p(m.Value()));
413 break; 418 break;
414 } 419 }
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 MachineOperatorBuilder* MachineOperatorReducer::machine() const { 1117 MachineOperatorBuilder* MachineOperatorReducer::machine() const {
1113 return jsgraph()->machine(); 1118 return jsgraph()->machine();
1114 } 1119 }
1115 1120
1116 1121
1117 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } 1122 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); }
1118 1123
1119 } // namespace compiler 1124 } // namespace compiler
1120 } // namespace internal 1125 } // namespace internal
1121 } // namespace v8 1126 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698