[Mlir-commits] [mlir] [mlir][tensor] Fix FoldTensorCastProducerOp for multiple result operations (PR #93374)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Jun 6 13:38:36 PDT 2024


================
@@ -4531,17 +4531,18 @@ struct FoldTensorCastProducerOp
     if (!hasTensorCastOperand)
       return failure();
 
-    SmallVector<Type, 4> newResultTypes;
-    newResultTypes.reserve(op->getNumResults());
+    SmallVector<Type, 4> newResultTypes(op->getResultTypes());
     SmallVector<Value, 4> newOperands;
     newOperands.reserve(op->getNumOperands());
+    // Assumes that the result has dpsInits followed by nonDpsInits.
----------------
MaheshRavishankar wrote:

I am confused now. You dont need that assumption for what is done here right?

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


More information about the Mlir-commits mailing list