blob: b36d61e0f31b1b2691a8d35758398f0357f18c3d [file] [log] [blame]
Dan Gohman0a063102009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 -mattr=+sse2
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Evan Cheng18950d92008-05-07 22:59:08 +00003define <4 x float> @opRSQ(<4 x float> %a) nounwind {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004entry:
Tanya Lattner348c6182008-03-25 04:26:08 +00005 %tmp2 = extractelement <4 x float> %a, i32 3 ; <float> [#uses=2]
6 %abscond = fcmp oge float %tmp2, -0.000000e+00 ; <i1> [#uses=1]
7 %abs = select i1 %abscond, float %tmp2, float 0.000000e+00 ; <float> [#uses=1]
8 %tmp3 = tail call float @llvm.sqrt.f32( float %abs ) ; <float> [#uses=1]
9 %tmp4 = fdiv float 1.000000e+00, %tmp3 ; <float> [#uses=1]
10 %tmp11 = insertelement <4 x float> zeroinitializer, float %tmp4, i32 3 ; <<4 x float>> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011 ret <4 x float> %tmp11
12}
13
Tanya Lattner348c6182008-03-25 04:26:08 +000014declare float @llvm.sqrt.f32(float)
15