Add Rpass-missed and Rpass-analysis reports to the loop vectorizer

Tyler Nowicki tnowicki at
Wed Jun 11 11:14:44 PDT 2014

Hi Arnold,

I agree that the messages are not intelligible enough. But I also don’t want them to be so vague that they provide no information to the user. I think the analysis message should tell the user what is wrong with the loop. I would appreciate some feedback on the messages below.

"loop entries could not be simplified”
“loop branches could not be simplified”
“loop terminations could not be simplified”
"conditional branches could not be substituted for a select instruction”
"could not determine number of loop iterations”
“unvectorizable instruction”
“memory dependency conflict” <-?
“call instruction cannot be vectorized”
“intrinsic instruction cannot be vectorized”
“instruction return type cannot be vectorized"
“integer type loop induction variable could not be identified"
“non-simple read from memory” <-?
“non-simple write to memory” <-?
“write to uniform address” <-?
“cannot identify array bounds”
“cannot vectorize with memory checks"
“result of instruction cannot be used outside the loop"

I’m also looking at trying to report the location of the invalid instructions when they are found.


On Jun 10, 2014, at 3:29 PM, Arnold Schwaighofer <aschwaighofer at> wrote:

> Overall looks pretty good to me. Except some of the error messages are too detailed or refer to artifacts of the intermediate representation.
> I think those diagnostics are meant to be consumed by people looking at the source language (C,C++, …). I don’t think we should refer to LLVM IR.
> +        if (Message)
> +          *Message << "found an outside user for: " << *UI;
> Similar, I don’t think we should refer to structural properties of the IR:
> +    emitAnalysis(Report() << "loop does not have a single backedge");
> Does not reflect a property of the source level language but rather of the implementation of the loop vectorizer (requirement of simplified loops). I think we need to find a broader wording that applies to the source language. Maybe something like “The control flow structure of the loop could not be understood by the vectorizer” or similar.
> Thank you
>> On Jun 10, 2014, at 3:13 PM, Tyler Nowicki <tnowicki at> wrote:
>> <vectorization_diagnostics-svn.patch>

More information about the llvm-commits mailing list