[MLIR][XeGPU] Promote mixed-size vector.shuffle in xegpu-vector-linearize (#217141)

Linearizing an insert of a narrow chunk into a wider tile produces a
`vector.shuffle` whose operands have different lengths:

%0 = vector.insert_strided_slice %chunk, %tile {offsets = [1, 0],
strides = [1]}
     : vector<4xbf16> into vector<8x4xbf16>
  // becomes shuffle(vector<32xbf16>, vector<4xbf16>)

MLIR permits that, but LLVM and SPIR-V shuffles require both operands to
have the
same type, so `convert-vector-to-llvm` falls off its fast path and emits
one
`extractelement` plus one `insertelement` per result element. In a
workgroup-level
mxfp GEMM the linearizer emits ~1000 such shuffles, and scalarizing them
accounts
for roughly 70% of the emitted LLVM IR.

`vector::populateVectorShuffleLoweringPatterns` already promotes the
smaller
operand and remaps the mask, but nothing in the XeVM pipeline ran it.
Run it at the
end of `xegpu-vector-linearize`, the pass that produces these shuffles,
so none
escapes. Doing it at the producer needs no new pass or public API and is
often
free, because the promotion folds into whatever produced the narrow
operand: a
`vector.broadcast` is emitted at the wide type and a splat constant
materialized at
the wide width. Existing expected output changes accordingly; over
`xegpu-vector-linearize.mlir` the mixed-size shuffle count drops from 46
to 0.
GitOrigin-RevId: 01145e3289d08c8c8e42d5dceefa3806b93cdd69
2 files changed
tree: 5bfded9099f83858872408d5bb06b1cf566bc0ba
  1. benchmark/
  2. cmake/
  3. docs/
  4. examples/
  5. include/
  6. lib/
  7. python/
  8. test/
  9. tools/
  10. unittests/
  11. utils/
  12. .clang-format
  13. .clang-tidy
  14. CMakeLists.txt
  15. LICENSE.TXT
  16. Maintainers.md
  17. README.md
README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.