[llvm-bugs] [Bug 47404] New: Failure to detect pblendvb pattern
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 3 00:29:20 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47404
Bug ID: 47404
Summary: Failure to detect pblendvb pattern
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: gabravier at gmail.com
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
llvm-dev at redking.me.uk, spatel+llvm at rotateright.com
typedef char v16i8 __attribute__((vector_size(16)));
v16i8 blend_epi8(v16i8 x, v16i8 y, v16i8 mask)
{
v16i8 tmp = (mask < 0);
return (v16i8)((~tmp & x) | (tmp & y));
}
This can can be optimized to `return __builtin_ia32_pblendvb128(x, y, mask);`.
This transformation is done by GCC, but not by LLVM.
--
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/20200903/997f985d/attachment.html>
More information about the llvm-bugs
mailing list