[llvm] Adding the support for vectorization of loops with load based tripcount (PR #209390)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 13:57:11 PDT 2026
================
@@ -0,0 +1,35 @@
+; RUN: opt < %s -passes=loop-vectorize -enable-vectorize-loads-as-bound -force-vector-width=4 -force-vector-interleave=1 -S | FileCheck %s
+;
+; Negative test: the exit condition is an fcmp (not icmp).
+; SCEV cannot compute the trip count of a float-bounded loop, so the
+; pass enters the dynamic-bound path. It then rejects because the
+; branch condition is an FCmpInst, not an ICmpInst.
+;
+; void foo(float *A, float *B, float *Limit) {
+; for (float x = 0.0f; x < *Limit; x += 1.0f)
+; A[(int)x] = B[(int)x];
+; }
+
+define void @foo(ptr %A, ptr %B, ptr %Limit) {
+; CHECK-LABEL: @foo(
+; CHECK-NOT: vector.body
+; CHECK-NOT: .bound.pre
+entry:
+ br label %for.body
+
+for.body:
----------------
artagnon wrote:
```suggestion
loop:
```
similarly in all tests?
https://github.com/llvm/llvm-project/pull/209390
More information about the llvm-commits
mailing list