https://bugs.llvm.org/show_bug.cgi?id=46890
Bug ID: 46890
Summary: Loop vectorizer does not account for incremented
pointers
Product: tools
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: opt
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
The following snippet:
void foo(char restrict d, char restrict s1, char* restrict s2) {
for (int y = 0; y < 128; y++) {
for (int i = 0; i < 16; i++) {
d[i] = s1[i] + s2[i];
}
d += 16;
}
}
cannot be vectorized by LLVM trunk, however writing the same snippet in terms
of a constant base pointer (array index i+16*y ) can be vectorized. This
snippet can be vectorized by GCC trunk. Support for this pattern was added to
GCC in GCC 10.
This affects SPEC2017 performance.
Tested on aarch64-linux
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs