[Mlir-commits] [mlir] [mlir][vector] Add extra check on distribute types to avoid crashes (PR #102952)
Han-Chung Wang
llvmlistbot at llvm.org
Tue Aug 13 14:02:09 PDT 2024
================
@@ -620,6 +620,38 @@ func.func @vector_reduction(%laneid: index) -> (f32) {
// -----
+// CHECK-PROP-LABEL: func @warp_distribute(
+// CHECK-PROP-SAME: %[[ID:.*]]: index, %[[SRC:.+]]: memref<128xf32>, %[[DEST:.+]]: memref<128xf32>)
+// CHECK-PROP: vector.warp_execute_on_lane_0(%[[ID]])[32]
+// CHECK-PROP-NEXT: "some_def"() : () -> vector<4096xf32>
+// CHECK-PROP-NEXT: %{{.*}} = vector.reduction
+// CHECK-PROP-DAG: %[[DEF:.*]] = arith.divf %{{.*}}, %{{.*}} : vector<1xf32>
+// CHECK-PROP-NOT: vector.warp_execute_on_lane_0
+// CHECK-PROP: scf.for %{{.*}} = %{{.*}} to %{{.*}} step %{{.*}}
----------------
hanhanW wrote:
Perhaps just check `scf.for` because we don't really care about the rest of part.
```suggestion
// CHECK-PROP: scf.for
```
https://github.com/llvm/llvm-project/pull/102952
More information about the Mlir-commits
mailing list