[llvm] [AMDGPU][MC] Allow null where 128b or larger dst reg is expected (PR #115200)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 02:04:34 PST 2024
================
@@ -910,22 +916,31 @@ multiclass SRegClass<int numRegs,
let isAllocatable = 0;
let BaseClassOrder = !mul(numRegs, 32);
}
+
+ if hasNull then {
+ def SReg_ # suffix :
+ SIRegisterClass<"AMDGPU", regTypes, 32,
+ !dag(add, [!cast<RegisterClass>("SReg_" # suffix # "_XNULL"), !cast<Register>("SGPR_NULL" # suffix)], ["", ""])> {
----------------
jayfoad wrote:
OK but I don't see why you need to use `!dag`. You can write it literally as `(add !cast<RegisterClass>("SReg_" # suffix # "_XNULL"), !cast<Register>("SGPR_NULL" # suffix))`.
https://github.com/llvm/llvm-project/pull/115200
More information about the llvm-commits
mailing list