1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc -mtriple=x86_64-linux-gnu < %s | FileCheck %s 3 4; Ensure vectorized FPOWs are not widened/unrolled such that they get lowered 5; into libcalls on undef elements. 6 7define float @test_fpow_v2f32_multiuse(<2 x float> %a0, <2 x float> %a1, ptr%p3) nounwind { 8; CHECK-LABEL: test_fpow_v2f32_multiuse: 9; CHECK: # %bb.0: 10; CHECK-NEXT: pushq %rbx 11; CHECK-NEXT: subq $48, %rsp 12; CHECK-NEXT: movq %rdi, %rbx 13; CHECK-NEXT: movaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill 14; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill 15; CHECK-NEXT: callq powf@PLT 16; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill 17; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload 18; CHECK-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,1,1,1] 19; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload 20; CHECK-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,1,1,1] 21; CHECK-NEXT: callq powf@PLT 22; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm2 # 16-byte Reload 23; CHECK-NEXT: movaps %xmm2, %xmm1 24; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] 25; CHECK-NEXT: addss %xmm2, %xmm0 26; CHECK-NEXT: movlps %xmm1, (%rbx) 27; CHECK-NEXT: addq $48, %rsp 28; CHECK-NEXT: popq %rbx 29; CHECK-NEXT: retq 30 %fp = call <2 x float> @llvm.pow.v2f32(<2 x float> %a0, <2 x float> %a1) 31 %fp0 = extractelement <2 x float> %fp, i32 0 32 %fp1 = extractelement <2 x float> %fp, i32 1 33 %res = fadd float %fp0, %fp1 34 store <2 x float> %fp, ptr%p3 35 ret float %res 36} 37declare <2 x float> @llvm.pow.v2f32(<2 x float>, <2 x float>) 38 39