[llvm-dev] vectorize.enable

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 7 13:03:40 PDT 2019


Am Mo., 7. Okt. 2019 um 03:13 Uhr schrieb Hans Wennborg <hans at chromium.org>:
> The problem I see is that the warning isn't very actionable. Good
> warnings are supposed to be actionable, but what is the developer
> supposed to do in this case? The code looks perfectly set up for
> vectorization, but the compiler doesn't vectorize. What's the fix for
> the code?

Unfortunately, the problem is too complex that we could explain in a
single warning line.

Actionable warnings are nicer, but I don't think we can only emit
warnings if they are actionable.


> I think the thread mentioned that someone was working on fixing the
> vectorization for this case. Maybe we should wait for that?

This would fix one source of this warnings, but unfortunately there
are many reasons why vectorization can fail.


> (Another question is what we should do at -O0, because there I think
> we still don't warn. Does that mean the pragma doesn't have the same
> meaning at -O0?)

-O0 skips the entire optimization pass pipeline, i.e. the code is
never vectorized.


Michael


More information about the llvm-dev mailing list