[Mlir-commits] [mlir] [MLIR][Conversion] Vector to LLVM: Remove unneeded vector shuffle (PR #162946)
Sang Ik Lee
llvmlistbot at llvm.org
Wed Oct 15 10:10:47 PDT 2025
silee2 wrote:
> Blocking to get a better reasoning for the PR, happy to unblock after agreeing on a reasoning (not a strong block, just want to make sure we discuss before landing). Currently, I think either we should implement this as a canonicalization for llvm.shufflevector or check if llvm already cleans this up.
The reason for this PR is to better support source materialization cast required in the following case.
XeVM dialect type system does not allow single element vector.
Meanwhile in XeGPU dialect, single element vector is legal.
To bridge this gap, XeGPU to XeVM conversion adds
- target materialization cast to convert single element vector to scalar
- source materialization cast to convert scalar to single element vector #162947
And found that a redundant shufflevector is generated for this case while working on #162947
Updated implementation and added canonicalization for llvm.shufflevector.
https://github.com/llvm/llvm-project/pull/162946
More information about the Mlir-commits
mailing list