[Mlir-commits] [mlir] [mlir][Arith] Fix crash when folding operations with dynamic-shaped tensors (PR #178428)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jan 28 07:06:50 PST 2026
mugiwaraluffy56 wrote:
Good question! I checked and this fix covers the main cases:
1. **CmpIOp::fold** - uses `getBoolAttribute` → **fixed in this PR**
2. **CmpFOp::fold** - only works with scalar `FloatAttr` (not tensors), so no issue
3. **SelectOp::fold** DenseElementsAttr path - added assertion (DenseElementsAttr guarantees static shapes by construction)
The other arith fold methods either work only with scalars or use patterns that don't create DenseElementsAttr from the result type. So this PR should cover the issue completely.
If there are any other similar issues in other dialects or areas you're aware of, I'd be happy to work on those as well!
https://github.com/llvm/llvm-project/pull/178428
More information about the Mlir-commits
mailing list