[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:23 PDT 2026
================
@@ -242,6 +242,8 @@ struct TosaFoldConstantTranspose : public OpRewritePattern<tosa::TransposeOp> {
LogicalResult matchAndRewrite(tosa::TransposeOp op,
PatternRewriter &rewriter) const override {
auto outputType = cast<ShapedType>(op.getType());
+ if (!outputType.hasStaticShape())
----------------
lhutton1 wrote:
`!outputType.hasRank() || !outputType.hasStaticShape()`
https://github.com/llvm/llvm-project/pull/188188
More information about the Mlir-commits
mailing list