File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
mlir/lib/Dialect/Vector/IR Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2146,8 +2146,9 @@ OpFoldResult ExtractOp::fold(FoldAdaptor adaptor) {
21462146 return getVector ();
21472147 if (auto res = foldPoisonSrcExtractOp (adaptor.getVector ()))
21482148 return res;
2149- // Fold `arith.constant` indices into the `vector.extract` operation. Make
2150- // sure that patterns requiring constant indices are added after this fold.
2149+ // Fold `arith.constant` indices into the `vector.extract` operation.
2150+ // Do not stop here as this fold may enable subsequent folds that require
2151+ // constant indices.
21512152 SmallVector<Value> operands = {getVector ()};
21522153 auto inplaceFolded = extractInsertFoldConstantOp (*this , adaptor, operands);
21532154
@@ -3149,8 +3150,9 @@ OpFoldResult vector::InsertOp::fold(FoldAdaptor adaptor) {
31493150 // (type mismatch).
31503151 if (getNumIndices () == 0 && getValueToStoreType () == getType ())
31513152 return getValueToStore ();
3152- // Fold `arith.constant` indices into the `vector.insert` operation. Make
3153- // sure that patterns requiring constant indices are added after this fold.
3153+ // Fold `arith.constant` indices into the `vector.insert` operation.
3154+ // Do not stop here as this fold may enable subsequent folds that require
3155+ // constant indices.
31543156 SmallVector<Value> operands = {getValueToStore (), getDest ()};
31553157 auto inplaceFolded = extractInsertFoldConstantOp (*this , adaptor, operands);
31563158
You can’t perform that action at this time.
0 commit comments