[llvm-bugs] [Bug 48044] New: Missed loop vectorization with gather
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Nov 2 04:24:50 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48044
Bug ID: 48044
Summary: Missed loop vectorization with gather
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: david.bolvansky at gmail.com
CC: llvm-bugs at lists.llvm.org
int c1[256], c2[256], r[256];
unsigned int f[256*257];
#define SETMASK (1 << 21)
#define CLEARMASK (~(SETMASK))
void foo(void)
{
int i, j, base;
for (i = 0; i <=255; i++) {
base = r[i];
for (j = 0; j <= 255; j++) {
c1[j] = f[(j << 8) + base] & CLEARMASK;
c2[j] = (f[(j << 8) + base + 1] & CLEARMASK) - 1;
}
}
}
O3 AVX2: Loop not vectorized due to cost model.
ICC vectorizes it.
https://godbolt.org/z/9E5ehz
--
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/20201102/40c86b7d/attachment.html>
More information about the llvm-bugs
mailing list