[llvm] [mlir] [mlir][AMDGPU] Implement AMDGPU DPP operation in MLIR. (PR #89233)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 04:33:01 PDT 2024
================
@@ -410,6 +410,61 @@ def AMDGPU_RawBufferAtomicUminOp :
let hasVerifier = 1;
}
+def AMDGPU_DPPPerm : I32EnumAttr<"DPPPerm",
+ "The possible permutations for a DPP operation",
+ [
+ I32EnumAttrCase<"quad_perm", 0>,
+ I32EnumAttrCase<"row_shl", 1>,
+ I32EnumAttrCase<"row_shr", 2>,
+ I32EnumAttrCase<"row_ror", 3>,
+ I32EnumAttrCase<"wave_shl", 4>,
+ I32EnumAttrCase<"wave_shr", 5>,
+ I32EnumAttrCase<"wave_ror", 6>,
+ I32EnumAttrCase<"wave_rol", 7>,
+ I32EnumAttrCase<"row_mirror", 8>,
+ I32EnumAttrCase<"row_half_mirror", 9>,
+ I32EnumAttrCase<"row_bcast_15", 10>,
+ I32EnumAttrCase<"row_bcast_31", 11>
+ ]> {
+ let genSpecializedAttr = 0;
+ let cppNamespace = "::mlir::amdgpu";
+}
+
+def AMDGPU_DPPPermAttr : EnumAttr<AMDGPU_Dialect, AMDGPU_DPPPerm,
+ "dpp_perm">;
+
+def AMDGPU_DPPOp : AMDGPU_Op<"dpp", [SameTypeOperands, AllTypesMatch<["result", "src", "old"]>]>,
+ Arguments<(ins AnyType:$src,
+ AnyType:$old,
----------------
arsenm wrote:
This argument order looks swapped from the comment on the intrinsic
https://github.com/llvm/llvm-project/pull/89233
More information about the llvm-commits
mailing list