Juergen Ributzka | addb75a | 2014-08-21 20:57:57 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=arm64-apple-darwin -verify-machineinstrs < %s | FileCheck %s |
Mehdi Amini | 945a660 | 2015-02-27 18:32:11 +0000 | [diff] [blame] | 2 | ; RUN: llc -mtriple=arm64-apple-darwin -fast-isel -fast-isel-abort=1 -verify-machineinstrs < %s | FileCheck %s |
Juergen Ributzka | 130e77e | 2014-07-31 06:25:33 +0000 | [diff] [blame] | 3 | |
| 4 | define float @test_sqrt_f32(float %a) { |
| 5 | ; CHECK-LABEL: test_sqrt_f32 |
| 6 | ; CHECK: fsqrt s0, s0 |
| 7 | %res = call float @llvm.sqrt.f32(float %a) |
| 8 | ret float %res |
| 9 | } |
| 10 | declare float @llvm.sqrt.f32(float) nounwind readnone |
| 11 | |
| 12 | define double @test_sqrt_f64(double %a) { |
| 13 | ; CHECK-LABEL: test_sqrt_f64 |
| 14 | ; CHECK: fsqrt d0, d0 |
| 15 | %res = call double @llvm.sqrt.f64(double %a) |
| 16 | ret double %res |
| 17 | } |
| 18 | declare double @llvm.sqrt.f64(double) nounwind readnone |
| 19 | |
| 20 | |