================ @@ -866,16 +866,41 @@ struct TransferOpConversion : public VectorToSCFPattern<OpTy> { this->setHasBoundedRewriteRecursion(); } + static void getMaskBufferLoadIndices(OpTy xferOp, Value castedMaskBuffer, + SmallVector<Value, 8> &loadIndices, + Value iv) { + assert(xferOp.getMask() && "Expected transfer op to have mask"); + + // Add load indices from the previous iteration. + // The mask buffer depends on the permutation map, which makes determining + // the indices quite complex, so this is why we need to "look back" to the + // previous iteration to find the right indices. + Value maskBuffer = getMaskBuffer(xferOp); + for (OpOperand &use : maskBuffer.getUses()) { + // If there is no previous load op, then the indices are empty. + if (auto loadOp = dyn_cast<memref::LoadOp>(use.getOwner())) { ---------------- joker-eph wrote:
```suggestion for (Operation *user : maskBuffer.getUsers()) { // If there is no previous load op, then the indices are empty. if (auto loadOp = dyn_cast<memref::LoadOp>(user)) { ``` https://github.com/llvm/llvm-project/pull/76292 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits