Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[X86] Add test showing failure to expand <2 x float> fpow without wid…
…ening to <4 x float> Similar to D125988 (and I have a pending follow up patch to handle fpow).
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc -mtriple=x86_64-linux-gnu < %s | FileCheck %s | ||
|
||
; FIXME: Ensure vectorized FPOWs are not widened/unrolled such that they get lowered | ||
; into libcalls on undef elements. | ||
|
||
define float @test_fpow_v2f32_multiuse(<2 x float> %a0, <2 x float> %a1, <2 x float> *%p3) nounwind { | ||
; CHECK-LABEL: test_fpow_v2f32_multiuse: | ||
; CHECK: # %bb.0: | ||
; CHECK-NEXT: pushq %rbx | ||
; CHECK-NEXT: subq $64, %rsp | ||
; CHECK-NEXT: movq %rdi, %rbx | ||
; CHECK-NEXT: movaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill | ||
; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill | ||
; CHECK-NEXT: shufps {{.*#+}} xmm0 = xmm0[3,3,3,3] | ||
; CHECK-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,3,3,3] | ||
; CHECK-NEXT: callq powf@PLT | ||
; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill | ||
; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload | ||
; CHECK-NEXT: movhlps {{.*#+}} xmm0 = xmm0[1,1] | ||
; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload | ||
; CHECK-NEXT: movhlps {{.*#+}} xmm1 = xmm1[1,1] | ||
; CHECK-NEXT: callq powf@PLT | ||
; CHECK-NEXT: unpcklps (%rsp), %xmm0 # 16-byte Folded Reload | ||
; CHECK-NEXT: # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1] | ||
; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill | ||
; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload | ||
; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload | ||
; CHECK-NEXT: callq powf@PLT | ||
; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill | ||
; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload | ||
; CHECK-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,1,1,1] | ||
; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload | ||
; CHECK-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,1,1,1] | ||
; CHECK-NEXT: callq powf@PLT | ||
; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload | ||
; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] | ||
; CHECK-NEXT: unpcklpd (%rsp), %xmm1 # 16-byte Folded Reload | ||
; CHECK-NEXT: # xmm1 = xmm1[0],mem[0] | ||
; CHECK-NEXT: addss %xmm1, %xmm0 | ||
; CHECK-NEXT: movlps %xmm1, (%rbx) | ||
; CHECK-NEXT: addq $64, %rsp | ||
; CHECK-NEXT: popq %rbx | ||
; CHECK-NEXT: retq | ||
%fp = call <2 x float> @llvm.pow.v2f32(<2 x float> %a0, <2 x float> %a1) | ||
%fp0 = extractelement <2 x float> %fp, i32 0 | ||
%fp1 = extractelement <2 x float> %fp, i32 1 | ||
%res = fadd float %fp0, %fp1 | ||
store <2 x float> %fp, <2 x float> *%p3 | ||
ret float %res | ||
} | ||
declare <2 x float> @llvm.pow.v2f32(<2 x float>, <2 x float>) | ||
|