https://bugs.llvm.org/show_bug.cgi?id=37763
Bug ID: 37763
Summary: [X86] Investigate vectorization of the overflow
add/sub nodes to PADD+PADDS+PCMPEQ etc.
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, deadal...@gmail.com,
lebedev...@gmail.com, llvm-bugs@lists.llvm.org,
spatel+l...@rotateright.com
We may be able to efficiently vectorize some SADDO/UADDO (etc.) nodes (vXi8 and
vXi16) by performing both a PADDW and PADDSW (etc.) and comparing the results.
e.g.
#include <x86intrin.h>
struct Res {
__v8hi value;
__v8hi overflow;
};
struct Res saddo16(__v8hi x, __v8hi y) {
struct Res r;
r.value = _mm_add_epi16(x, y);
r.overflow = (r.value != (__v8hi)_mm_adds_epi16(x, y));
return r;
}
https://godbolt.org/g/4xkauv
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs