[llvm] [SCEV][LV] Add Stride equal to one Predicate to enable strided access versioning (PR #77287)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 01:42:47 PST 2024


================
@@ -92,3 +92,55 @@ for.end.loopexit:
 for.end:
   ret void
 }
+
+; We can vectorize the loop by using stride = 1 to calculate iteration count
+; and generate the runtime check to guard the vectorized loop.
+
+; CHECK-LABEL: s172
+; CHECK-DAG: icmp ne i32 %xb, 1
+; CHECK: vector.body
----------------
sjoerdmeijer wrote:

Nit: the checks are a bit minimal, personally I would like to see a bit more context, but I see there's precedent in this file for just checking for stride 1 compare.

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


More information about the llvm-commits mailing list