[Mlir-commits] [mlir] [mlir][affine] Support vectorization with the step size exceeding 2^32-1 (PR #66026)

Sergei Grechanik llvmlistbot at llvm.org
Fri Sep 22 09:04:47 PDT 2023


================
@@ -684,3 +684,16 @@ func.func @vec_vecdim_reduction_rejected(%in: memref<256x512xf32>, %out: memref<
 
 // CHECK-LABEL: @vec_vecdim_reduction_rejected
 // CHECK-NOT: vector
+
+// -----
+
+// CHECK-LABEL: @large_step_size
+// Support the step size exceeding 2^32-1.
+func.func @large_step_size(%A: memref<4294967295xf32>) {
+ %cst = arith.constant 0.000000e+00 : f32
+ // CHECK: affine.for %{{.*}} = 0 to 256 step 549755813760 {
+ affine.for %i = 0 to 256 step 4294967295 {
----------------
sergei-grechanik wrote:

The problem is that currently loops with non-unit step sizes are not vectorized correctly (we should probably add a check and avoid vectorizing these loops).

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


More information about the Mlir-commits mailing list