[cfe-dev] Why doesn't pragma vectorize warn by default on failure

Gonzalo BG gonzalobg88 at gmail.com
Wed Jul 22 09:29:28 PDT 2015


Right now when writing code like:

#pragma clang loop vectorize(enable) interleave(enable)
while(...) {
  ...
}

one has to:

1) pass the compiler the flags
"-Rpass-missed=loop-vectorize -Rpass-analysis=loop-vectorize" to get a
warning on all loops where vectorization failed.
2) grep that output (which might be huge in a moderately sized project) for
that particular loop.
3) Check if vectorization worked.
4) Remove the compiler flags and recompile to keep working on something
else.

This is really bad.

A user specified that a loop has to be vectorized. When I do this, it is my
intent that the loop gets vectorized. However, the current workflow
discourages users from actually checking that vectorization worked.
Furthermore, if months later something on that loop changes that breaks
vectorization, this happens silently.

Why are things this way? Can something be done about this?

Could we get these warnings on by default for those loops explicitly marked
with the vectorize pragma?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150722/f65c6709/attachment.html>


More information about the cfe-dev mailing list