[llvm-bugs] [Bug 27618] New: vectorization remark is printed multiple times
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 3 08:42:58 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27618
Bug ID: 27618
Summary: vectorization remark is printed multiple times
Product: clang
Version: 3.8
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: albertnetymk at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
```
#define SIZE (1 << 15)
#define MINDEX(n, m) (SIZE*(n)+(m))
#define XMM_ALIGNMENT_BYTES 16
float *restrict mat_a __attribute__((aligned (XMM_ALIGNMENT_BYTES)));
float *restrict vec_b __attribute__((aligned (XMM_ALIGNMENT_BYTES)));
float *restrict vec_c __attribute__((aligned (XMM_ALIGNMENT_BYTES)));
// __attribute__ ((noinline))
void matvec_autovec()
{
int i, j;
float tmp;
for (i = 0; i < SIZE; i++) {
tmp = 0;
for (j = 0; j < SIZE; j++) {
tmp += mat_a[MINDEX(i, j)] * vec_b[j];
}
vec_c[i] = tmp;
}
}
void multiple()
{
matvec_autovec();
}
int main(int argc, char **argv)
{
return 0;
}
```
The command I used is `clang-3.8 -Ofast test.c -Rpass=loop-vectorize`
```
test.c:22:9: remark: vectorized loop (vectorization width: 4, interleaved
count: 1) [-Rpass=loop-vectorize]
for (j = 0; j < SIZE; j++) {
^
test.c:22:9: remark: vectorized loop (vectorization width: 4, interleaved
count: 1) [-Rpass=loop-vectorize]
```
The output reduces to 1 after I uncomment the `noinline` attribute.
--
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/20160503/1aa5c398/attachment-0001.html>
More information about the llvm-bugs
mailing list