[clang] [clang][CodeGen] Fix metadata when vectorization is disabled by pragma (PR #135163)

Ryotaro Kasuga via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 10 06:07:59 PDT 2025


================
@@ -194,7 +194,7 @@ void for_test_scalable(int *List, int Length) {
   }
 }
 
-// Verify for loop is performing scalable vectorization
+// Verify for loop is NOT performing vectorization because the width is 1
----------------
kasuga-fj wrote:

You are right, I misunderstood the condition, thanks.

So what if the width is 1 and fixed/scalable is not explicitly specified? Should vectorization run? If taking the intent of the original implementation, then it appears to not vectorize the loop.

https://github.com/llvm/llvm-project/blob/a03b2250db20db7d6416ca37b41f5041e613f632/clang/lib/CodeGen/CGLoopInfo.cpp#L646-L648

https://github.com/llvm/llvm-project/pull/135163


More information about the cfe-commits mailing list