Skip to content

Commit cc0d227

Browse files
authored
[AMDGPU] Disable s_setkill on gfx1250 (#153471)
1 parent 742bcee commit cc0d227

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

llvm/lib/Target/AMDGPU/SOPInstructions.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,9 @@ def S_WAITCNT_lds_direct : SPseudoInstSI<(outs), (ins)> {
16651665

16661666
def S_SETHALT : SOPP_Pseudo <"s_sethalt" , (ins i32imm:$simm16), "$simm16",
16671667
[(int_amdgcn_s_sethalt timm:$simm16)]>;
1668-
def S_SETKILL : SOPP_Pseudo <"s_setkill" , (ins i16imm:$simm16), "$simm16">;
1668+
def S_SETKILL : SOPP_Pseudo <"s_setkill" , (ins i16imm:$simm16), "$simm16"> {
1669+
let SubtargetPredicate = isNotGFX1250Plus;
1670+
}
16691671

16701672
// On SI the documentation says sleep for approximately 64 * low 2
16711673
// bits, consistent with the reported maximum of 448. On VI the
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1250 -show-encoding %s 2>&1 | FileCheck --check-prefixes=GFX1250-ERR --implicit-check-not=error: -strict-whitespace %s
2+
3+
s_setkill 0
4+
// GFX1250-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

0 commit comments

Comments
 (0)