[Mlir-commits] [mlir] [mlir][tosa] Harden folds/canonicalizations for unranked and dynamic shapes (PR #188188)
Luke Hutton
llvmlistbot at llvm.org
Thu Mar 26 03:32:22 PDT 2026
================
@@ -1554,6 +1571,8 @@ OpFoldResult CastOp::fold(FoldAdaptor adaptor) {
auto inTy = llvm::cast<ShapedType>(getInput().getType());
auto outTy = llvm::cast<ShapedType>(getType());
+ if (!outTy.hasStaticShape())
----------------
lhutton1 wrote:
`!outTy.hasRank() || !outTy.hasStaticShape()`
https://github.com/llvm/llvm-project/pull/188188
More information about the Mlir-commits
mailing list