[llvm-bugs] [Bug 52128] New: Failure to vectorize accumulation when result is stored in memory
llvm-bugs at lists.llvm.org
Sun Oct 10 11:05:13 PDT 2021
Bug ID: 52128
Summary: Failure to vectorize accumulation when result is
stored in memory
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: gabravier at gmail.com
CC: llvm-bugs at lists.llvm.org
void mac(const int *b, int *sum)
int dotp = 0;
for (int i = 0; i < 32; i++)
dotp += b[i];
*sum = dotp;
This is not vectorized, but could be. This is done by GCC, but not by LLVM.
PS: Oddly, this can easily be changed to vectorize, but only by making it so
`dotp` is returned instead of stored into memory.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs