@@ -1950,6 +1950,20 @@ class getVOP3VRegSrcForVT<ValueType VT> {
1950
1950
1 : VRegSrc_32);
1951
1951
}
1952
1952
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
+
1953
1967
// Src2 of VOP3 DPP instructions cannot be a literal
1954
1968
class getVOP3DPPSrcForVT<ValueType VT, bit IsFake16 = 1> {
1955
1969
RegisterOperand ret =
@@ -2681,7 +2695,7 @@ class VOPProfile <list<ValueType> _ArgVT, bit _EnableClamp = 0> {
2681
2695
field RegisterOperand Src0DPP = getVregSrcForVT<Src0VT>.ret;
2682
2696
field RegisterOperand Src1DPP = getVregSrcForVT<Src1VT>.ret;
2683
2697
field RegisterOperand Src2DPP = getVregSrcForVT<Src2VT>.ret;
2684
- field RegisterOperand Src0VOP3DPP = VGPROp_32 ;
2698
+ field RegisterOperand Src0VOP3DPP = getVGPRSrcForVT<Src0VT>.ret ;
2685
2699
field RegisterOperand Src1VOP3DPP = getVOP3DPPSrcForVT<Src1VT>.ret;
2686
2700
field RegisterOperand Src2VOP3DPP = getVOP3DPPSrcForVT<Src2VT>.ret;
2687
2701
field RegisterOperand Src0SDWA = getSDWASrcForVT<Src0VT>.ret;
0 commit comments