1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-- < %s | FileCheck %s
4 define float @f32_tune_nhm(float %f) #0 {
5 ; CHECK-LABEL: f32_tune_nhm:
7 ; CHECK-NEXT: rsqrtss %xmm0, %xmm1
8 ; CHECK-NEXT: movaps %xmm0, %xmm2
9 ; CHECK-NEXT: mulss %xmm1, %xmm2
10 ; CHECK-NEXT: movss {{.*#+}} xmm3 = [-5.0E-1,0.0E+0,0.0E+0,0.0E+0]
11 ; CHECK-NEXT: mulss %xmm2, %xmm3
12 ; CHECK-NEXT: mulss %xmm1, %xmm2
13 ; CHECK-NEXT: addss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm2
14 ; CHECK-NEXT: mulss %xmm3, %xmm2
15 ; CHECK-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
16 ; CHECK-NEXT: cmpltss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
17 ; CHECK-NEXT: andnps %xmm2, %xmm0
19 %call = tail call fast float @llvm.sqrt.f32(float %f)
23 define float @f32_no_tune(float %f) #1 {
24 ; CHECK-LABEL: f32_no_tune:
26 ; CHECK-NEXT: sqrtss %xmm0, %xmm0
28 %call = tail call fast float @llvm.sqrt.f32(float %f)
32 define float @f32_tune_generic(float %f) #2 {
33 ; CHECK-LABEL: f32_tune_generic:
35 ; CHECK-NEXT: sqrtss %xmm0, %xmm0
37 %call = tail call fast float @llvm.sqrt.f32(float %f)
41 define float @f32_tune_x86_64(float %f) #3 {
42 ; CHECK-LABEL: f32_tune_x86_64:
44 ; CHECK-NEXT: rsqrtss %xmm0, %xmm1
45 ; CHECK-NEXT: movaps %xmm0, %xmm2
46 ; CHECK-NEXT: mulss %xmm1, %xmm2
47 ; CHECK-NEXT: movss {{.*#+}} xmm3 = [-5.0E-1,0.0E+0,0.0E+0,0.0E+0]
48 ; CHECK-NEXT: mulss %xmm2, %xmm3
49 ; CHECK-NEXT: mulss %xmm1, %xmm2
50 ; CHECK-NEXT: addss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm2
51 ; CHECK-NEXT: mulss %xmm3, %xmm2
52 ; CHECK-NEXT: andps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
53 ; CHECK-NEXT: cmpltss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
54 ; CHECK-NEXT: andnps %xmm2, %xmm0
56 %call = tail call fast float @llvm.sqrt.f32(float %f)
60 define float @f32_tune_snb(float %f) #4 {
61 ; CHECK-LABEL: f32_tune_snb:
63 ; CHECK-NEXT: sqrtss %xmm0, %xmm0
65 %call = tail call fast float @llvm.sqrt.f32(float %f)
69 define float @f32_target_snb_tune_snb(float %f) #5 {
70 ; CHECK-LABEL: f32_target_snb_tune_snb:
72 ; CHECK-NEXT: vsqrtss %xmm0, %xmm0, %xmm0
74 %call = tail call fast float @llvm.sqrt.f32(float %f)
78 declare float @llvm.sqrt.f32(float)
80 attributes #0 = { "target-cpu"="x86-64" "tune-cpu"="nehalem" }
81 attributes #1 = { "target-cpu"="x86-64" }
82 attributes #2 = { "target-cpu"="x86-64" "tune-cpu"="generic" }
83 attributes #3 = { "target-cpu"="x86-64" "tune-cpu"="x86-64" }
84 attributes #4 = { "target-cpu"="x86-64" "tune-cpu"="sandybridge" }
85 attributes #5 = { "target-cpu"="sandybridge" "tune-cpu"="sandybridge" }