annotate test/CodeGen/AMDGPU/endpgm-dce.mir @ 128:c347d3398279 default tip

fix
author mir3636
date Wed, 06 Dec 2017 14:37:17 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 # RUN: llc -march=amdgcn -verify-machineinstrs -run-pass si-optimize-exec-masking-pre-ra %s -o - | FileCheck -check-prefix=GCN %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 # GCN-LABEL: name: kill_all
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 # GCN: bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 name: kill_all
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 registers:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 - { id: 0, class: vreg_64 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 - { id: 1, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 - { id: 2, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 - { id: 3, class: sgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 - { id: 4, class: sgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 %0 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 %3 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 %1 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit %exec, implicit %flat_scr :: (load 4)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 %2 = V_ADD_F32_e64 0, killed %1, 0, 1, 0, 0, implicit %exec
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 %4 = S_ADD_U32 %3, 1, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 # GCN-LABEL: name: load_without_memoperand
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 # GCN: %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 # GCN-NEXT: dead %1:vgpr_32 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit %exec, implicit %flat_scr
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 name: load_without_memoperand
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32 registers:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33 - { id: 0, class: vreg_64 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34 - { id: 1, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 - { id: 2, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 - { id: 3, class: sgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37 - { id: 4, class: sgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41 %0 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42 %3 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 %1 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit %exec, implicit %flat_scr
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
45 %2 = V_ADD_F32_e64 0, killed %1, 0, 1, 0, 0, implicit %exec
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
46 %4 = S_ADD_U32 %3, 1, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
47 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
48 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
49 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
50 # GCN-LABEL: name: load_volatile
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
51 # GCN: %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
52 # GCN-NEXT: dead %1:vgpr_32 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit %exec, implicit %flat_scr :: (volatile load 4)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
53 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
54 name: load_volatile
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
55 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
56 registers:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
57 - { id: 0, class: vreg_64 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
58 - { id: 1, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
59 - { id: 2, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
60 - { id: 3, class: sgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
61 - { id: 4, class: sgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
62 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
63 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
64 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
65 %0 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
66 %3 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
67 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
68 %1 = FLAT_LOAD_DWORD %0, 0, 0, 0, implicit %exec, implicit %flat_scr :: (volatile load 4)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
69 %2 = V_ADD_F32_e64 0, killed %1, 0, 1, 0, 0, implicit %exec
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
70 %4 = S_ADD_U32 %3, 1, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
71 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
72 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
73 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
74 # GCN-LABEL: name: store
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
75 # GCN: %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
76 # GCN-NEXT: FLAT_STORE_DWORD %0, %1, 0, 0, 0, implicit %exec, implicit %flat_scr :: (store 4)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
77 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
78 name: store
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
79 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
80 registers:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
81 - { id: 0, class: vreg_64 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
82 - { id: 1, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
83 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
84 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
85 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
86 %0 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
87 %1 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
88 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
89 FLAT_STORE_DWORD %0, %1, 0, 0, 0, implicit %exec, implicit %flat_scr :: (store 4)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
90 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
91 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
92 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
93 # GCN-LABEL: name: barrier
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
94 # GCN: %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
95 # GCN-NEXT: S_BARRIER
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
96 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
97 name: barrier
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
98 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
99 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
100 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
101 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
102 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
103 S_BARRIER
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
104 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
105 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
106 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
107 # GCN-LABEL: name: call
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
108 # GCN: %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
109 # GCN-NEXT: %sgpr4_sgpr5 = S_SWAPPC_B64 %sgpr2_sgpr3
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
110 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
111 name: call
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
112 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
113 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
114 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
115 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
116 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
117 %sgpr4_sgpr5 = S_SWAPPC_B64 %sgpr2_sgpr3
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
118 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
119 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
120 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
121 # GCN-LABEL: name: exp
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
122 # GCN: %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
123 # GCN-NEXT: EXP 32, undef %0:vgpr_32, undef %1:vgpr_32, %2, undef %3:vgpr_32, 0, 0, 15, implicit %exec
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
124 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
125 name: exp
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
126 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
127 registers:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
128 - { id: 0, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
129 - { id: 1, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
130 - { id: 2, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
131 - { id: 3, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
132 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
133 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
134 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
135 %2 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
136 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
137 EXP 32, undef %0, undef %1, killed %2, undef %3, 0, 0, 15, implicit %exec
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
138 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
139 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
140 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
141 # GCN-LABEL: name: return_to_epilog
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
142 # GCN: %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
143 # GCN-NEXT: SI_RETURN_TO_EPILOG killed %vgpr0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
144 name: return_to_epilog
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
145 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
146 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
147 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
148 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
149 %vgpr0 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
150 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
151 SI_RETURN_TO_EPILOG killed %vgpr0
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
152 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
153 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
154 # GCN-LABEL: name: split_block
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
155 # GCN: bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
156 # GCN-NEXT: successors: %bb.1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
157 # GCN-NOT: S_OR_B64
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
158 # GCN: bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
159 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
160 name: split_block
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
161 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
162 registers:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
163 - { id: 0, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
164 - { id: 1, class: vgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
165 - { id: 2, class: sgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
166 - { id: 3, class: sgpr_32 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
167 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
168 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
169 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
170 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
171
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
172 bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
173 %0 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
174 %2 = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
175 %1 = V_ADD_F32_e64 0, killed %0, 0, 1, 0, 0, implicit %exec
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
176 %3 = S_ADD_U32 %2, 1, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
177 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
178 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
179 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
180 # GCN-LABEL: name: split_block_empty_block
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
181 # GCN: bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
182 # GCN-NEXT: successors: %bb.1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
183 # GCN-NOT: S_OR_B64
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
184 # GCN: bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
185 # GCN: bb.2:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
186 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
187 name: split_block_empty_block
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
188 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
189 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
190 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
191 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
192 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
193
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
194 bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
195
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
196 bb.2:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
197 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
198 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
199 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
200 # GCN-LABEL: name: split_block_uncond_branch
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
201 # GCN: bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
202 # GCN-NEXT: successors: %bb.1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
203 # GCN: S_BRANCH %bb.1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
204 # GCN-NOT: S_OR_B64
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
205 # GCN: bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
206 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
207 name: split_block_uncond_branch
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
208 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
209 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
210 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
211 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
212 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
213 S_BRANCH %bb.1
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
214
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
215 bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
216 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
217 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
218 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
219 # GCN-LABEL: name: split_block_cond_branch
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
220 # GCN: bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
221 # GCN-NEXT: successors: %bb.2(0x40000000), %bb.1(0x40000000)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
222 # GCN: %sgpr0_sgpr1 = S_OR_B64 %exec, %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
223 # GCN: S_CBRANCH_VCCNZ %bb.2, implicit undef %vcc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
224 # GCN: bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
225 # GCN: bb.2:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
226 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
227 name: split_block_cond_branch
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
228 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
229 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
230 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
231 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
232 %sgpr0_sgpr1 = S_OR_B64 %exec, %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
233 S_CBRANCH_VCCNZ %bb.2, implicit undef %vcc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
234
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
235 bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
236
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
237 bb.2:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
238 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
239 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
240 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
241 # GCN-LABEL: name: two_preds_both_dead
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
242 # GCN: bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
243 # GCN-NEXT: successors: %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
244 # GCN-NOT: S_OR
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
245 # GCN: S_BRANCH %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
246 # GCN: bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
247 # GCN-NEXT: successors: %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
248 # GCN-NOT: S_AND
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
249 # GCN: S_BRANCH %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
250 # GCN: bb.2:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
251 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
252 name: two_preds_both_dead
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
253 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
254 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
255 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
256 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
257 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
258 S_BRANCH %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
259
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
260 bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
261 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
262 %sgpr0_sgpr1 = S_AND_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
263 S_BRANCH %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
264
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
265 bb.2:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
266 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
267 ...
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
268 ---
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
269 # GCN-LABEL: name: two_preds_one_dead
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
270 # GCN: bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
271 # GCN-NEXT: successors: %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
272 # GCN: %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
273 # GCN-NEXT: S_BARRIER
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
274 # GCN-NEXT: S_BRANCH %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
275 # GCN: bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
276 # GCN-NEXT: successors: %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
277 # GCN-NOT: S_AND
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
278 # GCN: S_BRANCH %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
279 # GCN: bb.2:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
280 # GCN-NEXT: S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
281 name: two_preds_one_dead
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
282 tracksRegLiveness: true
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
283 body: |
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
284 bb.0:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
285 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
286 %sgpr0_sgpr1 = S_OR_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
287 S_BARRIER
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
288 S_BRANCH %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
289
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
290 bb.1:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
291 %vcc = IMPLICIT_DEF
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
292 %sgpr0_sgpr1 = S_AND_B64 %exec, killed %vcc, implicit-def %scc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
293 S_BRANCH %bb.2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
294
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
295 bb.2:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
296 S_ENDPGM
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
297 ...