[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
Mon Jan 18 05:59:22 PST 2021


dmgreen added a comment.

I believe this sentence is the important part (the width=1 is just an edge case):

> For all other non-zero vectorization widths, the pragma is not ignored unless vectorization is explicitly disabled using vectorize(disable)

And this sounds like a sensible fix to me. As in - when the vector width is specified that should not mean the predicate(enabled/disabled) is ignored.

Can you expand the test a little for both predicate(enable) and disable?



================
Comment at: clang/test/CodeGenCXX/pragma-loop-predicate.cpp:77
+
+#pragma clang loop vectorize_predicate(disable) vectorize_width(4)
+  for (int i = 0; i < Length; i++)
----------------
Can you add a test for vectorize_predicate(enable) vectorize_width(4)


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