[Mlir-commits] [mlir] [mlir][tosa] Harden folds/canonicalizations for unranked and dynamic shapes (PR #188188)

Hocky Yudhiono llvmlistbot at llvm.org
Tue Mar 24 20:53:13 PDT 2026


================
@@ -299,6 +301,8 @@ struct TosaFoldConstantReciprocal : public OpRewritePattern<ReciprocalOp> {
     auto newTensor = applyElementWise<APFloat, APFloat, FloatType>(
         inputValues, &ReciprocalOp::calcOneElement,
         cast<FloatType>(inputValues.getElementType()));
+    if (newTensor.getType() != recip.getType())
----------------
hockyy wrote:

good point, i moved it

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


More information about the Mlir-commits mailing list