[Mlir-commits] [mlir] [mlir][vector] Support complete folding in single pass for vector.insert/vector.extract (PR #142124)
Diego Caballero
llvmlistbot at llvm.org
Fri May 30 10:35:10 PDT 2025
================
@@ -2148,8 +2149,8 @@ OpFoldResult ExtractOp::fold(FoldAdaptor adaptor) {
// Fold `arith.constant` indices into the `vector.extract` operation. Make
// sure that patterns requiring constant indices are added after this fold.
SmallVector<Value> operands = {getVector()};
- if (auto val = extractInsertFoldConstantOp(*this, adaptor, operands))
- return val;
+ auto inplaceFolded = extractInsertFoldConstantOp(*this, adaptor, operands);
----------------
dcaballe wrote:
I would extend the existing comment to clarify that we don't stop the folding here because this folder may enable the application of subsequent patterns...
https://github.com/llvm/llvm-project/pull/142124
More information about the Mlir-commits
mailing list