3 ; RUN: llc -verify-machineinstrs=0 -mtriple=amdgcn-amd-amdhsa -debug-pass=Structure -o /dev/null %s 2>&1 | FileCheck -check-prefix=DEFAULT %s
4 ; RUN: llc -verify-machineinstrs=0 -sgpr-regalloc=greedy -vgpr-regalloc=greedy -mtriple=amdgcn-amd-amdhsa -debug-pass=Structure -o /dev/null %s 2>&1 | FileCheck -check-prefix=DEFAULT %s
6 ; RUN: llc -verify-machineinstrs=0 -O0 -mtriple=amdgcn-amd-amdhsa -debug-pass=Structure -o /dev/null %s 2>&1 | FileCheck -check-prefix=O0 %s
8 ; RUN: llc -verify-machineinstrs=0 -vgpr-regalloc=basic -mtriple=amdgcn-amd-amdhsa -debug-pass=Structure -o /dev/null %s 2>&1 | FileCheck -check-prefix=DEFAULT-BASIC %s
9 ; RUN: llc -verify-machineinstrs=0 -sgpr-regalloc=basic -mtriple=amdgcn-amd-amdhsa -debug-pass=Structure -o /dev/null %s 2>&1 | FileCheck -check-prefix=BASIC-DEFAULT %s
10 ; RUN: llc -verify-machineinstrs=0 -sgpr-regalloc=basic -vgpr-regalloc=basic -mtriple=amdgcn-amd-amdhsa -debug-pass=Structure -o /dev/null %s 2>&1 | FileCheck -check-prefix=BASIC-BASIC %s
12 ; RUN: not --crash llc -verify-machineinstrs=0 -regalloc=basic -mtriple=amdgcn-amd-amdhsa -debug-pass=Structure -o /dev/null %s 2>&1 | FileCheck -check-prefix=REGALLOC %s
13 ; RUN: not --crash llc -verify-machineinstrs=0 -regalloc=fast -O0 -mtriple=amdgcn-amd-amdhsa -debug-pass=Structure -o /dev/null %s 2>&1 | FileCheck -check-prefix=REGALLOC %s
16 ; REGALLOC: -regalloc not supported with amdgcn. Use -sgpr-regalloc and -vgpr-regalloc
18 ; DEFAULT: Greedy Register Allocator
19 ; DEFAULT-NEXT: Virtual Register Rewriter
20 ; DEFAULT-NEXT: SI lower SGPR spill instructions
21 ; DEFAULT-NEXT: Virtual Register Map
22 ; DEFAULT-NEXT: Live Register Matrix
23 ; DEFAULT-NEXT: Greedy Register Allocator
24 ; DEFAULT-NEXT: SI Lower WWM Copies
25 ; DEFAULT-NEXT: GCN NSA Reassign
26 ; DEFAULT-NEXT: Virtual Register Rewriter
27 ; DEFAULT-NEXT: Stack Slot Coloring
29 ; O0: Fast Register Allocator
30 ; O0-NEXT: SI lower SGPR spill instructions
31 ; O0-NEXT: Fast Register Allocator
32 ; O0-NEXT: SI Lower WWM Copies
33 ; O0-NEXT: SI Fix VGPR copies
38 ; BASIC-DEFAULT: Debug Variable Analysis
39 ; BASIC-DEFAULT-NEXT: Live Stack Slot Analysis
40 ; BASIC-DEFAULT-NEXT: Machine Natural Loop Construction
41 ; BASIC-DEFAULT-NEXT: Machine Block Frequency Analysis
42 ; BASIC-DEFAULT-NEXT: Virtual Register Map
43 ; BASIC-DEFAULT-NEXT: Live Register Matrix
44 ; BASIC-DEFAULT-NEXT: Basic Register Allocator
45 ; BASIC-DEFAULT-NEXT: Virtual Register Rewriter
46 ; BASIC-DEFAULT-NEXT: SI lower SGPR spill instructions
47 ; BASIC-DEFAULT-NEXT: Virtual Register Map
48 ; BASIC-DEFAULT-NEXT: Live Register Matrix
49 ; BASIC-DEFAULT-NEXT: Bundle Machine CFG Edges
50 ; BASIC-DEFAULT-NEXT: Spill Code Placement Analysis
51 ; BASIC-DEFAULT-NEXT: Lazy Machine Block Frequency Analysis
52 ; BASIC-DEFAULT-NEXT: Machine Optimization Remark Emitter
53 ; BASIC-DEFAULT-NEXT: Greedy Register Allocator
54 ; BASIC-DEFAULT-NEXT: SI Lower WWM Copies
55 ; BASIC-DEFAULT-NEXT: GCN NSA Reassign
56 ; BASIC-DEFAULT-NEXT: Virtual Register Rewriter
57 ; BASIC-DEFAULT-NEXT: Stack Slot Coloring
61 ; DEFAULT-BASIC: Greedy Register Allocator
62 ; DEFAULT-BASIC-NEXT: Virtual Register Rewriter
63 ; DEFAULT-BASIC-NEXT: SI lower SGPR spill instructions
64 ; DEFAULT-BASIC-NEXT: Virtual Register Map
65 ; DEFAULT-BASIC-NEXT: Live Register Matrix
66 ; DEFAULT-BASIC-NEXT: Basic Register Allocator
67 ; DEFAULT-BASIC-NEXT: SI Lower WWM Copies
68 ; DEFAULT-BASIC-NEXT: GCN NSA Reassign
69 ; DEFAULT-BASIC-NEXT: Virtual Register Rewriter
70 ; DEFAULT-BASIC-NEXT: Stack Slot Coloring
74 ; BASIC-BASIC: Debug Variable Analysis
75 ; BASIC-BASIC-NEXT: Live Stack Slot Analysis
76 ; BASIC-BASIC-NEXT: Machine Natural Loop Construction
77 ; BASIC-BASIC-NEXT: Machine Block Frequency Analysis
78 ; BASIC-BASIC-NEXT: Virtual Register Map
79 ; BASIC-BASIC-NEXT: Live Register Matrix
80 ; BASIC-BASIC-NEXT: Basic Register Allocator
81 ; BASIC-BASIC-NEXT: Virtual Register Rewriter
82 ; BASIC-BASIC-NEXT: SI lower SGPR spill instructions
83 ; BASIC-BASIC-NEXT: Virtual Register Map
84 ; BASIC-BASIC-NEXT: Live Register Matrix
85 ; BASIC-BASIC-NEXT: Basic Register Allocator
86 ; BASIC-BASIC-NEXT: SI Lower WWM Copies
87 ; BASIC-BASIC-NEXT: GCN NSA Reassign
88 ; BASIC-BASIC-NEXT: Virtual Register Rewriter
89 ; BASIC-BASIC-NEXT: Stack Slot Coloring
94 ; Something with some CSR SGPR spills
96 call void asm sideeffect "; clobber", "~{s33}"()
101 ; Block live out spills with fast regalloc
102 define amdgpu_kernel void @control_flow(i1 %cond) {
103 %s33 = call i32 asm sideeffect "; clobber", "={s33}"()
104 br i1 %cond, label %bb0, label %bb1
107 call void asm sideeffect "; use %0", "s"(i32 %s33)