[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


================
@@ -2009,6 +2020,8 @@ OpFoldResult tosa::ReciprocalOp::fold(FoldAdaptor adaptor) {
     return {};
 
   auto shapeType = llvm::cast<ShapedType>(getType());
+  if (!shapeType.hasStaticShape())
----------------
lhutton1 wrote:

`!shapeType.hasRank() || !shapeType.hasStaticShape()`

https://github.com/llvm/llvm-project/pull/188188


More information about the Mlir-commits mailing list