[Mlir-commits] [mlir] [MLIR][Vector] Add Lowering for vector.step (PR #113655)

Manupa Karunaratne llvmlistbot at llvm.org
Fri Nov 1 09:27:14 PDT 2024


================
@@ -1886,6 +1886,7 @@ void mlir::populateVectorToLLVMConversionPatterns(
   MLIRContext *ctx = converter.getDialect()->getContext();
   patterns.add<VectorFMAOpNDRewritePattern>(ctx);
   populateVectorInsertExtractStridedSliceTransforms(patterns);
+  populateVectorStepLoweringPatterns(patterns);
----------------
manupak wrote:

>  the whole point of this PR is not to run this pattern auto-magically as part of some larger pipeline.

No, the whole point of the PR is *defer* the materialization of the constants until later.... where the later is when we go to LLVM.

> Strictly speaking, this is lowering "Vector -> Arith" and not "Vector -> LLVM". What happens if you don't include this here?

I need to include it some where in VectorToLLVM pass, so what do you mean by "here" ? I can move the pattern anywhere within the pass -- which is the question Im asking here where would people ideally like it to be..

Moreover, Arith is legal dialect for this pass. See here : https://github.com/llvm/llvm-project/blob/ea33af63def2aff8a8ca13331dd99ac9541b2ce9/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp#L94-L97

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


More information about the Mlir-commits mailing list