[llvm] [LoopVectorize] Add cost of generating tail-folding mask to the loop (PR #130565)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 10 07:02:52 PDT 2025
================
@@ -78,11 +78,16 @@ loop:
store i64 0, ptr %arrayidx13, align 8
%iv.next = add nuw nsw i64 %iv, 1
%exitcond.not = icmp eq i64 %iv.next, 3
- br i1 %exitcond.not, label %exit, label %loop
+ br i1 %exitcond.not, label %exit, label %loop, !llvm.loop !1
exit:
ret void
}
+
+!1 = distinct !{!1, !2, !3, !4}
+!2 = !{!"llvm.loop.vectorize.width", i32 2}
+!3 = !{!"llvm.loop.vectorize.scalable.enable", i1 true}
+!4 = !{!"llvm.loop.vectorize.enable", i1 true}
----------------
Mel-Chen wrote:
nit:
```suggestion
!0 = distinct !{!0, !1, !2, !3}
!1 = !{!"llvm.loop.vectorize.width", i32 2}
!2 = !{!"llvm.loop.vectorize.scalable.enable", i1 true}
!3 = !{!"llvm.loop.vectorize.enable", i1 true}
```
https://github.com/llvm/llvm-project/pull/130565
More information about the llvm-commits
mailing list