[llvm-bugs] [Bug 28374] New: -Rpass-missed=loop-vectorize says nothing at all for outer loops
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 30 12:00:55 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28374
Bug ID: 28374
Summary: -Rpass-missed=loop-vectorize says nothing at all for
outer loops
Product: new-bugs
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: sean at rogue-research.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 16662
--> https://llvm.org/bugs/attachment.cgi?id=16662&action=edit
Repro case
Consider:
--------test.c-------
#include <stdio.h>
int foo(int *A, int *B, int n) {
#pragma clang loop vectorize(enable)
for (int k = 0; k < n; ++k)
{
unsigned sum = 0;
#pragma clang loop vectorize(enable)
for (int i = 0; i < n; ++i)
sum += A[i] + 5;
printf("%i", sum);
}
return 0;
}
---------------
$ clang --version
clang version 3.9.0 (trunk 274259)
$ clang -S -fvectorize -O3 -Rpass=loop-vectorize -Rpass-missed=loop-vectorize
-Rpass-analysis=loop-vectorize ~/Desktop/test.c
/Users/sean/Desktop/test.c:11:4: remark: vectorized loop (vectorization width:
4, interleaved count: 2) [-Rpass=loop-vectorize]
for (int i = 0; i < n; ++i)
^
It helpfully says it vectorized the inner loop, but says *nothing* about the
outer loop (despite the #pragma even).
Adam Nemet said on cfe-dev that "the vectorizer does not visit outer loops and
the diagnostics is emitted in the vectorizer so we don’t get a chance to report
anything."
For a user trying to audit/tweak his loops to be vectorization-friendly, it's
frustrating that the flags that are supposed to report if/why a loop has/has
not been vectorized are not behaving reliably.
--
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/20160630/b76df0bf/attachment.html>
More information about the llvm-bugs
mailing list