[llvm-bugs] [Bug 38971] New: [X86] Reductions should use smaller vector types later on
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Sep 16 11:16:24 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38971
Bug ID: 38971
Summary: [X86] Reductions should use smaller vector types later
on
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: llvm-dev at redking.me.uk
CC: andrea.dibiagio at gmail.com, craig.topper at gmail.com,
llvm-bugs at lists.llvm.org, spatel+llvm at rotateright.com
https://godbolt.org/z/v--jOA
define float @test_v8f32(float %a0, <8 x float> %a1) {
%1 = call fast float
@llvm.experimental.vector.reduce.fadd.f32.f32.v8f32(float %a0, <8 x float> %a1)
ret float %1
}
declare float @llvm.experimental.vector.reduce.fadd.f32.f32.v8f32(float, <8 x
float>)
llc -mcpu=btver2
test_v8f32:
vextractf128 $1, %ymm1, %xmm0
vaddps %ymm0, %ymm1, %ymm0
vpermilpd $1, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
vaddps %ymm1, %ymm0, %ymm0
vhaddps %ymm0, %ymm0, %ymm0
retq
All of the vaddps/vhaddps stages could occur using xmm registers, which would
have a notable performance effect on btver2 which double pumps ymm ops as
2*128-bit.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180916/496bb6f8/attachment-0001.html>
More information about the llvm-bugs
mailing list