1 ; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck %s
3 ; This tests for a bug that caused a crash in SIRegisterInfo::spillSGPR()
4 ; which was due to incorrect book-keeping of removed dead frame indices.
6 ; CHECK-LABEL: {{^}}kernel0:
7 define amdgpu_kernel void @kernel0(ptr addrspace(1) %out, i32 %in) #1 {
8 call void asm sideeffect "", "~{v[0:7]}" () #0
9 call void asm sideeffect "", "~{v[8:15]}" () #0
10 call void asm sideeffect "", "~{v[16:19]}"() #0
11 call void asm sideeffect "", "~{v[20:21]}"() #0
12 call void asm sideeffect "", "~{v22}"() #0
13 %val0 = call <2 x i32> asm sideeffect "; def $0", "=s" () #0
14 %val1 = call <4 x i32> asm sideeffect "; def $0", "=s" () #0
15 %val2 = call <8 x i32> asm sideeffect "; def $0", "=s" () #0
16 %val3 = call <16 x i32> asm sideeffect "; def $0", "=s" () #0
17 %val4 = call <2 x i32> asm sideeffect "; def $0", "=s" () #0
18 %val5 = call <4 x i32> asm sideeffect "; def $0", "=s" () #0
19 %val6 = call <8 x i32> asm sideeffect "; def $0", "=s" () #0
20 %val7 = call <16 x i32> asm sideeffect "; def $0", "=s" () #0
21 %val8 = call <2 x i32> asm sideeffect "; def $0", "=s" () #0
22 %val9 = call <4 x i32> asm sideeffect "; def $0", "=s" () #0
23 %val10 = call <8 x i32> asm sideeffect "; def $0", "=s" () #0
24 %val11 = call <16 x i32> asm sideeffect "; def $0", "=s" () #0
25 %val12 = call <2 x i32> asm sideeffect "; def $0", "=s" () #0
26 %val13 = call <4 x i32> asm sideeffect "; def $0", "=s" () #0
27 %val14 = call <8 x i32> asm sideeffect "; def $0", "=s" () #0
28 %val15 = call <16 x i32> asm sideeffect "; def $0", "=s" () #0
29 %val16 = call <2 x i32> asm sideeffect "; def $0", "=s" () #0
30 %val17 = call <4 x i32> asm sideeffect "; def $0", "=s" () #0
31 %val18 = call <8 x i32> asm sideeffect "; def $0", "=s" () #0
32 %val19 = call <16 x i32> asm sideeffect "; def $0", "=s" () #0
33 call void asm sideeffect "; use $0", "s"(<2 x i32> %val0) #0
34 call void asm sideeffect "; use $0", "s"(<4 x i32> %val1) #0
35 call void asm sideeffect "; use $0", "s"(<8 x i32> %val2) #0
36 call void asm sideeffect "; use $0", "s"(<16 x i32> %val3) #0
37 call void asm sideeffect "; use $0", "s"(<2 x i32> %val4) #0
38 call void asm sideeffect "; use $0", "s"(<4 x i32> %val5) #0
39 call void asm sideeffect "; use $0", "s"(<8 x i32> %val6) #0
40 call void asm sideeffect "; use $0", "s"(<16 x i32> %val7) #0
41 call void asm sideeffect "; use $0", "s"(<2 x i32> %val8) #0
42 call void asm sideeffect "; use $0", "s"(<4 x i32> %val9) #0
43 call void asm sideeffect "; use $0", "s"(<8 x i32> %val10) #0
44 call void asm sideeffect "; use $0", "s"(<16 x i32> %val11) #0
45 call void asm sideeffect "; use $0", "s"(<2 x i32> %val12) #0
46 call void asm sideeffect "; use $0", "s"(<4 x i32> %val13) #0
47 call void asm sideeffect "; use $0", "s"(<8 x i32> %val14) #0
48 call void asm sideeffect "; use $0", "s"(<16 x i32> %val15) #0
49 call void asm sideeffect "; use $0", "s"(<2 x i32> %val16) #0
50 call void asm sideeffect "; use $0", "s"(<4 x i32> %val17) #0
51 call void asm sideeffect "; use $0", "s"(<8 x i32> %val18) #0
52 call void asm sideeffect "; use $0", "s"(<16 x i32> %val19) #0
56 attributes #0 = { nounwind }
57 attributes #1 = { nounwind "amdgpu-waves-per-eu"="10,10" }