1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX6 %s 3# RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX7 %s 4# RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX8 %s 5# RUN: llc -amdgpu-global-isel-new-legality -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX10 %s 6 7--- 8 9name: load_constant_s32_from_4 10legalized: true 11regBankSelected: true 12tracksRegLiveness: true 13 14 15body: | 16 bb.0: 17 liveins: $sgpr0_sgpr1 18 19 ; GFX6-LABEL: name: load_constant_s32_from_4 20 ; GFX6: liveins: $sgpr0_sgpr1 21 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 22 ; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 23 ; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 24 ; GFX7-LABEL: name: load_constant_s32_from_4 25 ; GFX7: liveins: $sgpr0_sgpr1 26 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 27 ; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 28 ; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 29 ; GFX8-LABEL: name: load_constant_s32_from_4 30 ; GFX8: liveins: $sgpr0_sgpr1 31 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 32 ; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 33 ; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 34 ; GFX10-LABEL: name: load_constant_s32_from_4 35 ; GFX10: liveins: $sgpr0_sgpr1 36 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 37 ; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 38 ; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 39 %0:sgpr(p4) = COPY $sgpr0_sgpr1 40 %1:sgpr(s32) = G_LOAD %0 :: (load 4, align 4, addrspace 4) 41 $sgpr0 = COPY %1 42 43... 44 45--- 46 47name: load_constant_v2s16_from_4 48legalized: true 49regBankSelected: true 50tracksRegLiveness: true 51 52 53body: | 54 bb.0: 55 liveins: $sgpr0_sgpr1 56 57 ; GFX6-LABEL: name: load_constant_v2s16_from_4 58 ; GFX6: liveins: $sgpr0_sgpr1 59 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 60 ; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 61 ; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 62 ; GFX7-LABEL: name: load_constant_v2s16_from_4 63 ; GFX7: liveins: $sgpr0_sgpr1 64 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 65 ; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 66 ; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 67 ; GFX8-LABEL: name: load_constant_v2s16_from_4 68 ; GFX8: liveins: $sgpr0_sgpr1 69 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 70 ; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 71 ; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 72 ; GFX10-LABEL: name: load_constant_v2s16_from_4 73 ; GFX10: liveins: $sgpr0_sgpr1 74 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 75 ; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 76 ; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 77 %0:sgpr(p4) = COPY $sgpr0_sgpr1 78 %1:sgpr(<2 x s16>) = G_LOAD %0 :: (load 4, align 4, addrspace 4) 79 $sgpr0 = COPY %1 80 81... 82 83 84--- 85name: load_constant_v2s32 86legalized: true 87regBankSelected: true 88tracksRegLiveness: true 89 90body: | 91 bb.0: 92 liveins: $sgpr0_sgpr1 93 94 ; GFX6-LABEL: name: load_constant_v2s32 95 ; GFX6: liveins: $sgpr0_sgpr1 96 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 97 ; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 98 ; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 99 ; GFX7-LABEL: name: load_constant_v2s32 100 ; GFX7: liveins: $sgpr0_sgpr1 101 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 102 ; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 103 ; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 104 ; GFX8-LABEL: name: load_constant_v2s32 105 ; GFX8: liveins: $sgpr0_sgpr1 106 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 107 ; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 108 ; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 109 ; GFX10-LABEL: name: load_constant_v2s32 110 ; GFX10: liveins: $sgpr0_sgpr1 111 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 112 ; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 113 ; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 114 %0:sgpr(p4) = COPY $sgpr0_sgpr1 115 %1:sgpr(<2 x s32>) = G_LOAD %0 :: (load 8, align 8, addrspace 4) 116 $sgpr0_sgpr1 = COPY %1 117 118... 119 120--- 121name: load_constant_v2s32_align4 122legalized: true 123regBankSelected: true 124tracksRegLiveness: true 125 126body: | 127 bb.0: 128 liveins: $sgpr0_sgpr1 129 130 ; GFX6-LABEL: name: load_constant_v2s32_align4 131 ; GFX6: liveins: $sgpr0_sgpr1 132 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 133 ; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 134 ; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 135 ; GFX7-LABEL: name: load_constant_v2s32_align4 136 ; GFX7: liveins: $sgpr0_sgpr1 137 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 138 ; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 139 ; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 140 ; GFX8-LABEL: name: load_constant_v2s32_align4 141 ; GFX8: liveins: $sgpr0_sgpr1 142 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 143 ; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 144 ; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 145 ; GFX10-LABEL: name: load_constant_v2s32_align4 146 ; GFX10: liveins: $sgpr0_sgpr1 147 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 148 ; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 149 ; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 150 %0:sgpr(p4) = COPY $sgpr0_sgpr1 151 %1:sgpr(<2 x s32>) = G_LOAD %0 :: (load 8, align 4, addrspace 4) 152 $sgpr0_sgpr1 = COPY %1 153 154... 155 156--- 157name: load_constant_v4s16_align4 158legalized: true 159regBankSelected: true 160tracksRegLiveness: true 161 162body: | 163 bb.0: 164 liveins: $sgpr0_sgpr1 165 166 ; GFX6-LABEL: name: load_constant_v4s16_align4 167 ; GFX6: liveins: $sgpr0_sgpr1 168 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 169 ; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 170 ; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 171 ; GFX7-LABEL: name: load_constant_v4s16_align4 172 ; GFX7: liveins: $sgpr0_sgpr1 173 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 174 ; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 175 ; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 176 ; GFX8-LABEL: name: load_constant_v4s16_align4 177 ; GFX8: liveins: $sgpr0_sgpr1 178 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 179 ; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 180 ; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 181 ; GFX10-LABEL: name: load_constant_v4s16_align4 182 ; GFX10: liveins: $sgpr0_sgpr1 183 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 184 ; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 185 ; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 186 %0:sgpr(p4) = COPY $sgpr0_sgpr1 187 %1:sgpr(<4 x s16>) = G_LOAD %0 :: (load 8, align 4, addrspace 4) 188 $sgpr0_sgpr1 = COPY %1 189 190... 191 192--- 193 194name: load_constant_v4s32_align4 195legalized: true 196regBankSelected: true 197tracksRegLiveness: true 198 199body: | 200 bb.0: 201 liveins: $sgpr0_sgpr1 202 203 ; GFX6-LABEL: name: load_constant_v4s32_align4 204 ; GFX6: liveins: $sgpr0_sgpr1 205 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 206 ; GFX6: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4) 207 ; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]] 208 ; GFX7-LABEL: name: load_constant_v4s32_align4 209 ; GFX7: liveins: $sgpr0_sgpr1 210 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 211 ; GFX7: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4) 212 ; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]] 213 ; GFX8-LABEL: name: load_constant_v4s32_align4 214 ; GFX8: liveins: $sgpr0_sgpr1 215 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 216 ; GFX8: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4) 217 ; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]] 218 ; GFX10-LABEL: name: load_constant_v4s32_align4 219 ; GFX10: liveins: $sgpr0_sgpr1 220 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 221 ; GFX10: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4) 222 ; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]] 223 %0:sgpr(p4) = COPY $sgpr0_sgpr1 224 %1:sgpr(<4 x s32>) = G_LOAD %0 :: (load 16, align 4, addrspace 4) 225 $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1 226 227... 228 229--- 230 231name: load_constant_s64 232legalized: true 233regBankSelected: true 234tracksRegLiveness: true 235 236body: | 237 bb.0: 238 liveins: $sgpr0_sgpr1 239 240 ; GFX6-LABEL: name: load_constant_s64 241 ; GFX6: liveins: $sgpr0_sgpr1 242 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 243 ; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 244 ; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 245 ; GFX7-LABEL: name: load_constant_s64 246 ; GFX7: liveins: $sgpr0_sgpr1 247 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 248 ; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 249 ; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 250 ; GFX8-LABEL: name: load_constant_s64 251 ; GFX8: liveins: $sgpr0_sgpr1 252 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 253 ; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 254 ; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 255 ; GFX10-LABEL: name: load_constant_s64 256 ; GFX10: liveins: $sgpr0_sgpr1 257 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 258 ; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 259 ; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 260 %0:sgpr(p4) = COPY $sgpr0_sgpr1 261 %1:sgpr(s64) = G_LOAD %0 :: (load 8, align 8, addrspace 4) 262 $sgpr0_sgpr1 = COPY %1 263 264... 265 266--- 267 268name: load_constant_s64_align4 269legalized: true 270regBankSelected: true 271tracksRegLiveness: true 272 273body: | 274 bb.0: 275 liveins: $sgpr0_sgpr1 276 277 ; GFX6-LABEL: name: load_constant_s64_align4 278 ; GFX6: liveins: $sgpr0_sgpr1 279 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 280 ; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 281 ; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 282 ; GFX7-LABEL: name: load_constant_s64_align4 283 ; GFX7: liveins: $sgpr0_sgpr1 284 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 285 ; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 286 ; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 287 ; GFX8-LABEL: name: load_constant_s64_align4 288 ; GFX8: liveins: $sgpr0_sgpr1 289 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 290 ; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 291 ; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 292 ; GFX10-LABEL: name: load_constant_s64_align4 293 ; GFX10: liveins: $sgpr0_sgpr1 294 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 295 ; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, align 4, addrspace 4) 296 ; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 297 %0:sgpr(p4) = COPY $sgpr0_sgpr1 298 %1:sgpr(s64) = G_LOAD %0 :: (load 8, align 4, addrspace 4) 299 $sgpr0_sgpr1 = COPY %1 300 301... 302 303--- 304 305name: load_constant_v2s64 306legalized: true 307regBankSelected: true 308tracksRegLiveness: true 309 310body: | 311 bb.0: 312 liveins: $sgpr0_sgpr1 313 314 ; GFX6-LABEL: name: load_constant_v2s64 315 ; GFX6: liveins: $sgpr0_sgpr1 316 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 317 ; GFX6: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4) 318 ; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]] 319 ; GFX7-LABEL: name: load_constant_v2s64 320 ; GFX7: liveins: $sgpr0_sgpr1 321 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 322 ; GFX7: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4) 323 ; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]] 324 ; GFX8-LABEL: name: load_constant_v2s64 325 ; GFX8: liveins: $sgpr0_sgpr1 326 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 327 ; GFX8: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4) 328 ; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]] 329 ; GFX10-LABEL: name: load_constant_v2s64 330 ; GFX10: liveins: $sgpr0_sgpr1 331 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 332 ; GFX10: [[S_LOAD_DWORDX4_IMM:%[0-9]+]]:sgpr_128 = S_LOAD_DWORDX4_IMM [[COPY]], 0, 0, 0 :: (load 16, align 4, addrspace 4) 333 ; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[S_LOAD_DWORDX4_IMM]] 334 %0:sgpr(p4) = COPY $sgpr0_sgpr1 335 %1:sgpr(<2 x s64>) = G_LOAD %0 :: (load 16, align 4, addrspace 4) 336 $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1 337 338... 339 340--- 341 342name: load_constant_v2p1 343legalized: true 344regBankSelected: true 345tracksRegLiveness: true 346 347body: | 348 bb.0: 349 liveins: $sgpr0_sgpr1 350 351 ; GFX6-LABEL: name: load_constant_v2p1 352 ; GFX6: liveins: $sgpr0_sgpr1 353 ; GFX6: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 354 ; GFX6: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 355 ; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>) 356 ; GFX7-LABEL: name: load_constant_v2p1 357 ; GFX7: liveins: $sgpr0_sgpr1 358 ; GFX7: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 359 ; GFX7: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 360 ; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>) 361 ; GFX8-LABEL: name: load_constant_v2p1 362 ; GFX8: liveins: $sgpr0_sgpr1 363 ; GFX8: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 364 ; GFX8: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 365 ; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>) 366 ; GFX10-LABEL: name: load_constant_v2p1 367 ; GFX10: liveins: $sgpr0_sgpr1 368 ; GFX10: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 369 ; GFX10: [[LOAD:%[0-9]+]]:sgpr_128(<2 x p1>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 370 ; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<2 x p1>) 371 %0:sgpr(p4) = COPY $sgpr0_sgpr1 372 %1:sgpr(<2 x p1>) = G_LOAD %0 :: (load 16, align 4, addrspace 4) 373 $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1 374 375... 376 377--- 378 379name: load_constant_s128_align4 380legalized: true 381regBankSelected: true 382tracksRegLiveness: true 383 384body: | 385 bb.0: 386 liveins: $sgpr0_sgpr1 387 388 ; GFX6-LABEL: name: load_constant_s128_align4 389 ; GFX6: liveins: $sgpr0_sgpr1 390 ; GFX6: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 391 ; GFX6: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 392 ; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128) 393 ; GFX7-LABEL: name: load_constant_s128_align4 394 ; GFX7: liveins: $sgpr0_sgpr1 395 ; GFX7: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 396 ; GFX7: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 397 ; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128) 398 ; GFX8-LABEL: name: load_constant_s128_align4 399 ; GFX8: liveins: $sgpr0_sgpr1 400 ; GFX8: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 401 ; GFX8: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 402 ; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128) 403 ; GFX10-LABEL: name: load_constant_s128_align4 404 ; GFX10: liveins: $sgpr0_sgpr1 405 ; GFX10: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 406 ; GFX10: [[LOAD:%[0-9]+]]:sgpr_128(s128) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 407 ; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](s128) 408 %0:sgpr(p4) = COPY $sgpr0_sgpr1 409 %1:sgpr(s128) = G_LOAD %0 :: (load 16, align 4, addrspace 4) 410 $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1 411 412... 413 414--- 415 416name: load_constant_p3_from_4 417legalized: true 418regBankSelected: true 419tracksRegLiveness: true 420 421body: | 422 bb.0: 423 liveins: $sgpr0_sgpr1 424 425 ; GFX6-LABEL: name: load_constant_p3_from_4 426 ; GFX6: liveins: $sgpr0_sgpr1 427 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 428 ; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 429 ; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 430 ; GFX7-LABEL: name: load_constant_p3_from_4 431 ; GFX7: liveins: $sgpr0_sgpr1 432 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 433 ; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 434 ; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 435 ; GFX8-LABEL: name: load_constant_p3_from_4 436 ; GFX8: liveins: $sgpr0_sgpr1 437 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 438 ; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 439 ; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 440 ; GFX10-LABEL: name: load_constant_p3_from_4 441 ; GFX10: liveins: $sgpr0_sgpr1 442 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 443 ; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 444 ; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 445 %0:sgpr(p4) = COPY $sgpr0_sgpr1 446 %1:sgpr(p3) = G_LOAD %0 :: (load 4, align 4, addrspace 4) 447 $sgpr0 = COPY %1 448 449... 450 451--- 452 453name: load_constant_p1_from_8 454legalized: true 455regBankSelected: true 456tracksRegLiveness: true 457 458body: | 459 bb.0: 460 liveins: $sgpr0_sgpr1 461 462 ; GFX6-LABEL: name: load_constant_p1_from_8 463 ; GFX6: liveins: $sgpr0_sgpr1 464 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 465 ; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 466 ; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 467 ; GFX7-LABEL: name: load_constant_p1_from_8 468 ; GFX7: liveins: $sgpr0_sgpr1 469 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 470 ; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 471 ; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 472 ; GFX8-LABEL: name: load_constant_p1_from_8 473 ; GFX8: liveins: $sgpr0_sgpr1 474 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 475 ; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 476 ; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 477 ; GFX10-LABEL: name: load_constant_p1_from_8 478 ; GFX10: liveins: $sgpr0_sgpr1 479 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 480 ; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 481 ; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 482 %0:sgpr(p4) = COPY $sgpr0_sgpr1 483 %1:sgpr(p4) = G_LOAD %0 :: (load 8, align 8, addrspace 4) 484 $sgpr0_sgpr1 = COPY %1 485 486... 487 488--- 489 490name: load_constant_p999_from_8 491legalized: true 492regBankSelected: true 493tracksRegLiveness: true 494 495body: | 496 bb.0: 497 liveins: $sgpr0_sgpr1 498 499 ; GFX6-LABEL: name: load_constant_p999_from_8 500 ; GFX6: liveins: $sgpr0_sgpr1 501 ; GFX6: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 502 ; GFX6: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4) 503 ; GFX6: $sgpr0_sgpr1 = COPY [[LOAD]](p999) 504 ; GFX7-LABEL: name: load_constant_p999_from_8 505 ; GFX7: liveins: $sgpr0_sgpr1 506 ; GFX7: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 507 ; GFX7: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4) 508 ; GFX7: $sgpr0_sgpr1 = COPY [[LOAD]](p999) 509 ; GFX8-LABEL: name: load_constant_p999_from_8 510 ; GFX8: liveins: $sgpr0_sgpr1 511 ; GFX8: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 512 ; GFX8: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4) 513 ; GFX8: $sgpr0_sgpr1 = COPY [[LOAD]](p999) 514 ; GFX10-LABEL: name: load_constant_p999_from_8 515 ; GFX10: liveins: $sgpr0_sgpr1 516 ; GFX10: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 517 ; GFX10: [[LOAD:%[0-9]+]]:sreg_64(p999) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4) 518 ; GFX10: $sgpr0_sgpr1 = COPY [[LOAD]](p999) 519 %0:sgpr(p4) = COPY $sgpr0_sgpr1 520 %1:sgpr(p999) = G_LOAD %0 :: (load 8, align 8, addrspace 4) 521 $sgpr0_sgpr1 = COPY %1 522 523... 524 525--- 526 527name: load_constant_v2p3 528legalized: true 529regBankSelected: true 530tracksRegLiveness: true 531 532body: | 533 bb.0: 534 liveins: $sgpr0_sgpr1 535 536 ; GFX6-LABEL: name: load_constant_v2p3 537 ; GFX6: liveins: $sgpr0_sgpr1 538 ; GFX6: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 539 ; GFX6: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4) 540 ; GFX6: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>) 541 ; GFX7-LABEL: name: load_constant_v2p3 542 ; GFX7: liveins: $sgpr0_sgpr1 543 ; GFX7: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 544 ; GFX7: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4) 545 ; GFX7: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>) 546 ; GFX8-LABEL: name: load_constant_v2p3 547 ; GFX8: liveins: $sgpr0_sgpr1 548 ; GFX8: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 549 ; GFX8: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4) 550 ; GFX8: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>) 551 ; GFX10-LABEL: name: load_constant_v2p3 552 ; GFX10: liveins: $sgpr0_sgpr1 553 ; GFX10: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 554 ; GFX10: [[LOAD:%[0-9]+]]:sreg_64(<2 x p3>) = G_LOAD [[COPY]](p4) :: (load 8, addrspace 4) 555 ; GFX10: $sgpr0_sgpr1 = COPY [[LOAD]](<2 x p3>) 556 %0:sgpr(p4) = COPY $sgpr0_sgpr1 557 %1:sgpr(<2 x p3>) = G_LOAD %0 :: (load 8, align 8, addrspace 4) 558 $sgpr0_sgpr1 = COPY %1 559 560... 561 562--- 563 564name: load_constant_v2s16 565legalized: true 566regBankSelected: true 567tracksRegLiveness: true 568 569body: | 570 bb.0: 571 liveins: $sgpr0_sgpr1 572 573 ; GFX6-LABEL: name: load_constant_v2s16 574 ; GFX6: liveins: $sgpr0_sgpr1 575 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 576 ; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 577 ; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 578 ; GFX7-LABEL: name: load_constant_v2s16 579 ; GFX7: liveins: $sgpr0_sgpr1 580 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 581 ; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 582 ; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 583 ; GFX8-LABEL: name: load_constant_v2s16 584 ; GFX8: liveins: $sgpr0_sgpr1 585 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 586 ; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 587 ; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 588 ; GFX10-LABEL: name: load_constant_v2s16 589 ; GFX10: liveins: $sgpr0_sgpr1 590 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 591 ; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 0, 0, 0 :: (load 4, addrspace 4) 592 ; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 593 %0:sgpr(p4) = COPY $sgpr0_sgpr1 594 %1:sgpr(<2 x s16>) = G_LOAD %0 :: (load 4, align 4, addrspace 4) 595 $sgpr0 = COPY %1 596 597... 598 599--- 600 601name: load_constant_v4s16 602legalized: true 603regBankSelected: true 604tracksRegLiveness: true 605 606body: | 607 bb.0: 608 liveins: $sgpr0_sgpr1 609 610 ; GFX6-LABEL: name: load_constant_v4s16 611 ; GFX6: liveins: $sgpr0_sgpr1 612 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 613 ; GFX6: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 614 ; GFX6: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 615 ; GFX7-LABEL: name: load_constant_v4s16 616 ; GFX7: liveins: $sgpr0_sgpr1 617 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 618 ; GFX7: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 619 ; GFX7: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 620 ; GFX8-LABEL: name: load_constant_v4s16 621 ; GFX8: liveins: $sgpr0_sgpr1 622 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 623 ; GFX8: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 624 ; GFX8: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 625 ; GFX10-LABEL: name: load_constant_v4s16 626 ; GFX10: liveins: $sgpr0_sgpr1 627 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 628 ; GFX10: [[S_LOAD_DWORDX2_IMM:%[0-9]+]]:sreg_64_xexec = S_LOAD_DWORDX2_IMM [[COPY]], 0, 0, 0 :: (load 8, addrspace 4) 629 ; GFX10: $sgpr0_sgpr1 = COPY [[S_LOAD_DWORDX2_IMM]] 630 %0:sgpr(p4) = COPY $sgpr0_sgpr1 631 %1:sgpr(<4 x s16>) = G_LOAD %0 :: (load 8, align 8, addrspace 4) 632 $sgpr0_sgpr1 = COPY %1 633 634... 635 636--- 637 638name: load_constant_v8s16 639legalized: true 640regBankSelected: true 641tracksRegLiveness: true 642 643body: | 644 bb.0: 645 liveins: $sgpr0_sgpr1 646 647 ; GFX6-LABEL: name: load_constant_v8s16 648 ; GFX6: liveins: $sgpr0_sgpr1 649 ; GFX6: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 650 ; GFX6: [[LOAD:%[0-9]+]]:sgpr_128(<8 x s16>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 651 ; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<8 x s16>) 652 ; GFX7-LABEL: name: load_constant_v8s16 653 ; GFX7: liveins: $sgpr0_sgpr1 654 ; GFX7: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 655 ; GFX7: [[LOAD:%[0-9]+]]:sgpr_128(<8 x s16>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 656 ; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<8 x s16>) 657 ; GFX8-LABEL: name: load_constant_v8s16 658 ; GFX8: liveins: $sgpr0_sgpr1 659 ; GFX8: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 660 ; GFX8: [[LOAD:%[0-9]+]]:sgpr_128(<8 x s16>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 661 ; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<8 x s16>) 662 ; GFX10-LABEL: name: load_constant_v8s16 663 ; GFX10: liveins: $sgpr0_sgpr1 664 ; GFX10: [[COPY:%[0-9]+]]:sgpr(p4) = COPY $sgpr0_sgpr1 665 ; GFX10: [[LOAD:%[0-9]+]]:sgpr_128(<8 x s16>) = G_LOAD [[COPY]](p4) :: (load 16, align 4, addrspace 4) 666 ; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[LOAD]](<8 x s16>) 667 %0:sgpr(p4) = COPY $sgpr0_sgpr1 668 %1:sgpr(<8 x s16>) = G_LOAD %0 :: (load 16, align 4, addrspace 4) 669 $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %1 670 671... 672 673--- 674 675name: load_constant_v8s32 676legalized: true 677regBankSelected: true 678tracksRegLiveness: true 679 680body: | 681 bb.0: 682 liveins: $sgpr0_sgpr1 683 684 ; GFX6-LABEL: name: load_constant_v8s32 685 ; GFX6: liveins: $sgpr0_sgpr1 686 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 687 ; GFX6: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0, 0 :: (load 32, align 4, addrspace 4) 688 ; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]] 689 ; GFX7-LABEL: name: load_constant_v8s32 690 ; GFX7: liveins: $sgpr0_sgpr1 691 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 692 ; GFX7: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0, 0 :: (load 32, align 4, addrspace 4) 693 ; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]] 694 ; GFX8-LABEL: name: load_constant_v8s32 695 ; GFX8: liveins: $sgpr0_sgpr1 696 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 697 ; GFX8: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0, 0 :: (load 32, align 4, addrspace 4) 698 ; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]] 699 ; GFX10-LABEL: name: load_constant_v8s32 700 ; GFX10: liveins: $sgpr0_sgpr1 701 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 702 ; GFX10: [[S_LOAD_DWORDX8_IMM:%[0-9]+]]:sgpr_256 = S_LOAD_DWORDX8_IMM [[COPY]], 0, 0, 0 :: (load 32, align 4, addrspace 4) 703 ; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[S_LOAD_DWORDX8_IMM]] 704 %0:sgpr(p4) = COPY $sgpr0_sgpr1 705 %1:sgpr(<8 x s32>) = G_LOAD %0 :: (load 32, align 4, addrspace 4) 706 $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY %1 707 708... 709 710--- 711 712name: load_constant_v16s32 713legalized: true 714regBankSelected: true 715tracksRegLiveness: true 716 717body: | 718 bb.0: 719 liveins: $sgpr0_sgpr1 720 721 ; GFX6-LABEL: name: load_constant_v16s32 722 ; GFX6: liveins: $sgpr0_sgpr1 723 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 724 ; GFX6: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0, 0 :: (load 64, align 4, addrspace 4) 725 ; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]] 726 ; GFX7-LABEL: name: load_constant_v16s32 727 ; GFX7: liveins: $sgpr0_sgpr1 728 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 729 ; GFX7: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0, 0 :: (load 64, align 4, addrspace 4) 730 ; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]] 731 ; GFX8-LABEL: name: load_constant_v16s32 732 ; GFX8: liveins: $sgpr0_sgpr1 733 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 734 ; GFX8: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0, 0 :: (load 64, align 4, addrspace 4) 735 ; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]] 736 ; GFX10-LABEL: name: load_constant_v16s32 737 ; GFX10: liveins: $sgpr0_sgpr1 738 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 739 ; GFX10: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0, 0 :: (load 64, align 4, addrspace 4) 740 ; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]] 741 %0:sgpr(p4) = COPY $sgpr0_sgpr1 742 %1:sgpr(<16 x s32>) = G_LOAD %0 :: (load 64, align 4, addrspace 4) 743 $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %1 744 745... 746 747--- 748 749name: load_constant_v8s64 750legalized: true 751regBankSelected: true 752tracksRegLiveness: true 753 754body: | 755 bb.0: 756 liveins: $sgpr0_sgpr1 757 758 ; GFX6-LABEL: name: load_constant_v8s64 759 ; GFX6: liveins: $sgpr0_sgpr1 760 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 761 ; GFX6: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0, 0 :: (load 64, align 4, addrspace 4) 762 ; GFX6: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]] 763 ; GFX7-LABEL: name: load_constant_v8s64 764 ; GFX7: liveins: $sgpr0_sgpr1 765 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 766 ; GFX7: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0, 0 :: (load 64, align 4, addrspace 4) 767 ; GFX7: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]] 768 ; GFX8-LABEL: name: load_constant_v8s64 769 ; GFX8: liveins: $sgpr0_sgpr1 770 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 771 ; GFX8: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0, 0 :: (load 64, align 4, addrspace 4) 772 ; GFX8: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]] 773 ; GFX10-LABEL: name: load_constant_v8s64 774 ; GFX10: liveins: $sgpr0_sgpr1 775 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 776 ; GFX10: [[S_LOAD_DWORDX16_IMM:%[0-9]+]]:sgpr_512 = S_LOAD_DWORDX16_IMM [[COPY]], 0, 0, 0 :: (load 64, align 4, addrspace 4) 777 ; GFX10: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[S_LOAD_DWORDX16_IMM]] 778 %0:sgpr(p4) = COPY $sgpr0_sgpr1 779 %1:sgpr(<8 x s64>) = G_LOAD %0 :: (load 64, align 4, addrspace 4) 780 $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %1 781 782... 783 784################################################################################ 785### Stress addressing modes 786################################################################################ 787 788--- 789 790name: load_constant_s32_from_4_gep_1020 791legalized: true 792regBankSelected: true 793tracksRegLiveness: true 794 795body: | 796 bb.0: 797 liveins: $sgpr0_sgpr1 798 799 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1020 800 ; GFX6: liveins: $sgpr0_sgpr1 801 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 802 ; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 255, 0, 0 :: (load 4, addrspace 4) 803 ; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 804 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1020 805 ; GFX7: liveins: $sgpr0_sgpr1 806 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 807 ; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 255, 0, 0 :: (load 4, addrspace 4) 808 ; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 809 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1020 810 ; GFX8: liveins: $sgpr0_sgpr1 811 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 812 ; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1020, 0, 0 :: (load 4, addrspace 4) 813 ; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 814 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1020 815 ; GFX10: liveins: $sgpr0_sgpr1 816 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 817 ; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1020, 0, 0 :: (load 4, addrspace 4) 818 ; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 819 %0:sgpr(p4) = COPY $sgpr0_sgpr1 820 %1:sgpr(s64) = G_CONSTANT i64 1020 821 %2:sgpr(p4) = G_PTR_ADD %0, %1 822 %3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4) 823 $sgpr0 = COPY %3 824 825... 826 827--- 828 829name: load_constant_s32_from_4_gep_1024 830legalized: true 831regBankSelected: true 832tracksRegLiveness: true 833 834body: | 835 bb.0: 836 liveins: $sgpr0_sgpr1 837 838 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1024 839 ; GFX6: liveins: $sgpr0_sgpr1 840 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 841 ; GFX6: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1024 842 ; GFX6: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4) 843 ; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]] 844 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1024 845 ; GFX7: liveins: $sgpr0_sgpr1 846 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 847 ; GFX7: [[S_LOAD_DWORD_IMM_ci:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM_ci [[COPY]], 256, 0, 0 :: (load 4, addrspace 4) 848 ; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]] 849 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1024 850 ; GFX8: liveins: $sgpr0_sgpr1 851 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 852 ; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1024, 0, 0 :: (load 4, addrspace 4) 853 ; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 854 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1024 855 ; GFX10: liveins: $sgpr0_sgpr1 856 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 857 ; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1024, 0, 0 :: (load 4, addrspace 4) 858 ; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 859 %0:sgpr(p4) = COPY $sgpr0_sgpr1 860 %1:sgpr(s64) = G_CONSTANT i64 1024 861 %2:sgpr(p4) = G_PTR_ADD %0, %1 862 %3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4) 863 $sgpr0 = COPY %3 864 865... 866 867--- 868 869name: load_constant_s32_from_4_gep_1048575 870legalized: true 871regBankSelected: true 872tracksRegLiveness: true 873 874body: | 875 bb.0: 876 liveins: $sgpr0_sgpr1 877 878 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048575 879 ; GFX6: liveins: $sgpr0_sgpr1 880 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 881 ; GFX6: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575 882 ; GFX6: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4) 883 ; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]] 884 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1048575 885 ; GFX7: liveins: $sgpr0_sgpr1 886 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 887 ; GFX7: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575 888 ; GFX7: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4) 889 ; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]] 890 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1048575 891 ; GFX8: liveins: $sgpr0_sgpr1 892 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 893 ; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], 1048575, 0, 0 :: (load 4, addrspace 4) 894 ; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 895 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1048575 896 ; GFX10: liveins: $sgpr0_sgpr1 897 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 898 ; GFX10: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048575 899 ; GFX10: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4) 900 ; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]] 901 %0:sgpr(p4) = COPY $sgpr0_sgpr1 902 %1:sgpr(s64) = G_CONSTANT i64 1048575 903 %2:sgpr(p4) = G_PTR_ADD %0, %1 904 %3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4) 905 $sgpr0 = COPY %3 906 907... 908 909--- 910 911name: load_constant_s32_from_4_gep_1048576 912legalized: true 913regBankSelected: true 914tracksRegLiveness: true 915 916body: | 917 bb.0: 918 liveins: $sgpr0_sgpr1 919 920 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1048576 921 ; GFX6: liveins: $sgpr0_sgpr1 922 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 923 ; GFX6: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576 924 ; GFX6: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4) 925 ; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]] 926 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1048576 927 ; GFX7: liveins: $sgpr0_sgpr1 928 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 929 ; GFX7: [[S_LOAD_DWORD_IMM_ci:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM_ci [[COPY]], 262144, 0, 0 :: (load 4, addrspace 4) 930 ; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM_ci]] 931 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1048576 932 ; GFX8: liveins: $sgpr0_sgpr1 933 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 934 ; GFX8: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576 935 ; GFX8: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4) 936 ; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]] 937 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1048576 938 ; GFX10: liveins: $sgpr0_sgpr1 939 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 940 ; GFX10: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1048576 941 ; GFX10: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4) 942 ; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]] 943 %0:sgpr(p4) = COPY $sgpr0_sgpr1 944 %1:sgpr(s64) = G_CONSTANT i64 1048576 945 %2:sgpr(p4) = G_PTR_ADD %0, %1 946 %3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4) 947 $sgpr0 = COPY %3 948 949... 950 951--- 952 953name: load_constant_s32_from_4_gep_1073741823 954legalized: true 955regBankSelected: true 956tracksRegLiveness: true 957 958body: | 959 bb.0: 960 liveins: $sgpr0_sgpr1 961 962 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_1073741823 963 ; GFX6: liveins: $sgpr0_sgpr1 964 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 965 ; GFX6: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823 966 ; GFX6: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4) 967 ; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]] 968 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_1073741823 969 ; GFX7: liveins: $sgpr0_sgpr1 970 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 971 ; GFX7: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823 972 ; GFX7: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4) 973 ; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]] 974 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_1073741823 975 ; GFX8: liveins: $sgpr0_sgpr1 976 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 977 ; GFX8: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823 978 ; GFX8: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4) 979 ; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]] 980 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_1073741823 981 ; GFX10: liveins: $sgpr0_sgpr1 982 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 983 ; GFX10: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 1073741823 984 ; GFX10: [[S_LOAD_DWORD_SGPR:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_SGPR [[COPY]], [[S_MOV_B32_]], 0, 0 :: (load 4, addrspace 4) 985 ; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_SGPR]] 986 %0:sgpr(p4) = COPY $sgpr0_sgpr1 987 %1:sgpr(s64) = G_CONSTANT i64 1073741823 988 %2:sgpr(p4) = G_PTR_ADD %0, %1 989 %3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4) 990 $sgpr0 = COPY %3 991 992... 993 994--- 995 996name: load_constant_s32_from_4_gep_negative_1 997legalized: true 998regBankSelected: true 999tracksRegLiveness: true 1000 1001body: | 1002 bb.0: 1003 liveins: $sgpr0_sgpr1 1004 1005 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_negative_1 1006 ; GFX6: liveins: $sgpr0_sgpr1 1007 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 1008 ; GFX6: [[S_MOV_B64_:%[0-9]+]]:sreg_64 = S_MOV_B64 -1 1009 ; GFX6: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 1010 ; GFX6: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub0 1011 ; GFX6: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 1012 ; GFX6: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub1 1013 ; GFX6: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc 1014 ; GFX6: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc 1015 ; GFX6: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 1016 ; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0, 0 :: (load 4, addrspace 4) 1017 ; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 1018 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_negative_1 1019 ; GFX7: liveins: $sgpr0_sgpr1 1020 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 1021 ; GFX7: [[S_MOV_B64_:%[0-9]+]]:sreg_64 = S_MOV_B64 -1 1022 ; GFX7: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 1023 ; GFX7: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub0 1024 ; GFX7: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 1025 ; GFX7: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub1 1026 ; GFX7: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc 1027 ; GFX7: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc 1028 ; GFX7: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 1029 ; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0, 0 :: (load 4, addrspace 4) 1030 ; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 1031 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_negative_1 1032 ; GFX8: liveins: $sgpr0_sgpr1 1033 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 1034 ; GFX8: [[S_MOV_B64_:%[0-9]+]]:sreg_64 = S_MOV_B64 -1 1035 ; GFX8: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 1036 ; GFX8: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub0 1037 ; GFX8: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 1038 ; GFX8: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[S_MOV_B64_]].sub1 1039 ; GFX8: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc 1040 ; GFX8: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc 1041 ; GFX8: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 1042 ; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE]], 0, 0, 0 :: (load 4, addrspace 4) 1043 ; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 1044 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_negative_1 1045 ; GFX10: liveins: $sgpr0_sgpr1 1046 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 1047 ; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], -1, 0, 0 :: (load 4, addrspace 4) 1048 ; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 1049 %0:sgpr(p4) = COPY $sgpr0_sgpr1 1050 %1:sgpr(s64) = G_CONSTANT i64 -1 1051 %2:sgpr(p4) = G_PTR_ADD %0, %1 1052 %3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4) 1053 $sgpr0 = COPY %3 1054 1055... 1056 1057--- 1058 1059name: load_constant_s32_from_4_gep_negative_524288 1060legalized: true 1061regBankSelected: true 1062tracksRegLiveness: true 1063 1064body: | 1065 bb.0: 1066 liveins: $sgpr0_sgpr1 1067 1068 ; GFX6-LABEL: name: load_constant_s32_from_4_gep_negative_524288 1069 ; GFX6: liveins: $sgpr0_sgpr1 1070 ; GFX6: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 1071 ; GFX6: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 4294443008 1072 ; GFX6: [[S_MOV_B32_1:%[0-9]+]]:sreg_32 = S_MOV_B32 -1 1073 ; GFX6: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[S_MOV_B32_]], %subreg.sub0, [[S_MOV_B32_1]], %subreg.sub1 1074 ; GFX6: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 1075 ; GFX6: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub0 1076 ; GFX6: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 1077 ; GFX6: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub1 1078 ; GFX6: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc 1079 ; GFX6: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc 1080 ; GFX6: [[REG_SEQUENCE1:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 1081 ; GFX6: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE1]], 0, 0, 0 :: (load 4, addrspace 4) 1082 ; GFX6: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 1083 ; GFX7-LABEL: name: load_constant_s32_from_4_gep_negative_524288 1084 ; GFX7: liveins: $sgpr0_sgpr1 1085 ; GFX7: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 1086 ; GFX7: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 4294443008 1087 ; GFX7: [[S_MOV_B32_1:%[0-9]+]]:sreg_32 = S_MOV_B32 -1 1088 ; GFX7: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[S_MOV_B32_]], %subreg.sub0, [[S_MOV_B32_1]], %subreg.sub1 1089 ; GFX7: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 1090 ; GFX7: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub0 1091 ; GFX7: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 1092 ; GFX7: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub1 1093 ; GFX7: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc 1094 ; GFX7: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc 1095 ; GFX7: [[REG_SEQUENCE1:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 1096 ; GFX7: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE1]], 0, 0, 0 :: (load 4, addrspace 4) 1097 ; GFX7: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 1098 ; GFX8-LABEL: name: load_constant_s32_from_4_gep_negative_524288 1099 ; GFX8: liveins: $sgpr0_sgpr1 1100 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 1101 ; GFX8: [[S_MOV_B32_:%[0-9]+]]:sreg_32 = S_MOV_B32 4294443008 1102 ; GFX8: [[S_MOV_B32_1:%[0-9]+]]:sreg_32 = S_MOV_B32 -1 1103 ; GFX8: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[S_MOV_B32_]], %subreg.sub0, [[S_MOV_B32_1]], %subreg.sub1 1104 ; GFX8: [[COPY1:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub0 1105 ; GFX8: [[COPY2:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub0 1106 ; GFX8: [[COPY3:%[0-9]+]]:sreg_32 = COPY [[COPY]].sub1 1107 ; GFX8: [[COPY4:%[0-9]+]]:sreg_32 = COPY [[REG_SEQUENCE]].sub1 1108 ; GFX8: [[S_ADD_U32_:%[0-9]+]]:sreg_32 = S_ADD_U32 [[COPY1]], [[COPY2]], implicit-def $scc 1109 ; GFX8: [[S_ADDC_U32_:%[0-9]+]]:sreg_32 = S_ADDC_U32 [[COPY3]], [[COPY4]], implicit-def $scc, implicit $scc 1110 ; GFX8: [[REG_SEQUENCE1:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[S_ADD_U32_]], %subreg.sub0, [[S_ADDC_U32_]], %subreg.sub1 1111 ; GFX8: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[REG_SEQUENCE1]], 0, 0, 0 :: (load 4, addrspace 4) 1112 ; GFX8: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 1113 ; GFX10-LABEL: name: load_constant_s32_from_4_gep_negative_524288 1114 ; GFX10: liveins: $sgpr0_sgpr1 1115 ; GFX10: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 1116 ; GFX10: [[S_LOAD_DWORD_IMM:%[0-9]+]]:sreg_32_xm0_xexec = S_LOAD_DWORD_IMM [[COPY]], -524288, 0, 0 :: (load 4, addrspace 4) 1117 ; GFX10: $sgpr0 = COPY [[S_LOAD_DWORD_IMM]] 1118 %0:sgpr(p4) = COPY $sgpr0_sgpr1 1119 %1:sgpr(s64) = G_CONSTANT i64 -524288 1120 %2:sgpr(p4) = G_PTR_ADD %0, %1 1121 %3:sgpr(s32) = G_LOAD %2 :: (load 4, align 4, addrspace 4) 1122 $sgpr0 = COPY %3 1123 1124... 1125