[llvm] 44f0c91 - [AMDGPU] TableGen syntax cleanups
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 30 03:46:01 PDT 2023
Author: Jay Foad
Date: 2023-03-30T11:45:50+01:00
New Revision: 44f0c9145c947d660b416bdad61874fd9d73bbae
URL: https://github.com/llvm/llvm-project/commit/44f0c9145c947d660b416bdad61874fd9d73bbae
DIFF: https://github.com/llvm/llvm-project/commit/44f0c9145c947d660b416bdad61874fd9d73bbae.diff
LOG: [AMDGPU] TableGen syntax cleanups
Added:
Modified:
llvm/lib/Target/AMDGPU/DSInstructions.td
llvm/lib/Target/AMDGPU/SIInstrInfo.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/DSInstructions.td b/llvm/lib/Target/AMDGPU/DSInstructions.td
index 280d30ee42ee..5f9953256138 100644
--- a/llvm/lib/Target/AMDGPU/DSInstructions.td
+++ b/llvm/lib/Target/AMDGPU/DSInstructions.td
@@ -220,7 +220,7 @@ multiclass DS_1A1D_RET_mc_gfx9 <string opName, RegisterClass rc = VGPR_32,
let has_m0_read = 0 in {
def "" : DS_1A1D_RET<opName, rc>,
AtomicNoRet<!if(!eq(NoRetOp, ""), "", NoRetOp),
- !if(!eq(NoRetOp, ""), 0, 1)>;
+ !ne(NoRetOp, "")>;
}
}
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.td b/llvm/lib/Target/AMDGPU/SIInstrInfo.td
index e0fea7d300ad..8f8849c5f240 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.td
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.td
@@ -2381,14 +2381,6 @@ class getLdStRegisterOperand<RegisterClass RC> {
)))));
}
-class BitOr<bit a, bit b> {
- bit ret = !if(a, 1, !if(b, 1, 0));
-}
-
-class BitAnd<bit a, bit b> {
- bit ret = !if(a, !if(b, 1, 0), 0);
-}
-
class getHasVOP3DPP <ValueType DstVT = i32, ValueType Src0VT = i32,
ValueType Src1VT = i32, ValueType Src2VT = i32> {
bit ret = !if(!eq(DstVT.Size, 64),
@@ -2500,8 +2492,7 @@ class VOPProfile <list<ValueType> _ArgVT, bit _EnableClamp = 0> {
field bit HasExt = getHasExt<NumSrcArgs, DstVT, Src0VT, Src1VT>.ret;
field bit HasExtVOP3DPP = getHasVOP3DPP<DstVT, Src0VT, Src1VT, Src2VT>.ret;
- field bit HasExtDPP = !if(!or(getHasDPP<NumSrcArgs>.ret,
- HasExtVOP3DPP), 1, 0);
+ field bit HasExtDPP = !or(getHasDPP<NumSrcArgs>.ret, HasExtVOP3DPP);
field bit HasExt32BitDPP = getHasExt32BitDPP<NumSrcArgs, DstVT, Src0VT, Src1VT>.ret;
field bit HasExt64BitDPP = getHasExt64BitDPP<NumSrcArgs, DstVT, Src0VT, Src1VT>.ret;
field bit HasExtSDWA = getHasSDWA<NumSrcArgs, DstVT, Src0VT, Src1VT>.ret;
More information about the llvm-commits
mailing list