================ @@ -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()); ---------------- kasuga-fj 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 think this is completely correct. What I didn't understand is, why the followup metadata of `LOOP_6` (`FOLLOW_VECTOR_6`) didn't have `llvm.mustprogress` before this patch, but now it (`FOLLOWUP_VECTOR_3`) does. I investigated a little deeper and found the cause; `FOLLOWUP_VECTOR_6` actually had `mustprogress` (?!). That is, the test passed for both of the following directives. ``` // Original. // CHECK: ![[AFTER_VECTOR_6]] = distinct !{![[AFTER_VECTOR_6]], ![[ISVECTORIZED:.*]], ![[UNROLL_8:.*]]} // This was also fine. // CHECK: ![[AFTER_VECTOR_6]] = distinct !{![[AFTER_VECTOR_6]], [[MP]], ![[ISVECTORIZED:.*]], ![[UNROLL_8:.*]]} ``` Maybe FileCheck has a problem? https://github.com/llvm/llvm-project/pull/131985 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits