[Mlir-commits] [mlir] 23f9030 - Reland: [GPUToXeVMPipeline][Pipeline] Modify pipeline to add `convert-vector-to-llvm`. (#169573)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Nov 26 05:00:23 PST 2025


Author: Md Abdullah Shahneous Bari
Date: 2025-11-26T07:00:18-06:00
New Revision: 23f90304507612fde6d4afb79e58dd4283b7be49

URL: https://github.com/llvm/llvm-project/commit/23f90304507612fde6d4afb79e58dd4283b7be49
DIFF: https://github.com/llvm/llvm-project/commit/23f90304507612fde6d4afb79e58dd4283b7be49.diff

LOG: Reland: [GPUToXeVMPipeline][Pipeline] Modify pipeline to add `convert-vector-to-llvm`. (#169573)

`convert-vector-to-llvm` pass applies a set of vector transformation
patterns that are not included in the standard `convert-to-llvm` pass
interface. These additional transformations are required to properly
lower MLIR vector operations. Since not all vector ops have direct
`llvm` dialect lowering, many of them must first be progressively
rewritten into simpler or more canonical vector ops, which are then
lowered to `llvm`. Therefore, running `convert-vector-to-llvm` is
necessary to ensure a complete and correct lowering of vector operations
to the `llvm` dialect.

Original PR: https://github.com/llvm/llvm-project/pull/166204 +
post-commit failure fixes.

Added: 
    

Modified: 
    mlir/lib/Dialect/GPU/Pipelines/GPUToXeVMPipeline.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/GPU/Pipelines/GPUToXeVMPipeline.cpp b/mlir/lib/Dialect/GPU/Pipelines/GPUToXeVMPipeline.cpp
index b097d3a0c9686..38313dc3c01d5 100644
--- a/mlir/lib/Dialect/GPU/Pipelines/GPUToXeVMPipeline.cpp
+++ b/mlir/lib/Dialect/GPU/Pipelines/GPUToXeVMPipeline.cpp
@@ -111,8 +111,11 @@ void buildPostGPUCommonPassPipeline(
     pm.addPass(createGpuToLLVMConversionPass(gpuToLLVMOptions));
   }
   pm.addPass(createLowerAffinePass());
+  pm.addPass(createConvertVectorToLLVMPass());
   pm.addPass(createConvertToLLVMPass());
   pm.addPass(createReconcileUnrealizedCastsPass());
+  pm.addNestedPass<gpu::GPUModuleOp>(createCanonicalizerPass());
+  pm.addNestedPass<gpu::GPUModuleOp>(createCSEPass());
   // gpu-module-to-binary
   {
     GpuModuleToBinaryPassOptions gpuToModuleBinOptions;


        


More information about the Mlir-commits mailing list