1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=i686-- -mcpu=penryn | FileCheck %s 3; PR2647 4 5@0 = external dso_local global float, align 16 ; <ptr>:0 [#uses=2] 6 7define internal void @a() nounwind { 8; CHECK-LABEL: a: 9; CHECK: # %bb.0: 10; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero 11; CHECK-NEXT: rsqrtss %xmm0, %xmm0 12; CHECK-NEXT: movss %xmm0, __unnamed_1 13; CHECK-NEXT: retl 14 load float, ptr @0, align 16 ; <float>:1 [#uses=1] 15 insertelement <4 x float> undef, float %1, i32 0 ; <<4 x float>>:2 [#uses=1] 16 call <4 x float> @llvm.x86.sse.rsqrt.ss( <4 x float> %2 ) ; <<4 x float>>:3 [#uses=1] 17 extractelement <4 x float> %3, i32 0 ; <float>:4 [#uses=1] 18 store float %4, ptr @0, align 16 19 ret void 20} 21define internal void @b() nounwind { 22; CHECK-LABEL: b: 23; CHECK: # %bb.0: 24; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero 25; CHECK-NEXT: movsldup {{.*#+}} xmm0 = xmm0[0,0,2,2] 26; CHECK-NEXT: rsqrtss %xmm0, %xmm0 27; CHECK-NEXT: extractps $1, %xmm0, __unnamed_1 28; CHECK-NEXT: retl 29 load float, ptr @0, align 16 ; <float>:1 [#uses=1] 30 insertelement <4 x float> undef, float %1, i32 1 ; <<4 x float>>:2 [#uses=1] 31 call <4 x float> @llvm.x86.sse.rsqrt.ss( <4 x float> %2 ) ; <<4 x float>>:3 [#uses=1] 32 extractelement <4 x float> %3, i32 1 ; <float>:4 [#uses=1] 33 store float %4, ptr @0, align 16 34 ret void 35} 36 37declare <4 x float> @llvm.x86.sse.rsqrt.ss(<4 x float>) nounwind readnone 38 39