[polly] [Polly] Add vectorize metadata to loops identified as vectorizable by polly (PR #113994)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 02:15:13 PST 2025


================
@@ -233,6 +238,30 @@ static bool generateCode(Scop &S, IslAstInfo &AI, LoopInfo &LI,
   NodeBuilder.allocateNewArrays(StartExitBlocks);
   Annotator.buildAliasScopes(S);
 
+  // The code below annotates the "llvm.loop.vectorize.enable" to false
+  // for the code flow taken when RTCs fail. Because we don't want the
+  // Loop Vectorizer to come in later and vectorize the original fall back
+  // loop when 'polly-annotate-metadata-vectorize' is passed.
+  if (PollyVectorizeMetadata) {
----------------
Meinersbur wrote:

You can add the test changes into PR. If that's too much work I'd accept the `-polly-annotate-metadata-vectorize` opt-in as well.

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


More information about the llvm-commits mailing list