https://bugs.llvm.org/show_bug.cgi?id=48879
Bug ID: 48879
Summary: [X86][SSE2] Failure to vectorize int16_t[8] to pminsw
pattern
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedb...@nondot.org
Reporter: llvm-...@redking.me.uk
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, pengfei.w...@intel.com,
spatel+l...@rotateright.com
https://gcc.godbolt.org/z/57nGK3
typedef int16_t T;
constexpr int N = 8;
std::array<T,N> compute_min(std::array<T,N>& x, std::array<T,N>& y) {
std::array<T,N> result;
for (int i = 0; i != N; ++i) {
result[i] = std::min(x[i], y[i]);
}
return result;
}
This ends up as a horrid mix of scalar and <2 x i16> smin patterns.
Much of the problem seems to be that we end up trying to store the final array
as { i64, i64 } aggregate, resulting in a load of zext+shift+or to pack the
i16's.
Even more impressive with -march=atom we end up with masked gather calls....
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs