[Mlir-commits] [mlir] [mlir][vector] Preserve dynamic mask bounds in shape cast folding (PR #229699)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed Oct 14 03:18:03 PDT 2026
================
@@ -3523,6 +3523,23 @@ func.func @fold_shape_cast_with_mask_trailing_unit(%arg0: tensor<1x?xf32>) -> ve
// -----
+// CHECK-LABEL: func.func @fold_shape_cast_with_mask_trailing_unit_dynamic(
+// CHECK-SAME: %[[N:.*]]: index) -> vector<8xi1> {
+func.func @fold_shape_cast_with_mask_trailing_unit_dynamic(%n: index) -> vector<8xi1> {
----------------
banach-space wrote:
I know _why_ you added "dynamic" in the test name, but to me "@fold_shape_cast_with_mask_trailing_unit" is _more_ "dynamic" - it contains a "dynamic shape":
```mlir
%dim = tensor.dim %arg0, %c1 : tensor<1x?xf32>
```
In general, both tests are dynamic and I would like for you to use some other (more obvious) differentiating factor between the cases. I have the following suggestion:
* `@fold_shape_cast_with_mask_trailing_unit` -> `@fold_shape_cast_with_mask_trailing_unit_provable_true`
* `@fold_shape_cast_with_mask_trailing_unit_dynamic` -> `@no_fold_shape_cast_with_mask_trailing_unit_dynamic_unknown`
https://github.com/llvm/llvm-project/pull/229699
More information about the Mlir-commits
mailing list