diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp index d299285a1f2d..4310da3073e6 100644 --- a/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp +++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp @@ -646,6 +646,9 @@ void addCPUDataTilingPipeline(OpPassManager &passManager, addBufferizePasses(nestedModulePM); { + // Fold unit dims before vector lowering. + nestedModulePM.addNestedPass( + createOptimizeVectorTransferPass(/*flatten=*/false)); LLVMCPUVectorLoweringPassOptions options; options.splitVectorTransfersTo = "linalg-copy"; nestedModulePM.addNestedPass(