[Mlir-commits] [mlir] [mlir][tensor] Fix FoldTensorCastProducerOp for multiple result operations (PR #93374)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jun 5 13:27:20 PDT 2024
================
@@ -4531,17 +4531,17 @@ 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());
+ int64_t dpsInitIdx = 0;
for (OpOperand &opOperand : op->getOpOperands()) {
----------------
MaheshRavishankar wrote:
I think it might be easier to split the `dpsInputOperands` and `dpsInitOperands` into separate loops.
https://github.com/llvm/llvm-project/pull/93374
More information about the Mlir-commits
mailing list