[PATCH] D94779: [Clang] Ensure vector predication loop metadata is always emitted when pragma is specified.

Malhar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 11 07:07:57 PST 2021


malharJ added inline comments.


================
Comment at: clang/test/CodeGenCXX/pragma-loop-predicate.cpp:88
+
+#pragma clang loop vectorize_predicate(enable) vectorize_width(1)
+  for (int i = 0; i < Length; i++)
----------------
dmgreen wrote:
> malharJ wrote:
> > dmgreen wrote:
> > > Can you add another test for `#pragma clang loop vectorize(disable) vectorize_predicate(enable)`. My understanding is that it will produce the same as `vectorize_predicate(enable) vectorize_width(1)`
> > I believe test5( ) above takes care of this ? 
> > 
> > comparing the output of the two (test8 and test5), test8 produces an extra metadata : 
> > 
> > ```
> > {!"llvm.loop.vectorize.scalable.enable", i1 false}
> > ```
> > 
> Oh yeah. I didn't see the existing checks. Strange that it would not emit scalable then, but still doing the expected thing.
I had a quick look at the logic for scalable, and it seems like it's only emitted when a fixed/scalable vectorization width has been specified.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94779/new/

https://reviews.llvm.org/D94779



More information about the cfe-commits mailing list