Skip to content

Commit eb97422

Browse files
authored
[AMDGPU] Disable DPP with v_mov_b64 on gfx1250 (#148054)
1 parent b415db0 commit eb97422

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

llvm/lib/Target/AMDGPU/VOP1Instructions.td

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,8 @@ class VOP1_DPP16_Gen<bits<8> op, VOP1_DPP_Pseudo ps, GFXGen Gen, VOPProfile p =
892892
VOP1_DPP16 <op, ps, Gen.Subtarget, p> {
893893
let AssemblerPredicate = Gen.AssemblerPredicate;
894894
let DecoderNamespace = Gen.DecoderNamespace;
895+
let OtherPredicates = !listconcat(ps.OtherPredicates,
896+
!if(p.HasExt64BitDPP, [HasDPALU_DPP], []));
895897
}
896898

897899
class VOP1_DPP8<bits<8> op, VOP1_Pseudo ps, VOPProfile p = ps.Pfl> :
@@ -967,7 +969,8 @@ multiclass VOP1_Real_dpp_with_name<GFXGen Gen, bits<9> op, string opName,
967969

968970
multiclass VOP1_Real_dpp8<GFXGen Gen, bits<9> op, string opName = NAME> {
969971
defvar ps = !cast<VOP1_Pseudo>(opName#"_e32");
970-
def _dpp8#Gen.Suffix : VOP1_DPP8_Gen<op{7-0}, ps, Gen>;
972+
if !not(ps.Pfl.HasExt64BitDPP) then
973+
def _dpp8#Gen.Suffix : VOP1_DPP8_Gen<op{7-0}, ps, Gen>;
971974
}
972975

973976
multiclass VOP1_Real_dpp8_with_name<GFXGen Gen, bits<9> op, string opName,
@@ -976,7 +979,8 @@ multiclass VOP1_Real_dpp8_with_name<GFXGen Gen, bits<9> op, string opName,
976979
let AsmString = asmName # ps.Pfl.AsmDPP8,
977980
DecoderNamespace = Gen.DecoderNamespace #
978981
!if(ps.Pfl.IsRealTrue16, "", "_FAKE16") in {
979-
defm NAME : VOP1_Real_dpp8<Gen, op, opName>;
982+
if !not(ps.Pfl.HasExt64BitDPP) then
983+
defm NAME : VOP1_Real_dpp8<Gen, op, opName>;
980984
}
981985
}
982986

llvm/test/MC/AMDGPU/gfx1250_err.s

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
// Check for unique 64-bit literal
44

5+
v_mov_b64 v[4:5], v[2:3] quad_perm:[1,1,1,1]
6+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.
7+
// GFX1250-ERR: v_mov_b64 v[4:5], v[2:3] quad_perm:[1,1,1,1]
8+
// GFX1250-ERR: ^
9+
10+
v_mov_b64 v[4:5], v[2:3] dpp8:[7,6,5,4,3,2,1,0]
11+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.
12+
// GFX1250-ERR: v_mov_b64 v[4:5], v[2:3] dpp8:[7,6,5,4,3,2,1,0]
13+
// GFX1250-ERR: ^
14+
515
s_andn2_b64 s[2:3], 0x10abcdef12345678, 0xabcdef12345678
616
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed
717
// GFX1250-ERR: s_andn2_b64 s[2:3], 0x10abcdef12345678, 0xabcdef12345678

0 commit comments

Comments
 (0)