Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=-avx,+sse2                             | FileCheck %s --check-prefix=SSE2
      2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=-avx,+sse2 -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=SSE2
      3 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=-avx2,+avx                             | FileCheck %s --check-prefix=AVX
      4 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=-avx2,+avx -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=AVX
      5 
      6 define float @test_sqrt_f32(float %a) {
      7 ; SSE2-LABEL: test_sqrt_f32
      8 ; SSE2:       sqrtss %xmm0, %xmm0
      9 ; AVX-LABEL:  test_sqrt_f32
     10 ; AVX:        vsqrtss %xmm0, %xmm0
     11   %res = call float @llvm.sqrt.f32(float %a)
     12   ret float %res
     13 }
     14 declare float @llvm.sqrt.f32(float) nounwind readnone
     15 
     16 define double @test_sqrt_f64(double %a) {
     17 ; SSE2-LABEL: test_sqrt_f64
     18 ; SSE2:       sqrtsd %xmm0, %xmm0
     19 ; AVX-LABEL:  test_sqrt_f64
     20 ; AVX:        vsqrtsd %xmm0, %xmm0
     21   %res = call double @llvm.sqrt.f64(double %a)
     22   ret double %res
     23 }
     24 declare double @llvm.sqrt.f64(double) nounwind readnone
     25 
     26 
     27