[llvm-bugs] [Bug 37763] New: [X86] Investigate vectorization of the overflow add/sub nodes to PADD+PADDS+PCMPEQ etc.
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jun 10 10:10:37 PDT 2018
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: unassignedbugs at nondot.org
Reporter: llvm-dev at redking.me.uk
CC: craig.topper at gmail.com, deadalnix at gmail.com,
lebedev.ri at gmail.com, llvm-bugs at lists.llvm.org,
spatel+llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180610/5d0d4825/attachment.html>
More information about the llvm-bugs
mailing list