1# RUN: llc -march=amdgcn -mcpu=gfx902 -verify-machineinstrs -run-pass=phi-node-elimination,si-form-memory-clauses %s -o - | FileCheck -check-prefix=GCN %s 2 3# GCN-LABEL: {{^}}name: vector_clause{{$}} 4# GCN: early-clobber %2:vreg_128, early-clobber %4:vreg_128, early-clobber %1:vreg_128, early-clobber %3:vreg_128 = BUNDLE %0, implicit $exec { 5# GCN-NEXT: %1:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 0, 0, 0, 0, implicit $exec 6# GCN-NEXT: %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 16, 0, 0, 0, implicit $exec 7# GCN-NEXT: %3:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 32, 0, 0, 0, implicit $exec 8# GCN-NEXT: %4:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 48, 0, 0, 0, implicit $exec 9# GCN-NEXT: } 10# GCN-NEXT: GLOBAL_STORE_DWORDX4 %0, %1, 0, 0, 0, 0, implicit $exec 11 12--- 13name: vector_clause 14tracksRegLiveness: true 15registers: 16 - { id: 0, class: vreg_64 } 17 - { id: 1, class: vreg_128 } 18 - { id: 2, class: vreg_128 } 19 - { id: 3, class: vreg_128 } 20 - { id: 4, class: vreg_128 } 21body: | 22 bb.0: 23 %0 = IMPLICIT_DEF 24 %1:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 0, 0, 0, 0, implicit $exec 25 %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 16, 0, 0, 0, implicit $exec 26 %3:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 32, 0, 0, 0, implicit $exec 27 %4:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 48, 0, 0, 0, implicit $exec 28 GLOBAL_STORE_DWORDX4 %0, %1, 0, 0, 0, 0, implicit $exec 29 GLOBAL_STORE_DWORDX4 %0, %2, 16, 0, 0, 0, implicit $exec 30 GLOBAL_STORE_DWORDX4 %0, %3, 32, 0, 0, 0, implicit $exec 31 GLOBAL_STORE_DWORDX4 %0, %4, 48, 0, 0, 0, implicit $exec 32... 33 34# GCN-LABEL: {{^}}name: subreg_full{{$}} 35# GCN: early-clobber %1:vreg_128 = BUNDLE %0, implicit $exec { 36# GCN-NEXT: undef %1.sub0:vreg_128 = GLOBAL_LOAD_DWORD %0.sub0_sub1, 0, 0, 0, 0, implicit $exec 37# GCN-NEXT: internal %1.sub1:vreg_128 = GLOBAL_LOAD_DWORD %0.sub1_sub2, 16, 0, 0, 0, implicit $exec 38# GCN-NEXT: internal %1.sub2:vreg_128 = GLOBAL_LOAD_DWORD %0.sub2_sub3, 32, 0, 0, 0, implicit $exec 39# GCN-NEXT: internal %1.sub3:vreg_128 = GLOBAL_LOAD_DWORD %0.sub2_sub3, 32, 0, 0, 0, implicit $exec 40# GCN-NEXT: } 41# GCN-NEXT: GLOBAL_STORE_DWORDX4 %0.sub0_sub1, %1, 0, 0, 0, 0, implicit $exec 42 43--- 44name: subreg_full 45tracksRegLiveness: true 46registers: 47 - { id: 0, class: vreg_128 } 48 - { id: 1, class: vreg_128 } 49body: | 50 bb.0: 51 %0 = IMPLICIT_DEF 52 undef %1.sub0:vreg_128 = GLOBAL_LOAD_DWORD %0.sub0_sub1, 0, 0, 0, 0, implicit $exec 53 %1.sub1:vreg_128 = GLOBAL_LOAD_DWORD %0.sub1_sub2, 16, 0, 0, 0, implicit $exec 54 %1.sub2:vreg_128 = GLOBAL_LOAD_DWORD %0.sub2_sub3, 32, 0, 0, 0, implicit $exec 55 %1.sub3:vreg_128 = GLOBAL_LOAD_DWORD %0.sub2_sub3, 32, 0, 0, 0, implicit $exec 56 GLOBAL_STORE_DWORDX4 %0.sub0_sub1, %1, 0, 0, 0, 0, implicit $exec 57... 58 59# GCN-LABEL: {{^}}name: subreg_part{{$}} 60# GCN: undef early-clobber %1.sub0_sub1:vreg_128, undef early-clobber %1.sub3:vreg_128 = BUNDLE %0, implicit $exec { 61# GCN-NEXT: undef %1.sub0:vreg_128 = GLOBAL_LOAD_DWORD %0.sub0_sub1, 0, 0, 0, 0, implicit $exec 62# GCN-NEXT: internal %1.sub1:vreg_128 = GLOBAL_LOAD_DWORD %0.sub1_sub2, 16, 0, 0, 0, implicit $exec 63# GCN-NEXT: internal %1.sub3:vreg_128 = GLOBAL_LOAD_DWORD %0.sub2_sub3, 32, 0, 0, 0, implicit $exec 64# GCN-NEXT: } 65# GCN-NEXT: GLOBAL_STORE_DWORDX4 %0.sub0_sub1, %1, 0, 0, 0, 0, implicit $exec 66 67--- 68name: subreg_part 69tracksRegLiveness: true 70registers: 71 - { id: 0, class: vreg_128 } 72 - { id: 1, class: vreg_128 } 73body: | 74 bb.0: 75 %0 = IMPLICIT_DEF 76 undef %1.sub0:vreg_128 = GLOBAL_LOAD_DWORD %0.sub0_sub1, 0, 0, 0, 0, implicit $exec 77 %1.sub1:vreg_128 = GLOBAL_LOAD_DWORD %0.sub1_sub2, 16, 0, 0, 0, implicit $exec 78 %1.sub3:vreg_128 = GLOBAL_LOAD_DWORD %0.sub2_sub3, 32, 0, 0, 0, implicit $exec 79 GLOBAL_STORE_DWORDX4 %0.sub0_sub1, %1, 0, 0, 0, 0, implicit $exec 80... 81 82# GCN-LABEL: {{^}}name: dead{{$}} 83# GCN: dead early-clobber %2:vreg_128, dead early-clobber %4:vreg_128, dead early-clobber %1:vreg_128, dead early-clobber %3:vreg_128 = BUNDLE %0, implicit $exec { 84# GCN-NEXT: dead %1:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 0, 0, 0, 0, implicit $exec 85# GCN-NEXT: %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 16, 0, 0, 0, implicit $exec 86# GCN-NEXT: dead %3:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 32, 0, 0, 0, implicit $exec 87# GCN-NEXT: dead %4:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 48, 0, 0, 0, implicit $exec 88# GCN-NEXT: } 89 90--- 91name: dead 92tracksRegLiveness: true 93registers: 94 - { id: 0, class: vreg_64 } 95 - { id: 1, class: vreg_128 } 96 - { id: 2, class: vreg_128 } 97 - { id: 3, class: vreg_128 } 98 - { id: 4, class: vreg_128 } 99body: | 100 bb.0: 101 %0 = IMPLICIT_DEF 102 dead %1:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 0, 0, 0, 0, implicit $exec 103 dead %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 16, 0, 0, 0, implicit $exec 104 dead %3:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 32, 0, 0, 0, implicit $exec 105 dead %4:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 48, 0, 0, 0, implicit $exec 106... 107 108# GCN-LABEL: {{^}}name: subreg_dead{{$}} 109# GCN: early-clobber %1:vreg_64 = BUNDLE %0, implicit $exec { 110# GCN-NEXT: %1.sub0:vreg_64 = GLOBAL_LOAD_DWORD %0, 16, 0, 0, 0, implicit $exec 111# GCN-NEXT: dead %1.sub1:vreg_64 = GLOBAL_LOAD_DWORD %0, 32, 0, 0, 0, implicit $exec 112# GCN-NEXT: } 113# GCN-NEXT: GLOBAL_STORE_DWORD %0, %1.sub0, 0, 0, 0, 0, implicit $exec 114 115--- 116name: subreg_dead 117tracksRegLiveness: true 118registers: 119 - { id: 0, class: vreg_64 } 120 - { id: 1, class: vreg_64 } 121body: | 122 bb.0: 123 %0 = IMPLICIT_DEF 124 undef %1.sub0:vreg_64 = GLOBAL_LOAD_DWORD %0, 16, 0, 0, 0, implicit $exec 125 dead %1.sub1:vreg_64 = GLOBAL_LOAD_DWORD %0, 32, 0, 0, 0, implicit $exec 126 GLOBAL_STORE_DWORD %0, %1.sub0, 0, 0, 0, 0, implicit $exec 127... 128 129# GCN-LABEL: {{^}}name: kill{{$}} 130# GCN: early-clobber %2:vreg_128, early-clobber %3:vreg_128 = BUNDLE %0, %1, implicit $exec { 131# GCN-NEXT: %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 0, 0, 0, 0, implicit $exec 132# GCN-NEXT: %3:vreg_128 = GLOBAL_LOAD_DWORDX4 %1, 16, 0, 0, 0, implicit $exec 133# GCN-NEXT: } 134 135--- 136name: kill 137tracksRegLiveness: true 138registers: 139 - { id: 0, class: vreg_64 } 140 - { id: 1, class: vreg_64 } 141 - { id: 2, class: vreg_128 } 142 - { id: 3, class: vreg_128 } 143body: | 144 bb.0: 145 %0 = IMPLICIT_DEF 146 %1 = IMPLICIT_DEF 147 %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 0, 0, 0, 0, implicit $exec 148 %3:vreg_128 = GLOBAL_LOAD_DWORDX4 killed %1, 16, 0, 0, 0, implicit $exec 149 GLOBAL_STORE_DWORDX4 %0, %2, 0, 0, 0, 0, implicit $exec 150 GLOBAL_STORE_DWORDX4 %0, %3, 16, 0, 0, 0, implicit $exec 151... 152 153# GCN-LABEL: {{^}}name: indirect{{$}} 154# GCN: %1:vreg_64 = GLOBAL_LOAD_DWORDX2 %0, 0, 0, 0, 0, implicit $exec 155# GCN-NEXT: early-clobber %2:vreg_128, early-clobber %3:vreg_128 = BUNDLE %1, implicit $exec { 156# GCN-NEXT: %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %1, 0, 0, 0, 0, implicit $exec 157# GCN-NEXT: %3:vreg_128 = GLOBAL_LOAD_DWORDX4 %1, 16, 0, 0, 0, implicit $exec 158# GCN-NEXT: } 159 160--- 161name: indirect 162tracksRegLiveness: true 163registers: 164 - { id: 0, class: vreg_64 } 165 - { id: 1, class: vreg_64 } 166 - { id: 2, class: vreg_128 } 167 - { id: 3, class: vreg_128 } 168body: | 169 bb.0: 170 %0 = IMPLICIT_DEF 171 %1:vreg_64 = GLOBAL_LOAD_DWORDX2 %0, 0, 0, 0, 0, implicit $exec 172 %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %1, 0, 0, 0, 0, implicit $exec 173 %3:vreg_128 = GLOBAL_LOAD_DWORDX4 %1, 16, 0, 0, 0, implicit $exec 174 GLOBAL_STORE_DWORDX4 %0, %2, 0, 0, 0, 0, implicit $exec 175 GLOBAL_STORE_DWORDX4 %0, %3, 16, 0, 0, 0, implicit $exec 176... 177 178# GCN-LABEL: {{^}}name: stack{{$}} 179# GCN: %0:vreg_64 = IMPLICIT_DEF 180# GCN-NEXT: %1:vreg_128 = GLOBAL_LOAD_DWORDX4 %stack.0, 0, 0, 0, 0, implicit $exec 181# GCN-NEXT: %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %stack.0, 16, 0, 0, 0, implicit $exec 182# GCN-NEXT: GLOBAL_STORE_DWORDX4 %0, %1, 0, 0, 0, 0, implicit $exec 183 184--- 185name: stack 186tracksRegLiveness: true 187registers: 188 - { id: 0, class: vreg_64 } 189 - { id: 1, class: vreg_128 } 190 - { id: 2, class: vreg_128 } 191stack: 192 - { id: 0, type: default, offset: 0, size: 64, alignment: 8 } 193body: | 194 bb.0: 195 %0 = IMPLICIT_DEF 196 %1:vreg_128 = GLOBAL_LOAD_DWORDX4 %stack.0, 0, 0, 0, 0, implicit $exec 197 %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %stack.0, 16, 0, 0, 0, implicit $exec 198 GLOBAL_STORE_DWORDX4 %0, %1, 0, 0, 0, 0, implicit $exec 199 GLOBAL_STORE_DWORDX4 %0, %2, 16, 0, 0, 0, implicit $exec 200... 201 202# GCN-LABEL: {{^}}name: overflow_counter{{$}} 203# GCN: dead early-clobber %7:vgpr_32, dead early-clobber %14:vgpr_32, dead early-clobber %2:vgpr_32, dead early-clobber %9:vgpr_32, dead early-clobber %4:vgpr_32, dead early-clobber %11:vgpr_32, dead early-clobber %6:vgpr_32, dead early-clobber %13:vgpr_32, dead early-clobber %1:vgpr_32, dead early-clobber %8:vgpr_32, dead early-clobber %15:vgpr_32, dead early-clobber %3:vgpr_32, dead early-clobber %10:vgpr_32, dead early-clobber %5:vgpr_32, dead early-clobber %12:vgpr_32 = BUNDLE %0, implicit $exec { 204# GCN-NEXT: dead %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, 0, 0, implicit $exec 205# GCN-NEXT: dead %2:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, 0, 0, implicit $exec 206# GCN-NEXT: dead %3:vgpr_32 = GLOBAL_LOAD_DWORD %0, 8, 0, 0, 0, implicit $exec 207# GCN-NEXT: dead %4:vgpr_32 = GLOBAL_LOAD_DWORD %0, 12, 0, 0, 0, implicit $exec 208# GCN-NEXT: dead %5:vgpr_32 = GLOBAL_LOAD_DWORD %0, 16, 0, 0, 0, implicit $exec 209# GCN-NEXT: dead %6:vgpr_32 = GLOBAL_LOAD_DWORD %0, 20, 0, 0, 0, implicit $exec 210# GCN-NEXT: dead %7:vgpr_32 = GLOBAL_LOAD_DWORD %0, 24, 0, 0, 0, implicit $exec 211# GCN-NEXT: dead %8:vgpr_32 = GLOBAL_LOAD_DWORD %0, 28, 0, 0, 0, implicit $exec 212# GCN-NEXT: dead %9:vgpr_32 = GLOBAL_LOAD_DWORD %0, 32, 0, 0, 0, implicit $exec 213# GCN-NEXT: dead %10:vgpr_32 = GLOBAL_LOAD_DWORD %0, 36, 0, 0, 0, implicit $exec 214# GCN-NEXT: dead %11:vgpr_32 = GLOBAL_LOAD_DWORD %0, 40, 0, 0, 0, implicit $exec 215# GCN-NEXT: dead %12:vgpr_32 = GLOBAL_LOAD_DWORD %0, 44, 0, 0, 0, implicit $exec 216# GCN-NEXT: dead %13:vgpr_32 = GLOBAL_LOAD_DWORD %0, 48, 0, 0, 0, implicit $exec 217# GCN-NEXT: dead %14:vgpr_32 = GLOBAL_LOAD_DWORD %0, 52, 0, 0, 0, implicit $exec 218# GCN-NEXT: dead %15:vgpr_32 = GLOBAL_LOAD_DWORD %0, 56, 0, 0, 0, implicit $exec 219# GCN-NEXT: } 220# GCN-NEXT: dead early-clobber %16:vgpr_32, dead early-clobber %17:vgpr_32 = BUNDLE %0, implicit $exec { 221# GCN-NEXT: dead %16:vgpr_32 = GLOBAL_LOAD_DWORD %0, 60, 0, 0, 0, implicit $exec 222# GCN-NEXT: dead %17:vgpr_32 = GLOBAL_LOAD_DWORD %0, 64, 0, 0, 0, implicit $exec 223# GCN-NEXT: } 224 225--- 226name: overflow_counter 227tracksRegLiveness: true 228registers: 229 - { id: 0, class: vreg_64 } 230 - { id: 1, class: vgpr_32 } 231 - { id: 2, class: vgpr_32 } 232 - { id: 3, class: vgpr_32 } 233 - { id: 4, class: vgpr_32 } 234 - { id: 5, class: vgpr_32 } 235 - { id: 6, class: vgpr_32 } 236 - { id: 7, class: vgpr_32 } 237 - { id: 8, class: vgpr_32 } 238 - { id: 9, class: vgpr_32 } 239 - { id: 10, class: vgpr_32 } 240 - { id: 11, class: vgpr_32 } 241 - { id: 12, class: vgpr_32 } 242 - { id: 13, class: vgpr_32 } 243 - { id: 14, class: vgpr_32 } 244 - { id: 15, class: vgpr_32 } 245 - { id: 16, class: vgpr_32 } 246 - { id: 17, class: vgpr_32 } 247body: | 248 bb.0: 249 %0 = IMPLICIT_DEF 250 %1:vgpr_32 = GLOBAL_LOAD_DWORD %0, 0, 0, 0, 0, implicit $exec 251 %2:vgpr_32 = GLOBAL_LOAD_DWORD %0, 4, 0, 0, 0, implicit $exec 252 %3:vgpr_32 = GLOBAL_LOAD_DWORD %0, 8, 0, 0, 0, implicit $exec 253 %4:vgpr_32 = GLOBAL_LOAD_DWORD %0, 12, 0, 0, 0, implicit $exec 254 %5:vgpr_32 = GLOBAL_LOAD_DWORD %0, 16, 0, 0, 0, implicit $exec 255 %6:vgpr_32 = GLOBAL_LOAD_DWORD %0, 20, 0, 0, 0, implicit $exec 256 %7:vgpr_32 = GLOBAL_LOAD_DWORD %0, 24, 0, 0, 0, implicit $exec 257 %8:vgpr_32 = GLOBAL_LOAD_DWORD %0, 28, 0, 0, 0, implicit $exec 258 %9:vgpr_32 = GLOBAL_LOAD_DWORD %0, 32, 0, 0, 0, implicit $exec 259 %10:vgpr_32 = GLOBAL_LOAD_DWORD %0, 36, 0, 0, 0, implicit $exec 260 %11:vgpr_32 = GLOBAL_LOAD_DWORD %0, 40, 0, 0, 0, implicit $exec 261 %12:vgpr_32 = GLOBAL_LOAD_DWORD %0, 44, 0, 0, 0, implicit $exec 262 %13:vgpr_32 = GLOBAL_LOAD_DWORD %0, 48, 0, 0, 0, implicit $exec 263 %14:vgpr_32 = GLOBAL_LOAD_DWORD %0, 52, 0, 0, 0, implicit $exec 264 %15:vgpr_32 = GLOBAL_LOAD_DWORD %0, 56, 0, 0, 0, implicit $exec 265 %16:vgpr_32 = GLOBAL_LOAD_DWORD %0, 60, 0, 0, 0, implicit $exec 266 %17:vgpr_32 = GLOBAL_LOAD_DWORD %0, 64, 0, 0, 0, implicit $exec 267... 268 269# GCN-LABEL: {{^}}name: reg_pressure{{$}} 270# GCN: dead early-clobber %2:vreg_128, dead early-clobber %4:vreg_128, dead early-clobber %1:vreg_128, dead early-clobber %3:vreg_128, dead early-clobber %5:vreg_128 = BUNDLE %0, implicit $exec { 271# GCN-NEXT: dead %1:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 0, 0, 0, 0, implicit $exec 272# GCN-NEXT: dead %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 16, 0, 0, 0, implicit $exec 273# GCN-NEXT: dead %3:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 32, 0, 0, 0, implicit $exec 274# GCN-NEXT: dead %4:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 48, 0, 0, 0, implicit $exec 275# GCN-NEXT: dead %5:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 64, 0, 0, 0, implicit $exec 276# GCN-NEXT: } 277# GCN-NEXT: dead early-clobber %7:vreg_128, dead early-clobber %6:vreg_128 = BUNDLE %0, implicit $exec { 278# GCN-NEXT: dead %6:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 80, 0, 0, 0, implicit $exec 279# GCN-NEXT: dead %7:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 96, 0, 0, 0, implicit $exec 280# GCN-NEXT: } 281 282--- 283name: reg_pressure 284tracksRegLiveness: true 285registers: 286 - { id: 0, class: vreg_64 } 287 - { id: 1, class: vreg_128 } 288 - { id: 2, class: vreg_128 } 289 - { id: 3, class: vreg_128 } 290 - { id: 4, class: vreg_128 } 291 - { id: 5, class: vreg_128 } 292 - { id: 6, class: vreg_128 } 293 - { id: 7, class: vreg_128 } 294body: | 295 bb.0: 296 %0 = IMPLICIT_DEF 297 %1:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 0, 0, 0, 0, implicit $exec 298 %2:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 16, 0, 0, 0, implicit $exec 299 %3:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 32, 0, 0, 0, implicit $exec 300 %4:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 48, 0, 0, 0, implicit $exec 301 %5:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 64, 0, 0, 0, implicit $exec 302 %6:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 80, 0, 0, 0, implicit $exec 303 %7:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 96, 0, 0, 0, implicit $exec 304... 305 306# GCN-LABEL: {{^}}name: image_clause{{$}} 307# GCN: early-clobber %4:vreg_128, early-clobber %3:vreg_128, early-clobber %5:vreg_128 = BUNDLE %0, undef %2:sgpr_128, %1, implicit $exec { 308# GCN-NEXT: %3:vreg_128 = IMAGE_SAMPLE_LZ_V4_V2 %0, %1, undef %2:sgpr_128, 15, 0, 0, 0, 0, 0, 0, 0, 0, implicit $exec 309# GCN-NEXT: %4:vreg_128 = IMAGE_SAMPLE_LZ_V4_V2 %0, %1, undef %2:sgpr_128, 15, 0, 0, 0, 0, 0, 0, 0, 0, implicit $exec 310# GCN-NEXT: %5:vreg_128 = IMAGE_SAMPLE_LZ_V4_V2 %0, %1, undef %2:sgpr_128, 15, 0, 0, 0, 0, 0, 0, 0, 0, implicit $exec 311# GCN-NEXT: } 312# GCN-NEXT: IMAGE_STORE_V4_V2 %3, %0, %1, 15, -1, 0, 0, 0, 0, 0, 0, 0, implicit $exec 313 314--- 315name: image_clause 316tracksRegLiveness: true 317registers: 318 - { id: 0, class: vreg_64 } 319 - { id: 1, class: sgpr_256 } 320 - { id: 2, class: sgpr_128 } 321 - { id: 3, class: vreg_128 } 322 - { id: 4, class: vreg_128 } 323 - { id: 5, class: vreg_128 } 324body: | 325 bb.0: 326 %0 = IMPLICIT_DEF 327 %1 = IMPLICIT_DEF 328 %3:vreg_128 = IMAGE_SAMPLE_LZ_V4_V2 %0, %1, undef %2:sgpr_128, 15, 0, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (load 16) 329 %4:vreg_128 = IMAGE_SAMPLE_LZ_V4_V2 %0, %1, undef %2:sgpr_128, 15, 0, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (load 16) 330 %5:vreg_128 = IMAGE_SAMPLE_LZ_V4_V2 %0, %1, undef %2:sgpr_128, 15, 0, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (load 16) 331 IMAGE_STORE_V4_V2 %3, %0, %1, 15, -1, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 16) 332 IMAGE_STORE_V4_V2 %4, %0, %1, 15, -1, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 16) 333 IMAGE_STORE_V4_V2 %5, %0, %1, 15, -1, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (store 16) 334... 335 336# GCN-LABEL: {{^}}name: mixed_clause{{$}} 337# GCN: dead early-clobber %4:vreg_128, dead early-clobber %3:vreg_128, dead early-clobber %5:vgpr_32 = BUNDLE %0, %2, %1, implicit $exec { 338# GCN-NEXT: dead %3:vreg_128 = IMAGE_SAMPLE_LZ_V4_V2 %0, %1, %2, 15, 0, 0, 0, 0, 0, 0, 0, 0, implicit $exec 339# GCN-NEXT: dead %4:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 0, 0, 0, 0, implicit $exec 340# GCN-NEXT: dead %5:vgpr_32 = BUFFER_LOAD_DWORD_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec 341# GCN-NEXT: } 342 343--- 344name: mixed_clause 345tracksRegLiveness: true 346registers: 347 - { id: 0, class: vreg_64 } 348 - { id: 1, class: sgpr_256 } 349 - { id: 2, class: sgpr_128 } 350 - { id: 3, class: vreg_128 } 351 - { id: 4, class: vreg_128 } 352 - { id: 5, class: vgpr_32 } 353body: | 354 bb.0: 355 %0 = IMPLICIT_DEF 356 %1 = IMPLICIT_DEF 357 %2 = IMPLICIT_DEF 358 %3:vreg_128 = IMAGE_SAMPLE_LZ_V4_V2 %0, %1, %2, 15, 0, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (load 16) 359 %4:vreg_128 = GLOBAL_LOAD_DWORDX4 %0, 0, 0, 0, 0, implicit $exec 360 %5:vgpr_32 = BUFFER_LOAD_DWORD_OFFSET %2, 0, 0, 0, 0, 0, 0, 0, implicit $exec 361... 362 363# GCN-LABEL: {{^}}name: atomic{{$}} 364# GCN: %1:vgpr_32 = IMPLICIT_DEF 365# GCN-NEXT: dead %2:vgpr_32 = FLAT_ATOMIC_ADD_RTN %0, %1, 0, -1, 0, implicit $exec, implicit $flat_scr 366# GCN-NEXT: dead %3:vgpr_32 = FLAT_ATOMIC_ADD_RTN %0, %1, 0, -1, 0, implicit $exec, implicit $flat_scr 367# GCN-NEXT: FLAT_ATOMIC_ADD %0, %1, 0, 0, implicit $exec, implicit $flat_scr 368# GCN-NEXT: FLAT_ATOMIC_ADD %0, %1, 0, 0, implicit $exec, implicit $flat_scr 369# GCN-NEXT: S_ENDPGM 0 370 371--- 372name: atomic 373tracksRegLiveness: true 374registers: 375 - { id: 0, class: vreg_64 } 376 - { id: 1, class: vgpr_32 } 377 - { id: 2, class: vgpr_32 } 378 - { id: 3, class: vgpr_32 } 379body: | 380 bb.0: 381 %0 = IMPLICIT_DEF 382 %1 = IMPLICIT_DEF 383 %2:vgpr_32 = FLAT_ATOMIC_ADD_RTN %0, %1, 0, -1, 0, implicit $exec, implicit $flat_scr 384 %3:vgpr_32 = FLAT_ATOMIC_ADD_RTN %0, %1, 0, -1, 0, implicit $exec, implicit $flat_scr 385 FLAT_ATOMIC_ADD %0, %1, 0, 0, implicit $exec, implicit $flat_scr 386 FLAT_ATOMIC_ADD %0, %1, 0, 0, implicit $exec, implicit $flat_scr 387 S_ENDPGM 0 388... 389