[PATCH] D94779: [Clang] Ensure vector predication pragma is ignored only when vectorization width is 1.

Dave Green via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 11 02:30:14 PST 2021


dmgreen added a comment.

This makes sense to me. If the user specifies the pragma then we send that through to the vectorizer, whatever it is. As much as `vectorize_width(1) interleave_count(4) vectorize_predicate(enable)` doesn't make a lot of sense, it's still something that should work. And if the user asks for it, that's what should be done.



================
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++)
----------------
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)`


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