Skip to content

Commit f113cab

Browse files
authored
[AMDGPU] Cleanup bytesel variables. NFC. (#140131)
Somehow we ended up with 2 sets of td variables: Is...ByteSel and Has...ByteSel. Keep only Has... form.
1 parent 8e53e3b commit f113cab

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

llvm/lib/Target/AMDGPU/SIInstrInfo.td

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,11 +2539,10 @@ class VOPProfile <list<ValueType> _ArgVT, bit _EnableClamp = 0> {
25392539
field bit IsWMMA = 0;
25402540
field bit IsSWMMAC = 0;
25412541

2542-
field bit IsFP8SrcByteSel = 0;
2543-
field bit IsFP8DstByteSel = 0;
2542+
field bit HasFP8SrcByteSel = 0;
25442543
field bit HasFP8DstByteSel = 0;
25452544
field bit HasFP4DstByteSel = 0;
2546-
field bit IsFP8ByteSel = !or(IsFP8SrcByteSel, IsFP8DstByteSel);
2545+
field bit HasFP8ByteSel = !or(HasFP8SrcByteSel, HasFP8DstByteSel);
25472546

25482547
field bit HasDst = !ne(DstVT.Value, untyped.Value);
25492548
field bit HasDst32 = HasDst;
@@ -2660,7 +2659,7 @@ class VOPProfile <list<ValueType> _ArgVT, bit _EnableClamp = 0> {
26602659
field string AsmDPP8 = getAsmDPP8<HasDst, NumSrcArgs, 0 /*HasModifiers*/, DstVT>.ret;
26612660
field string AsmVOP3Base = getAsmVOP3Base<NumSrcArgs, HasDst, HasClamp,
26622661
HasOpSel, HasOMod, IsVOP3P, HasNeg, HasModifiers, HasModifiers,
2663-
HasModifiers, DstVT, IsFP8ByteSel>.ret;
2662+
HasModifiers, DstVT, HasFP8ByteSel>.ret;
26642663
field string Asm64 = AsmVOP3Base;
26652664
field string AsmVOP3P = getAsmVOP3P<HasDst, NumSrcArgs, HasNeg, HasClamp, HasOpSel>.ret;
26662665
field string AsmVOP3OpSel = getAsmVOP3OpSel<NumSrcArgs,

llvm/lib/Target/AMDGPU/VOP1Instructions.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ let HasClamp = 0, HasOMod = 0, HasExtDPP = 0, HasExtVOP3DPP = 0,
666666
}
667667

668668
class VOPProfile_Base_CVT_F_F8_ByteSel<ValueType DstVT> : VOPProfile<[DstVT, i32, untyped, untyped]> {
669-
let IsFP8SrcByteSel = 1;
669+
let HasFP8SrcByteSel = 1;
670670
let HasOpSel = 0;
671671
let HasExtDPP = 1;
672672
let HasExtVOP3DPP = 1;

llvm/lib/Target/AMDGPU/VOP3Instructions.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,6 @@ def VOP3_CVT_SR_F8_F32_Profile : VOP3_Profile<VOPProfile<[i32, f32, i32, f32]>,
605605

606606
class VOP3_CVT_SR_F8_ByteSel_Profile<ValueType SrcVT> :
607607
VOP3_Profile<VOPProfile<[i32, SrcVT, i32, untyped]>> {
608-
let IsFP8DstByteSel = 1;
609608
let HasFP8DstByteSel = 1;
610609
let HasClamp = 0;
611610
defvar bytesel = (ins VGPR_32:$vdst_in, ByteSel:$byte_sel);

llvm/lib/Target/AMDGPU/VOPInstructions.td

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -869,13 +869,13 @@ class VOP3_DPPe_Common_Base<bits<10> op, VOPProfile P> : Enc96 {
869869
let Inst{10} = !if(P.HasSrc2Mods, src2_modifiers{1}, 0);
870870
// 16-bit select fields which can be interpreted as OpSel or hi/lo suffix
871871
let Inst{11} = !if(P.HasOpSel, !if(P.HasSrc0Mods, src0_modifiers{2}, 0),
872-
!if(P.IsFP8SrcByteSel, byte_sel{1}, ?));
872+
!if(P.HasFP8SrcByteSel, byte_sel{1}, ?));
873873
let Inst{12} = !if(P.HasOpSel, !if(P.HasSrc1Mods, src1_modifiers{2}, 0),
874-
!if(P.IsFP8SrcByteSel, byte_sel{0}, ?));
874+
!if(P.HasFP8SrcByteSel, byte_sel{0}, ?));
875875
let Inst{13} = !if(P.HasOpSel, !if(P.HasSrc2Mods, src2_modifiers{2}, 0),
876-
!if(P.IsFP8DstByteSel, byte_sel{0}, ?));
876+
!if(P.HasFP8DstByteSel, byte_sel{0}, ?));
877877
let Inst{14} = !if(P.HasOpSel, !if(P.HasSrc0Mods, src0_modifiers{3}, 0),
878-
!if(P.IsFP8DstByteSel, byte_sel{1}, ?));
878+
!if(P.HasFP8DstByteSel, byte_sel{1}, ?));
879879
let Inst{15} = !if(P.HasClamp, clamp, 0);
880880
let Inst{25-16} = op;
881881
let Inst{31-26} = 0x35;
@@ -1695,11 +1695,11 @@ multiclass VOP3_Real_Base<GFXGen Gen, bits<10> op, string opName = NAME,
16951695
bit isSingle = 0> {
16961696
defvar ps = !cast<VOP_Pseudo>(opName#"_e64");
16971697
let IsSingle = !or(isSingle, ps.Pfl.IsSingle) in {
1698-
if ps.Pfl.IsFP8SrcByteSel then {
1698+
if ps.Pfl.HasFP8SrcByteSel then {
16991699
def _e64#Gen.Suffix :
17001700
VOP3_Real_Gen<ps, Gen>,
17011701
VOP3FP8OpSel_src_bytesel_gfx11_gfx12<op, ps.Pfl>;
1702-
} else if ps.Pfl.IsFP8DstByteSel then {
1702+
} else if ps.Pfl.HasFP8DstByteSel then {
17031703
def _e64#Gen.Suffix :
17041704
VOP3_Real_Gen<ps, Gen>,
17051705
VOP3FP8OpSel_dst_bytesel_gfx11_gfx12<op, ps.Pfl>;
@@ -1733,11 +1733,11 @@ multiclass VOP3_Real_with_name<GFXGen Gen, bits<10> op, string opName,
17331733
let AsmString = asmName # ps.AsmOperands,
17341734
IsSingle = !or(isSingle, ps.Pfl.IsSingle) in {
17351735
// FIXME-TRUE16 support FP8 instructions properly
1736-
if ps.Pfl.IsFP8SrcByteSel then {
1736+
if ps.Pfl.HasFP8SrcByteSel then {
17371737
def _e64#Gen.Suffix :
17381738
VOP3_Real_Gen<ps, Gen>,
17391739
VOP3FP8OpSel_src_bytesel_gfx11_gfx12<op, ps.Pfl>;
1740-
} else if ps.Pfl.IsFP8DstByteSel then {
1740+
} else if ps.Pfl.HasFP8DstByteSel then {
17411741
def _e64#Gen.Suffix :
17421742
VOP3_Real_Gen<ps, Gen>,
17431743
VOP3FP8OpSel_dst_bytesel_gfx11_gfx12<op, ps.Pfl>;

0 commit comments

Comments
 (0)