[PATCH] D41294: [X86][SSE] Use (V)PHMINPOSUW for vXi8 SMAX/SMIN/UMAX/UMIN horizontal reductions (PR32841)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 15 08:34:45 PST 2017
RKSimon created this revision.
RKSimon added reviewers: mkuper, zvi, craig.topper, spatel, andreadb.
Extension to https://reviews.llvm.org/D39729 which performed this for vXi16, with the same bit flipping to handle SMAX/SMIN/UMAX cases, vXi8 UMIN horizontal reductions can be performed.
This makes use of the fact that by performing a pair-wise i8 SHUFFLE_UMIN before PHMINPOSUW, we both get the UMIN of each pair but also zero-extend the upper bits ready for v8i16.
Repository:
rL LLVM
https://reviews.llvm.org/D41294
Files:
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/horizontal-reduce-smax.ll
test/CodeGen/X86/horizontal-reduce-smin.ll
test/CodeGen/X86/horizontal-reduce-umax.ll
test/CodeGen/X86/horizontal-reduce-umin.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41294.127138.patch
Type: text/x-patch
Size: 78204 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171215/197b36d7/attachment.bin>
More information about the llvm-commits
mailing list