[llvm] Adding the support for vectorization of loops with load based tripcount (PR #209390)
Manish Srivastava via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 11:30:39 PDT 2026
================
@@ -0,0 +1,144 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; RUN: opt < %s -passes=loop-vectorize -enable-vectorize-loads-as-bound -force-vector-width=4 -force-vector-interleave=1 -S | FileCheck %s
+;
+; Simple loop with loop bound loaded from a pointer (*Len).
+;
+; void foo(int *A, int *B, int *C, int *Len) {
+; for (int i = 0; i < *Len; i++)
+; A[i] = B[i] + C[i];
+; }
+;
+
+define dso_local void @foo(ptr noundef writeonly captures(none) %A, ptr noundef readonly captures(none) %B, ptr noundef readonly captures(none) %C, ptr noundef readonly captures(none) %Len) #0 {
----------------
mk-srivastava wrote:
I have made the suggested changes. Please have a look.
https://github.com/llvm/llvm-project/pull/209390
More information about the llvm-commits
mailing list