10
10
// VINTERP encoding
11
11
//===----------------------------------------------------------------------===//
12
12
13
- class VINTERPe_gfx11 <bits<7> op, VOPProfile P> : Enc64 {
13
+ class VINTERPe < VOPProfile P> : Enc64 {
14
14
bits<8> vdst;
15
15
bits<4> src0_modifiers;
16
16
bits<9> src0;
@@ -31,7 +31,6 @@ class VINTERPe_gfx11 <bits<7> op, VOPProfile P> : Enc64 {
31
31
let Inst{13} = !if(P.HasOpSel, src2_modifiers{2}, 0); // op_sel(2)
32
32
let Inst{14} = !if(P.HasOpSel, src0_modifiers{3}, 0); // op_sel(3)
33
33
let Inst{15} = clamp;
34
- let Inst{22-16} = op;
35
34
let Inst{40-32} = src0;
36
35
let Inst{49-41} = src1;
37
36
let Inst{58-50} = src2;
@@ -40,6 +39,14 @@ class VINTERPe_gfx11 <bits<7> op, VOPProfile P> : Enc64 {
40
39
let Inst{63} = src2_modifiers{0}; // neg(2)
41
40
}
42
41
42
+ class VINTERPe_gfx11 <bits<7> op, VOPProfile P> : VINTERPe<P> {
43
+ let Inst{22-16} = op;
44
+ }
45
+
46
+ class VINTERPe_gfx12 <bits<7> op, VOPProfile P> : VINTERPe<P> {
47
+ let Inst{20-16} = op{4-0};
48
+ }
49
+
43
50
//===----------------------------------------------------------------------===//
44
51
// VOP3 VINTERP
45
52
//===----------------------------------------------------------------------===//
@@ -171,17 +178,28 @@ defm : VInterpF16Pat<int_amdgcn_interp_inreg_p2_f16,
171
178
// VINTERP Real Instructions
172
179
//===----------------------------------------------------------------------===//
173
180
174
- let AssemblerPredicate = isGFX11Plus, DecoderNamespace = "GFX11" in {
175
- multiclass VINTERP_Real_gfx11 <bits<7> op> {
181
+ multiclass VINTERP_Real_gfx11 <bits<7> op> {
182
+ let AssemblerPredicate = isGFX11Only, DecoderNamespace = "GFX11" in {
176
183
def _gfx11 :
177
184
VINTERP_Real<!cast<VOP3_Pseudo>(NAME), SIEncodingFamily.GFX11>,
178
185
VINTERPe_gfx11<op, !cast<VOP3_Pseudo>(NAME).Pfl>;
179
186
}
180
187
}
181
188
182
- defm V_INTERP_P10_F32_inreg : VINTERP_Real_gfx11<0x000>;
183
- defm V_INTERP_P2_F32_inreg : VINTERP_Real_gfx11<0x001>;
184
- defm V_INTERP_P10_F16_F32_inreg : VINTERP_Real_gfx11<0x002>;
185
- defm V_INTERP_P2_F16_F32_inreg : VINTERP_Real_gfx11<0x003>;
186
- defm V_INTERP_P10_RTZ_F16_F32_inreg : VINTERP_Real_gfx11<0x004>;
187
- defm V_INTERP_P2_RTZ_F16_F32_inreg : VINTERP_Real_gfx11<0x005>;
189
+ multiclass VINTERP_Real_gfx12 <bits<7> op> {
190
+ let AssemblerPredicate = isGFX12Only, DecoderNamespace = "GFX12" in {
191
+ def _gfx12 :
192
+ VINTERP_Real<!cast<VOP3_Pseudo>(NAME), SIEncodingFamily.GFX12>,
193
+ VINTERPe_gfx12<op, !cast<VOP3_Pseudo>(NAME).Pfl>;
194
+ }
195
+ }
196
+
197
+ multiclass VINTERP_Real_gfx11_gfx12 <bits<7> op> :
198
+ VINTERP_Real_gfx11<op>, VINTERP_Real_gfx12<op>;
199
+
200
+ defm V_INTERP_P10_F32_inreg : VINTERP_Real_gfx11_gfx12<0x000>;
201
+ defm V_INTERP_P2_F32_inreg : VINTERP_Real_gfx11_gfx12<0x001>;
202
+ defm V_INTERP_P10_F16_F32_inreg : VINTERP_Real_gfx11_gfx12<0x002>;
203
+ defm V_INTERP_P2_F16_F32_inreg : VINTERP_Real_gfx11_gfx12<0x003>;
204
+ defm V_INTERP_P10_RTZ_F16_F32_inreg : VINTERP_Real_gfx11_gfx12<0x004>;
205
+ defm V_INTERP_P2_RTZ_F16_F32_inreg : VINTERP_Real_gfx11_gfx12<0x005>;
0 commit comments