[Mlir-commits] [mlir] [mlir][xegpu] Lower lane_data repack convert_layout to bitcast_shuffle (PR #210837)
Artem Kroviakov
llvmlistbot at llvm.org
Wed Jul 29 07:44:43 PDT 2026
================
@@ -1491,6 +1491,72 @@ def XeGPU_TruncfOp
let hasVerifier = 1;
}
+def XeGPU_BitcastShuffleOp
+ : XeGPU_Op<"bitcast_shuffle", [Pure]> {
+ let summary = "Bit-preserving type conversion and re-distribution of a "
+ "subgroup's fragments across its lanes.";
+
+ let description = [{
+ `xegpu.bitcast_shuffle` is a lane-level operation. The `source` operand is
+ the fragment (a scalar or 1D vector) held by one lane, and the `result` is
+ the fragment that lane holds afterwards. It reinterprets the fragments as a
+ different element type, possibly with a different number of elements per
+ lane, and at the same time re-distributes the data across the lanes of the
+ subgroup.
+
+ Both `source` and `result` must be a scalar or a 1D vector of numerical
+ type, and they must have a different type. When they have the same number of
+ elements the operation degenerates into a plain bitcast. Otherwise the total
----------------
akroviakov wrote:
> When they have the same number of elements the operation degenerates into a plain bitcast
Why can the op not similarly degenerate into a shuffle for the same type?
https://github.com/llvm/llvm-project/pull/210837
More information about the Mlir-commits
mailing list