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

Unified Diff: src/compiler/machine-operator-reducer.cc

Issue 2083573002: [builtins] Unify Cosh, Sinh and Tanh as exports from flibm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE and windows fix. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-operator-reducer.cc
diff --git a/src/compiler/machine-operator-reducer.cc b/src/compiler/machine-operator-reducer.cc
index f30c4f7aa6d6f3fee1252f555bea0213972db6f6..b5748b2a1a1a551e8e572badffa502f6eb29a750 100644
--- a/src/compiler/machine-operator-reducer.cc
+++ b/src/compiler/machine-operator-reducer.cc
@@ -401,6 +401,11 @@ Reduction MachineOperatorReducer::Reduce(Node* node) {
if (m.HasValue()) return ReplaceFloat64(base::ieee754::cos(m.Value()));
break;
}
+ case IrOpcode::kFloat64Cosh: {
+ Float64Matcher m(node->InputAt(0));
+ if (m.HasValue()) return ReplaceFloat64(base::ieee754::cosh(m.Value()));
+ break;
+ }
case IrOpcode::kFloat64Exp: {
Float64Matcher m(node->InputAt(0));
if (m.HasValue()) return ReplaceFloat64(base::ieee754::exp(m.Value()));
@@ -462,11 +467,21 @@ Reduction MachineOperatorReducer::Reduce(Node* node) {
if (m.HasValue()) return ReplaceFloat64(base::ieee754::sin(m.Value()));
break;
}
+ case IrOpcode::kFloat64Sinh: {
+ Float64Matcher m(node->InputAt(0));
+ if (m.HasValue()) return ReplaceFloat64(base::ieee754::sinh(m.Value()));
+ break;
+ }
case IrOpcode::kFloat64Tan: {
Float64Matcher m(node->InputAt(0));
if (m.HasValue()) return ReplaceFloat64(base::ieee754::tan(m.Value()));
break;
}
+ case IrOpcode::kFloat64Tanh: {
+ Float64Matcher m(node->InputAt(0));
+ if (m.HasValue()) return ReplaceFloat64(base::ieee754::tanh(m.Value()));
+ break;
+ }
case IrOpcode::kChangeFloat32ToFloat64: {
Float32Matcher m(node->InputAt(0));
if (m.HasValue()) return ReplaceFloat64(m.Value());
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698