[Mlir-commits] [mlir] [MLIR][XeVM] Remove xevm to llvm from convert to llvm (PR #175672)
Sang Ik Lee
llvmlistbot at llvm.org
Fri Jan 23 09:11:51 PST 2026
================
@@ -858,6 +858,99 @@ class SubgroupOpWorkitemOpToOCLPattern : public OpConversionPattern<OpType> {
}
};
+static bool isExtractingContiguousSlice(LLVM::ShuffleVectorOp op) {
+ if (op.getV1() != op.getV2())
+ return false;
+ auto maskAttr = op.getMask();
+ int64_t firstIndex = maskAttr[0];
+ for (int64_t i = 1; i < static_cast<int64_t>(maskAttr.size()); ++i) {
+ int64_t index = maskAttr[i];
+ if (index != firstIndex + i)
+ return false;
+ }
+ return true;
+}
+
+// Input vector of a shuffle vector op extracting a contiguous slice is an
+// illegal vector in SPIRV kernel if the vector size is > 16 elements.
+// To legalize this case, keep applying the following transformations until no
+// more match:
+// 1. keep hoisting the shuffle vector op past unary element-wise operations
+// start with fpext, fptrunc and bitcast for now.
+// 2. merge with another shuffle vector op
+// 3. merge with load as a smaller load
+class HandleVectorExtractPattern
----------------
silee2 wrote:
Forgot to push test case. Pushed test case now.
https://github.com/llvm/llvm-project/pull/175672
More information about the Mlir-commits
mailing list