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

Igor Wodiany llvmlistbot at llvm.org
Wed Apr 2 03:52:07 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()) {
----------------
IgWod-IMG wrote:

It was suggested to me before to use `Value` instead of `TypedValue<Type>` in the situation like this: https://github.com/llvm/llvm-project/pull/126555#discussion_r1950950471 For what's worth I cannot see `TypedValue<Type>` being used anywhere in the dialect code.

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


More information about the Mlir-commits mailing list