Skip to content

Commit 44f0c91

Browse files
committed
[AMDGPU] TableGen syntax cleanups
1 parent 42ae055 commit 44f0c91

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

llvm/lib/Target/AMDGPU/DSInstructions.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ multiclass DS_1A1D_RET_mc_gfx9 <string opName, RegisterClass rc = VGPR_32,
220220
let has_m0_read = 0 in {
221221
def "" : DS_1A1D_RET<opName, rc>,
222222
AtomicNoRet<!if(!eq(NoRetOp, ""), "", NoRetOp),
223-
!if(!eq(NoRetOp, ""), 0, 1)>;
223+
!ne(NoRetOp, "")>;
224224
}
225225
}
226226

llvm/lib/Target/AMDGPU/SIInstrInfo.td

+1-10
Original file line numberDiff line numberDiff line change
@@ -2381,14 +2381,6 @@ class getLdStRegisterOperand<RegisterClass RC> {
23812381
)))));
23822382
}
23832383

2384-
class BitOr<bit a, bit b> {
2385-
bit ret = !if(a, 1, !if(b, 1, 0));
2386-
}
2387-
2388-
class BitAnd<bit a, bit b> {
2389-
bit ret = !if(a, !if(b, 1, 0), 0);
2390-
}
2391-
23922384
class getHasVOP3DPP <ValueType DstVT = i32, ValueType Src0VT = i32,
23932385
ValueType Src1VT = i32, ValueType Src2VT = i32> {
23942386
bit ret = !if(!eq(DstVT.Size, 64),
@@ -2500,8 +2492,7 @@ class VOPProfile <list<ValueType> _ArgVT, bit _EnableClamp = 0> {
25002492

25012493
field bit HasExt = getHasExt<NumSrcArgs, DstVT, Src0VT, Src1VT>.ret;
25022494
field bit HasExtVOP3DPP = getHasVOP3DPP<DstVT, Src0VT, Src1VT, Src2VT>.ret;
2503-
field bit HasExtDPP = !if(!or(getHasDPP<NumSrcArgs>.ret,
2504-
HasExtVOP3DPP), 1, 0);
2495+
field bit HasExtDPP = !or(getHasDPP<NumSrcArgs>.ret, HasExtVOP3DPP);
25052496
field bit HasExt32BitDPP = getHasExt32BitDPP<NumSrcArgs, DstVT, Src0VT, Src1VT>.ret;
25062497
field bit HasExt64BitDPP = getHasExt64BitDPP<NumSrcArgs, DstVT, Src0VT, Src1VT>.ret;
25072498
field bit HasExtSDWA = getHasSDWA<NumSrcArgs, DstVT, Src0VT, Src1VT>.ret;

0 commit comments

Comments
 (0)