[PATCH] D26869: [LV] Add flag for ignoring target info

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 23:36:40 PST 2016


mkuper added a comment.

In https://reviews.llvm.org/D26869#603921, @anemet wrote:

> > Also there is actual shift of how tests should be written now.  I think that we all got used to writing these tests by forcing the vectorization and interleave factors.
>
>


I think most tests will still want to provide explicit vectorization and interleave factors, because we usually want to force vectorization with a specific factor, as opposed to "do the default thing, whatever it happens to be".

>> Do you have an opinion on the concept itself, other than "circulate more widely"?
> 
> I haven't been following the review closely where this came up so I didn't understand the rational and the summary does not really explain how the current practice breaks down.   I am assuming we want to write target-indepedent tests but the vectorizer needs a cost model.

The gist is that we now query the cost model to make predication decisions, not just determine the VF and UF.

> Why aren't we adding a forcing flag for this feature as well, just like forcing the vectorization/interleave factors?  That may make the test more explicit rather than using the default TTI.  To me that would be the generalization of the current concept.

This is exactly why I asked for additional opinions. IIRC this is what Matt originally suggested. 
What I'm afraid of is flag proliferation - I wouldn't want to have to add another flag to all "target-independent" tests each time we add a cost model query that affects the way the vectorized code looks (as opposed to affecting the VF and UF).


https://reviews.llvm.org/D26869





More information about the llvm-commits mailing list