[Mlir-commits] [mlir] [mlir][spirv] Add instruction OpGroupNonUniformRotateKHR (PR #133428)

Hsiangkai Wang llvmlistbot at llvm.org
Thu Apr 3 02:23:58 PDT 2025


================
@@ -304,6 +304,29 @@ LogicalResult GroupNonUniformLogicalXorOp::verify() {
   return verifyGroupNonUniformArithmeticOp<GroupNonUniformLogicalXorOp>(*this);
 }
 
+//===----------------------------------------------------------------------===//
+// spirv.GroupNonUniformRotateKHR
+//===----------------------------------------------------------------------===//
+
+LogicalResult GroupNonUniformRotateKHROp::verify() {
+  spirv::Scope scope = getExecutionScope();
+  if (scope != spirv::Scope::Workgroup && scope != spirv::Scope::Subgroup)
+    return emitOpError("execution scope must be 'Workgroup' or 'Subgroup'");
+
+  if (TypedValue<Type> clusterSizeVal = getClusterSize()) {
----------------
Hsiangkai wrote:

Thanks for your review. I have updated it. I will merge this patch after all tests pass.

https://github.com/llvm/llvm-project/pull/133428


More information about the Mlir-commits mailing list