@@ -1950,6 +1950,20 @@ class getVOP3VRegSrcForVT<ValueType VT> {
19501950 1 : VRegSrc_32);
19511951}
19521952
1953+ // VGPR only VOP3 src with 8 bit encoding e.g. VOP3DPP src0.
1954+ class getVGPRSrcForVT<ValueType VT, bit IsTrue16 = 0, bit IsFake16 = 0> {
1955+ RegisterOperand ret =
1956+ !cond(!eq(VT.Size, 128) : VGPROp_128,
1957+ !eq(VT.Size, 96) : VGPROp_96,
1958+ !eq(VT.Size, 64) : VGPROp_64,
1959+ !eq(VT.Size, 48) : VGPROp_64,
1960+ !eq(VT.Size, 16) : !if(IsTrue16,
1961+ !if(IsFake16, VGPROp_32,
1962+ VGPROp_16),
1963+ VGPROp_32),
1964+ 1 : VGPROp_32);
1965+ }
1966+
19531967// Src2 of VOP3 DPP instructions cannot be a literal
19541968class getVOP3DPPSrcForVT<ValueType VT, bit IsFake16 = 1> {
19551969 RegisterOperand ret =
@@ -2681,7 +2695,7 @@ class VOPProfile <list<ValueType> _ArgVT, bit _EnableClamp = 0> {
26812695 field RegisterOperand Src0DPP = getVregSrcForVT<Src0VT>.ret;
26822696 field RegisterOperand Src1DPP = getVregSrcForVT<Src1VT>.ret;
26832697 field RegisterOperand Src2DPP = getVregSrcForVT<Src2VT>.ret;
2684- field RegisterOperand Src0VOP3DPP = VGPROp_32 ;
2698+ field RegisterOperand Src0VOP3DPP = getVGPRSrcForVT<Src0VT>.ret ;
26852699 field RegisterOperand Src1VOP3DPP = getVOP3DPPSrcForVT<Src1VT>.ret;
26862700 field RegisterOperand Src2VOP3DPP = getVOP3DPPSrcForVT<Src2VT>.ret;
26872701 field RegisterOperand Src0SDWA = getSDWASrcForVT<Src0VT>.ret;
0 commit comments