OLD | NEW |
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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 case IrOpcode::kFloat64Cbrt: { | 439 case IrOpcode::kFloat64Cbrt: { |
440 Float64Matcher m(node->InputAt(0)); | 440 Float64Matcher m(node->InputAt(0)); |
441 if (m.HasValue()) return ReplaceFloat64(base::ieee754::cbrt(m.Value())); | 441 if (m.HasValue()) return ReplaceFloat64(base::ieee754::cbrt(m.Value())); |
442 break; | 442 break; |
443 } | 443 } |
444 case IrOpcode::kFloat64Sin: { | 444 case IrOpcode::kFloat64Sin: { |
445 Float64Matcher m(node->InputAt(0)); | 445 Float64Matcher m(node->InputAt(0)); |
446 if (m.HasValue()) return ReplaceFloat64(base::ieee754::sin(m.Value())); | 446 if (m.HasValue()) return ReplaceFloat64(base::ieee754::sin(m.Value())); |
447 break; | 447 break; |
448 } | 448 } |
| 449 case IrOpcode::kFloat64Tan: { |
| 450 Float64Matcher m(node->InputAt(0)); |
| 451 if (m.HasValue()) return ReplaceFloat64(base::ieee754::tan(m.Value())); |
| 452 break; |
| 453 } |
449 case IrOpcode::kChangeFloat32ToFloat64: { | 454 case IrOpcode::kChangeFloat32ToFloat64: { |
450 Float32Matcher m(node->InputAt(0)); | 455 Float32Matcher m(node->InputAt(0)); |
451 if (m.HasValue()) return ReplaceFloat64(m.Value()); | 456 if (m.HasValue()) return ReplaceFloat64(m.Value()); |
452 break; | 457 break; |
453 } | 458 } |
454 case IrOpcode::kChangeFloat64ToInt32: { | 459 case IrOpcode::kChangeFloat64ToInt32: { |
455 Float64Matcher m(node->InputAt(0)); | 460 Float64Matcher m(node->InputAt(0)); |
456 if (m.HasValue()) return ReplaceInt32(FastD2I(m.Value())); | 461 if (m.HasValue()) return ReplaceInt32(FastD2I(m.Value())); |
457 if (m.IsChangeInt32ToFloat64()) return Replace(m.node()->InputAt(0)); | 462 if (m.IsChangeInt32ToFloat64()) return Replace(m.node()->InputAt(0)); |
458 break; | 463 break; |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 MachineOperatorBuilder* MachineOperatorReducer::machine() const { | 1160 MachineOperatorBuilder* MachineOperatorReducer::machine() const { |
1156 return jsgraph()->machine(); | 1161 return jsgraph()->machine(); |
1157 } | 1162 } |
1158 | 1163 |
1159 | 1164 |
1160 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } | 1165 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } |
1161 | 1166 |
1162 } // namespace compiler | 1167 } // namespace compiler |
1163 } // namespace internal | 1168 } // namespace internal |
1164 } // namespace v8 | 1169 } // namespace v8 |
OLD | NEW |