[Mlir-commits] [mlir] [MLIR] Fix crash in ValueBoundsConstraintSet for non-entry block args (PR #185048)
Matthias Springer
llvmlistbot at llvm.org
Mon Mar 9 01:35:14 PDT 2026
================
@@ -607,3 +609,28 @@ func.func @forward_and_eliminate_stores_through_trivial_aliases(
vector.transfer_write %23, %subview_of_cast[%c0, %c0] {in_bounds = [true, true]} : vector<[8]x[8]xf32>, memref<?x?xf32, strided<[?, 1]>>
return
}
+
+// Regression test for https://github.com/llvm/llvm-project/issues/119861:
+// When two transfer ops in unstructured control flow share the same block
+// argument as an index, ValueBoundsConstraintSet must not crash when
+// isDisjointTransferIndices calls areEqual on those values.
+
+// CHECK-LABEL: func @no_crash_unstructured_cf_shared_index
----------------
matthias-springer wrote:
Can you create a new test file `mlir/test/Dialect/ControlFlow/value-bounds-op-interface-impl.mlir` and put a test in there? (We would not be able to compute a meaningful bound, but just test that we don't hit the assertion.) With a note that unstructured control flow is not supported yet.
We can directly point to that test when somebody is asking for CF support for the value bounds infrastructure.
```
// RUN: mlir-opt %s -pass-pipeline='builtin.module(func.func(test-affine-reify-value-bounds))' -verify-diagnostics \
// RUN: -split-input-file | FileCheck %s
```
https://github.com/llvm/llvm-project/pull/185048
More information about the Mlir-commits
mailing list