[Mlir-commits] [mlir] [mlir][linalg] Split GenericPadOpVectorizationPattern into two patterns (PR #111349)

Han-Chung Wang llvmlistbot at llvm.org
Fri Oct 25 16:17:53 PDT 2024


================
@@ -2604,6 +2495,177 @@ struct PadOpVectorizationWithTransferWritePattern
   }
 };
 
+/// Given an ArrayRef of OpFoldResults, return a vector of Values.
+/// IntegerAttrs are converted to ConstantIndexOps. Other attribute types are
+/// not supported.
+static SmallVector<Value> ofrToIndexValues(RewriterBase &rewriter, Location loc,
----------------
hanhanW wrote:

Here is the method (i.e., `getValueOrCreateConstantIndexOp`) that you're looking for. :)

https://github.com/llvm/llvm-project/blob/38caf282ab3dfd69cee213b0d4df2f1672e52b38/mlir/include/mlir/Dialect/Arith/Utils/Utils.h#L68-L72

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


More information about the Mlir-commits mailing list