Commit 9c281f24 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Properly lower NumberSinh, NumberCosh and NumberTanh.

R=jarin@chromium.org
BUG=chromium:625121

Review-Url: https://codereview.chromium.org/2116533004
Cr-Commit-Position: refs/heads/master@{#37479}
parent ac4fdca6
......@@ -1557,6 +1557,7 @@ class RepresentationSelector {
case IrOpcode::kNumberAtan:
case IrOpcode::kNumberAtanh:
case IrOpcode::kNumberCos:
case IrOpcode::kNumberCosh:
case IrOpcode::kNumberExp:
case IrOpcode::kNumberExpm1:
case IrOpcode::kNumberLog:
......@@ -1565,7 +1566,9 @@ class RepresentationSelector {
case IrOpcode::kNumberLog10:
case IrOpcode::kNumberCbrt:
case IrOpcode::kNumberSin:
case IrOpcode::kNumberTan: {
case IrOpcode::kNumberSinh:
case IrOpcode::kNumberTan:
case IrOpcode::kNumberTanh: {
VisitUnop(node, UseInfo::TruncatingFloat64(),
MachineRepresentation::kFloat64);
if (lower()) NodeProperties::ChangeOp(node, Float64Op(node));
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
function test(f) {
f(0);
f(NaN);
%OptimizeFunctionOnNextCall(f);
f(1.0);
}
test(x => Math.cosh(+x));
test(x => Math.sinh(+x));
test(x => Math.tanh(+x));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment