[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 27 05:51:46 PDT 2025


================
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs,
   else if (Attrs.PipelineInitiationInterval != 0)
     Enabled = true;
 
+  SmallVector<Metadata *, 4> Args;
+  Args.append(LoopProperties.begin(), LoopProperties.end());
+
   if (Enabled != true) {
-    SmallVector<Metadata *, 4> NewLoopProperties;
     if (Enabled == false) {
-      NewLoopProperties.append(LoopProperties.begin(), LoopProperties.end());
----------------
Meinersbur wrote:

In principle, LoopVectorize should know that if the original loop had a progress guarantee, then the vectorized loop will as well, so it should add `llvm.loop.must_progress` no matter what. I don't think it currently does.

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


More information about the llvm-commits mailing list