1 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=core2 | FileCheck %s
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=btver2 | FileCheck %s --check-prefix=BTVER2
4 ; If the target's divss/divps instructions are substantially
5 ; slower than rcpss/rcpps with a Newton-Raphson refinement,
6 ; we should generate the estimate sequence.
8 ; See PR21385 ( http://llvm.org/bugs/show_bug.cgi?id=21385 )
9 ; for details about the accuracy, speed, and implementation
10 ; differences of x86 reciprocal estimates.
12 define float @reciprocal_estimate(float %x) #0 {
13 %div = fdiv fast float 1.0, %x
16 ; CHECK-LABEL: reciprocal_estimate:
22 ; BTVER2-LABEL: reciprocal_estimate:
31 define <4 x float> @reciprocal_estimate_v4f32(<4 x float> %x) #0 {
32 %div = fdiv fast <4 x float> <float 1.0, float 1.0, float 1.0, float 1.0>, %x
35 ; CHECK-LABEL: reciprocal_estimate_v4f32:
41 ; BTVER2-LABEL: reciprocal_estimate_v4f32:
50 define <8 x float> @reciprocal_estimate_v8f32(<8 x float> %x) #0 {
51 %div = fdiv fast <8 x float> <float 1.0, float 1.0, float 1.0, float 1.0, float 1.0, float 1.0, float 1.0, float 1.0>, %x
54 ; CHECK-LABEL: reciprocal_estimate_v8f32:
63 ; BTVER2-LABEL: reciprocal_estimate_v8f32:
72 attributes #0 = { "unsafe-fp-math"="true" }