1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=-avx,+sse2 | FileCheck %s --check-prefix=SSE2
3 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=-avx,+sse2 -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=SSE2
4 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=-avx2,+avx | FileCheck %s --check-prefix=AVX
5 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=-avx2,+avx -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=AVX
7 define float @test_sqrt_f32(float %a) {
8 ; SSE2-LABEL: test_sqrt_f32:
10 ; SSE2-NEXT: sqrtss %xmm0, %xmm0
13 ; AVX-LABEL: test_sqrt_f32:
15 ; AVX-NEXT: vsqrtss %xmm0, %xmm0, %xmm0
17 %res = call float @llvm.sqrt.f32(float %a)
20 declare float @llvm.sqrt.f32(float) nounwind readnone
22 define double @test_sqrt_f64(double %a) {
23 ; SSE2-LABEL: test_sqrt_f64:
25 ; SSE2-NEXT: sqrtsd %xmm0, %xmm0
28 ; AVX-LABEL: test_sqrt_f64:
30 ; AVX-NEXT: vsqrtsd %xmm0, %xmm0, %xmm0
32 %res = call double @llvm.sqrt.f64(double %a)
35 declare double @llvm.sqrt.f64(double) nounwind readnone