Matt Arsenault | d1097a3 | 2016-06-02 19:54:26 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s |
| 2 | ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s |
| 3 | ; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s |
| 4 | |
| 5 | ; FUNC-LABEL: {{^}}local_load_i16: |
| 6 | ; GCN: ds_read_u16 v{{[0-9]+}} |
| 7 | |
| 8 | ; EG: LDS_USHORT_READ_RET |
| 9 | define void @local_load_i16(i16 addrspace(3)* %out, i16 addrspace(3)* %in) { |
| 10 | entry: |
| 11 | %ld = load i16, i16 addrspace(3)* %in |
| 12 | store i16 %ld, i16 addrspace(3)* %out |
| 13 | ret void |
| 14 | } |
| 15 | |
| 16 | ; FUNC-LABEL: {{^}}local_load_v2i16: |
| 17 | ; GCN: ds_read_b32 |
| 18 | |
| 19 | ; EG: LDS_READ_RET |
| 20 | define void @local_load_v2i16(<2 x i16> addrspace(3)* %out, <2 x i16> addrspace(3)* %in) { |
| 21 | entry: |
| 22 | %ld = load <2 x i16>, <2 x i16> addrspace(3)* %in |
| 23 | store <2 x i16> %ld, <2 x i16> addrspace(3)* %out |
| 24 | ret void |
| 25 | } |
| 26 | |
| 27 | ; FUNC-LABEL: {{^}}local_load_v3i16: |
| 28 | ; GCN: ds_read_b64 |
| 29 | ; GCN-DAG: ds_write_b32 |
| 30 | ; GCN-DAG: ds_write_b16 |
| 31 | |
| 32 | ; EG-DAG: LDS_USHORT_READ_RET |
| 33 | ; EG-DAG: LDS_READ_RET |
| 34 | define void @local_load_v3i16(<3 x i16> addrspace(3)* %out, <3 x i16> addrspace(3)* %in) { |
| 35 | entry: |
| 36 | %ld = load <3 x i16>, <3 x i16> addrspace(3)* %in |
| 37 | store <3 x i16> %ld, <3 x i16> addrspace(3)* %out |
| 38 | ret void |
| 39 | } |
| 40 | |
| 41 | ; FUNC-LABEL: {{^}}local_load_v4i16: |
| 42 | ; GCN: ds_read_b64 |
| 43 | |
| 44 | ; EG: LDS_READ_RET |
| 45 | ; EG: LDS_READ_RET |
| 46 | define void @local_load_v4i16(<4 x i16> addrspace(3)* %out, <4 x i16> addrspace(3)* %in) { |
| 47 | entry: |
| 48 | %ld = load <4 x i16>, <4 x i16> addrspace(3)* %in |
| 49 | store <4 x i16> %ld, <4 x i16> addrspace(3)* %out |
| 50 | ret void |
| 51 | } |
| 52 | |
| 53 | ; FUNC-LABEL: {{^}}local_load_v8i16: |
| 54 | ; GCN: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:1{{$}} |
| 55 | |
| 56 | ; EG: LDS_READ_RET |
| 57 | ; EG: LDS_READ_RET |
| 58 | ; EG: LDS_READ_RET |
| 59 | ; EG: LDS_READ_RET |
| 60 | define void @local_load_v8i16(<8 x i16> addrspace(3)* %out, <8 x i16> addrspace(3)* %in) { |
| 61 | entry: |
| 62 | %ld = load <8 x i16>, <8 x i16> addrspace(3)* %in |
| 63 | store <8 x i16> %ld, <8 x i16> addrspace(3)* %out |
| 64 | ret void |
| 65 | } |
| 66 | |
| 67 | ; FUNC-LABEL: {{^}}local_load_v16i16: |
| 68 | ; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:3 offset1:2{{$}} |
| 69 | ; GCN-DAG: ds_read2_b64 v{{\[[0-9]+:[0-9]+\]}}, v{{[0-9]+}} offset0:1{{$}} |
| 70 | |
| 71 | |
| 72 | ; EG: LDS_READ_RET |
| 73 | ; EG: LDS_READ_RET |
| 74 | ; EG: LDS_READ_RET |
| 75 | ; EG: LDS_READ_RET |
| 76 | |
| 77 | ; EG: LDS_READ_RET |
| 78 | ; EG: LDS_READ_RET |
| 79 | ; EG: LDS_READ_RET |
| 80 | ; EG: LDS_READ_RET |
| 81 | define void @local_load_v16i16(<16 x i16> addrspace(3)* %out, <16 x i16> addrspace(3)* %in) { |
| 82 | entry: |
| 83 | %ld = load <16 x i16>, <16 x i16> addrspace(3)* %in |
| 84 | store <16 x i16> %ld, <16 x i16> addrspace(3)* %out |
| 85 | ret void |
| 86 | } |
| 87 | |
| 88 | ; FUNC-LABEL: {{^}}local_zextload_i16_to_i32: |
| 89 | ; GCN: ds_read_u16 |
| 90 | ; GCN: ds_write_b32 |
| 91 | |
| 92 | ; EG: LDS_USHORT_READ_RET |
| 93 | define void @local_zextload_i16_to_i32(i32 addrspace(3)* %out, i16 addrspace(3)* %in) #0 { |
| 94 | %a = load i16, i16 addrspace(3)* %in |
| 95 | %ext = zext i16 %a to i32 |
| 96 | store i32 %ext, i32 addrspace(3)* %out |
| 97 | ret void |
| 98 | } |
| 99 | |
| 100 | ; FUNC-LABEL: {{^}}local_sextload_i16_to_i32: |
| 101 | ; GCN-NOT: s_wqm_b64 |
| 102 | ; GCN: s_mov_b32 m0 |
| 103 | ; GCN: ds_read_i16 |
| 104 | |
| 105 | ; EG: LDS_USHORT_READ_RET |
| 106 | ; EG: BFE_INT |
| 107 | define void @local_sextload_i16_to_i32(i32 addrspace(3)* %out, i16 addrspace(3)* %in) #0 { |
| 108 | %a = load i16, i16 addrspace(3)* %in |
| 109 | %ext = sext i16 %a to i32 |
| 110 | store i32 %ext, i32 addrspace(3)* %out |
| 111 | ret void |
| 112 | } |
| 113 | |
| 114 | ; FUNC-LABEL: {{^}}local_zextload_v1i16_to_v1i32: |
| 115 | ; GCN: ds_read_u16 |
| 116 | define void @local_zextload_v1i16_to_v1i32(<1 x i32> addrspace(3)* %out, <1 x i16> addrspace(3)* %in) #0 { |
| 117 | %load = load <1 x i16>, <1 x i16> addrspace(3)* %in |
| 118 | %ext = zext <1 x i16> %load to <1 x i32> |
| 119 | store <1 x i32> %ext, <1 x i32> addrspace(3)* %out |
| 120 | ret void |
| 121 | } |
| 122 | |
| 123 | ; FUNC-LABEL: {{^}}local_sextload_v1i16_to_v1i32: |
| 124 | ; GCN: ds_read_i16 |
| 125 | define void @local_sextload_v1i16_to_v1i32(<1 x i32> addrspace(3)* %out, <1 x i16> addrspace(3)* %in) #0 { |
| 126 | %load = load <1 x i16>, <1 x i16> addrspace(3)* %in |
| 127 | %ext = sext <1 x i16> %load to <1 x i32> |
| 128 | store <1 x i32> %ext, <1 x i32> addrspace(3)* %out |
| 129 | ret void |
| 130 | } |
| 131 | |
| 132 | ; FUNC-LABEL: {{^}}local_zextload_v2i16_to_v2i32: |
| 133 | ; GCN-NOT: s_wqm_b64 |
| 134 | ; GCN: s_mov_b32 m0 |
| 135 | ; GCN: ds_read_u16 |
| 136 | ; GCN: ds_read_u16 |
| 137 | |
| 138 | ; EG: LDS_USHORT_READ_RET |
| 139 | ; EG: LDS_USHORT_READ_RET |
| 140 | define void @local_zextload_v2i16_to_v2i32(<2 x i32> addrspace(3)* %out, <2 x i16> addrspace(3)* %in) #0 { |
| 141 | %load = load <2 x i16>, <2 x i16> addrspace(3)* %in |
| 142 | %ext = zext <2 x i16> %load to <2 x i32> |
| 143 | store <2 x i32> %ext, <2 x i32> addrspace(3)* %out |
| 144 | ret void |
| 145 | } |
| 146 | |
| 147 | ; FUNC-LABEL: {{^}}local_sextload_v2i16_to_v2i32: |
| 148 | ; GCN-NOT: s_wqm_b64 |
| 149 | ; GCN: s_mov_b32 m0 |
| 150 | ; GCN: ds_read_i16 |
| 151 | ; GCN: ds_read_i16 |
| 152 | |
| 153 | ; EG-DAG: LDS_USHORT_READ_RET |
| 154 | ; EG-DAG: LDS_USHORT_READ_RET |
| 155 | ; EG-DAG: BFE_INT |
| 156 | ; EG-DAG: BFE_INT |
| 157 | define void @local_sextload_v2i16_to_v2i32(<2 x i32> addrspace(3)* %out, <2 x i16> addrspace(3)* %in) #0 { |
| 158 | %load = load <2 x i16>, <2 x i16> addrspace(3)* %in |
| 159 | %ext = sext <2 x i16> %load to <2 x i32> |
| 160 | store <2 x i32> %ext, <2 x i32> addrspace(3)* %out |
| 161 | ret void |
| 162 | } |
| 163 | |
| 164 | ; FUNC-LABEL: {{^}}local_local_zextload_v3i16_to_v3i32: |
| 165 | ; GCN: ds_read_b64 |
| 166 | ; GCN-DAG: ds_write_b32 |
| 167 | ; GCN-DAG: ds_write_b64 |
| 168 | define void @local_local_zextload_v3i16_to_v3i32(<3 x i32> addrspace(3)* %out, <3 x i16> addrspace(3)* %in) { |
| 169 | entry: |
| 170 | %ld = load <3 x i16>, <3 x i16> addrspace(3)* %in |
| 171 | %ext = zext <3 x i16> %ld to <3 x i32> |
| 172 | store <3 x i32> %ext, <3 x i32> addrspace(3)* %out |
| 173 | ret void |
| 174 | } |
| 175 | |
| 176 | ; FUNC-LABEL: {{^}}local_local_sextload_v3i16_to_v3i32: |
| 177 | ; GCN: ds_read_b64 |
| 178 | ; GCN-DAG: ds_write_b32 |
| 179 | ; GCN-DAG: ds_write_b64 |
| 180 | define void @local_local_sextload_v3i16_to_v3i32(<3 x i32> addrspace(3)* %out, <3 x i16> addrspace(3)* %in) { |
| 181 | entry: |
| 182 | %ld = load <3 x i16>, <3 x i16> addrspace(3)* %in |
| 183 | %ext = sext <3 x i16> %ld to <3 x i32> |
| 184 | store <3 x i32> %ext, <3 x i32> addrspace(3)* %out |
| 185 | ret void |
| 186 | } |
| 187 | |
| 188 | ; FUNC-LABEL: {{^}}local_local_zextload_v4i16_to_v4i32: |
| 189 | ; GCN-NOT: s_wqm_b64 |
| 190 | ; GCN: s_mov_b32 m0 |
| 191 | ; GCN: ds_read_u16 |
| 192 | ; GCN: ds_read_u16 |
| 193 | ; GCN: ds_read_u16 |
| 194 | ; GCN: ds_read_u16 |
| 195 | |
| 196 | ; EG: LDS_USHORT_READ_RET |
| 197 | ; EG: LDS_USHORT_READ_RET |
| 198 | ; EG: LDS_USHORT_READ_RET |
| 199 | ; EG: LDS_USHORT_READ_RET |
| 200 | define void @local_local_zextload_v4i16_to_v4i32(<4 x i32> addrspace(3)* %out, <4 x i16> addrspace(3)* %in) #0 { |
| 201 | %load = load <4 x i16>, <4 x i16> addrspace(3)* %in |
| 202 | %ext = zext <4 x i16> %load to <4 x i32> |
| 203 | store <4 x i32> %ext, <4 x i32> addrspace(3)* %out |
| 204 | ret void |
| 205 | } |
| 206 | |
| 207 | ; FUNC-LABEL: {{^}}local_sextload_v4i16_to_v4i32: |
| 208 | ; GCN-NOT: s_wqm_b64 |
| 209 | ; GCN: s_mov_b32 m0 |
| 210 | ; GCN: ds_read_i16 |
| 211 | ; GCN: ds_read_i16 |
| 212 | ; GCN: ds_read_i16 |
| 213 | ; GCN: ds_read_i16 |
| 214 | |
| 215 | ; EG-DAG: LDS_USHORT_READ_RET |
| 216 | ; EG-DAG: LDS_USHORT_READ_RET |
| 217 | ; EG-DAG: LDS_USHORT_READ_RET |
| 218 | ; EG-DAG: LDS_USHORT_READ_RET |
| 219 | ; EG-DAG: BFE_INT |
| 220 | ; EG-DAG: BFE_INT |
| 221 | ; EG-DAG: BFE_INT |
| 222 | ; EG-DAG: BFE_INT |
| 223 | define void @local_sextload_v4i16_to_v4i32(<4 x i32> addrspace(3)* %out, <4 x i16> addrspace(3)* %in) #0 { |
| 224 | %load = load <4 x i16>, <4 x i16> addrspace(3)* %in |
| 225 | %ext = sext <4 x i16> %load to <4 x i32> |
| 226 | store <4 x i32> %ext, <4 x i32> addrspace(3)* %out |
| 227 | ret void |
| 228 | } |
| 229 | |
| 230 | ; FUNC-LABEL: {{^}}local_zextload_v8i16_to_v8i32: |
| 231 | ; GCN: ds_read_u16 |
| 232 | ; GCN: ds_read_u16 |
| 233 | ; GCN: ds_read_u16 |
| 234 | ; GCN: ds_read_u16 |
| 235 | ; GCN: ds_read_u16 |
| 236 | ; GCN: ds_read_u16 |
| 237 | ; GCN: ds_read_u16 |
| 238 | ; GCN: ds_read_u16 |
| 239 | define void @local_zextload_v8i16_to_v8i32(<8 x i32> addrspace(3)* %out, <8 x i16> addrspace(3)* %in) #0 { |
| 240 | %load = load <8 x i16>, <8 x i16> addrspace(3)* %in |
| 241 | %ext = zext <8 x i16> %load to <8 x i32> |
| 242 | store <8 x i32> %ext, <8 x i32> addrspace(3)* %out |
| 243 | ret void |
| 244 | } |
| 245 | |
| 246 | ; FUNC-LABEL: {{^}}local_sextload_v8i16_to_v8i32: |
| 247 | ; GCN: ds_read_i16 |
| 248 | ; GCN: ds_read_i16 |
| 249 | ; GCN: ds_read_i16 |
| 250 | ; GCN: ds_read_i16 |
| 251 | ; GCN: ds_read_i16 |
| 252 | ; GCN: ds_read_i16 |
| 253 | ; GCN: ds_read_i16 |
| 254 | ; GCN: ds_read_i16 |
| 255 | define void @local_sextload_v8i16_to_v8i32(<8 x i32> addrspace(3)* %out, <8 x i16> addrspace(3)* %in) #0 { |
| 256 | %load = load <8 x i16>, <8 x i16> addrspace(3)* %in |
| 257 | %ext = sext <8 x i16> %load to <8 x i32> |
| 258 | store <8 x i32> %ext, <8 x i32> addrspace(3)* %out |
| 259 | ret void |
| 260 | } |
| 261 | |
| 262 | ; FUNC-LABEL: {{^}}local_zextload_v16i16_to_v16i32: |
| 263 | ; GCN: ds_read_u16 |
| 264 | ; GCN: ds_read_u16 |
| 265 | ; GCN: ds_read_u16 |
| 266 | ; GCN: ds_read_u16 |
| 267 | ; GCN: ds_read_u16 |
| 268 | ; GCN: ds_read_u16 |
| 269 | ; GCN: ds_read_u16 |
| 270 | ; GCN: ds_read_u16 |
| 271 | ; GCN: ds_read_u16 |
| 272 | ; GCN: ds_read_u16 |
| 273 | ; GCN: ds_read_u16 |
| 274 | ; GCN: ds_read_u16 |
| 275 | ; GCN: ds_read_u16 |
| 276 | ; GCN: ds_read_u16 |
| 277 | ; GCN: ds_read_u16 |
| 278 | ; GCN: ds_read_u16 |
| 279 | define void @local_zextload_v16i16_to_v16i32(<16 x i32> addrspace(3)* %out, <16 x i16> addrspace(3)* %in) #0 { |
| 280 | %load = load <16 x i16>, <16 x i16> addrspace(3)* %in |
| 281 | %ext = zext <16 x i16> %load to <16 x i32> |
| 282 | store <16 x i32> %ext, <16 x i32> addrspace(3)* %out |
| 283 | ret void |
| 284 | } |
| 285 | |
| 286 | ; FUNC-LABEL: {{^}}local_sextload_v16i16_to_v16i32: |
| 287 | ; GCN: ds_read_i16 |
| 288 | ; GCN: ds_read_i16 |
| 289 | ; GCN: ds_read_i16 |
| 290 | ; GCN: ds_read_i16 |
| 291 | ; GCN: ds_read_i16 |
| 292 | ; GCN: ds_read_i16 |
| 293 | ; GCN: ds_read_i16 |
| 294 | ; GCN: ds_read_i16 |
| 295 | ; GCN: ds_read_i16 |
| 296 | ; GCN: ds_read_i16 |
| 297 | ; GCN: ds_read_i16 |
| 298 | ; GCN: ds_read_i16 |
| 299 | ; GCN: ds_read_i16 |
| 300 | ; GCN: ds_read_i16 |
| 301 | ; GCN: ds_read_i16 |
| 302 | ; GCN: ds_read_i16 |
| 303 | define void @local_sextload_v16i16_to_v16i32(<16 x i32> addrspace(3)* %out, <16 x i16> addrspace(3)* %in) #0 { |
| 304 | %load = load <16 x i16>, <16 x i16> addrspace(3)* %in |
| 305 | %ext = sext <16 x i16> %load to <16 x i32> |
| 306 | store <16 x i32> %ext, <16 x i32> addrspace(3)* %out |
| 307 | ret void |
| 308 | } |
| 309 | |
| 310 | ; FUNC-LABEL: {{^}}local_zextload_v32i16_to_v32i32: |
| 311 | ; GCN: ds_read_u16 |
| 312 | ; GCN: ds_read_u16 |
| 313 | ; GCN: ds_read_u16 |
| 314 | ; GCN: ds_read_u16 |
| 315 | ; GCN: ds_read_u16 |
| 316 | ; GCN: ds_read_u16 |
| 317 | ; GCN: ds_read_u16 |
| 318 | ; GCN: ds_read_u16 |
| 319 | ; GCN: ds_read_u16 |
| 320 | ; GCN: ds_read_u16 |
| 321 | ; GCN: ds_read_u16 |
| 322 | ; GCN: ds_read_u16 |
| 323 | ; GCN: ds_read_u16 |
| 324 | ; GCN: ds_read_u16 |
| 325 | ; GCN: ds_read_u16 |
| 326 | ; GCN: ds_read_u16 |
| 327 | ; GCN: ds_read_u16 |
| 328 | ; GCN: ds_read_u16 |
| 329 | ; GCN: ds_read_u16 |
| 330 | ; GCN: ds_read_u16 |
| 331 | ; GCN: ds_read_u16 |
| 332 | ; GCN: ds_read_u16 |
| 333 | ; GCN: ds_read_u16 |
| 334 | ; GCN: ds_read_u16 |
| 335 | ; GCN: ds_read_u16 |
| 336 | ; GCN: ds_read_u16 |
| 337 | ; GCN: ds_read_u16 |
| 338 | ; GCN: ds_read_u16 |
| 339 | ; GCN: ds_read_u16 |
| 340 | ; GCN: ds_read_u16 |
| 341 | ; GCN: ds_read_u16 |
| 342 | ; GCN: ds_read_u16 |
| 343 | |
| 344 | define void @local_zextload_v32i16_to_v32i32(<32 x i32> addrspace(3)* %out, <32 x i16> addrspace(3)* %in) #0 { |
| 345 | %load = load <32 x i16>, <32 x i16> addrspace(3)* %in |
| 346 | %ext = zext <32 x i16> %load to <32 x i32> |
| 347 | store <32 x i32> %ext, <32 x i32> addrspace(3)* %out |
| 348 | ret void |
| 349 | } |
| 350 | |
| 351 | ; FUNC-LABEL: {{^}}local_sextload_v32i16_to_v32i32: |
| 352 | ; GCN: ds_read_i16 |
| 353 | ; GCN: ds_read_i16 |
| 354 | ; GCN: ds_read_i16 |
| 355 | ; GCN: ds_read_i16 |
| 356 | ; GCN: ds_read_i16 |
| 357 | ; GCN: ds_read_i16 |
| 358 | ; GCN: ds_read_i16 |
| 359 | ; GCN: ds_read_i16 |
| 360 | ; GCN: ds_read_i16 |
| 361 | ; GCN: ds_read_i16 |
| 362 | ; GCN: ds_read_i16 |
| 363 | ; GCN: ds_read_i16 |
| 364 | ; GCN: ds_read_i16 |
| 365 | ; GCN: ds_read_i16 |
| 366 | ; GCN: ds_read_i16 |
| 367 | ; GCN: ds_read_i16 |
| 368 | ; GCN: ds_read_i16 |
| 369 | ; GCN: ds_read_i16 |
| 370 | ; GCN: ds_read_i16 |
| 371 | ; GCN: ds_read_i16 |
| 372 | ; GCN: ds_read_i16 |
| 373 | ; GCN: ds_read_i16 |
| 374 | ; GCN: ds_read_i16 |
| 375 | ; GCN: ds_read_i16 |
| 376 | ; GCN: ds_read_i16 |
| 377 | ; GCN: ds_read_i16 |
| 378 | ; GCN: ds_read_i16 |
| 379 | ; GCN: ds_read_i16 |
| 380 | ; GCN: ds_read_i16 |
| 381 | ; GCN: ds_read_i16 |
| 382 | ; GCN: ds_read_i16 |
| 383 | ; GCN: ds_read_i16 |
| 384 | define void @local_sextload_v32i16_to_v32i32(<32 x i32> addrspace(3)* %out, <32 x i16> addrspace(3)* %in) #0 { |
| 385 | %load = load <32 x i16>, <32 x i16> addrspace(3)* %in |
| 386 | %ext = sext <32 x i16> %load to <32 x i32> |
| 387 | store <32 x i32> %ext, <32 x i32> addrspace(3)* %out |
| 388 | ret void |
| 389 | } |
| 390 | |
| 391 | ; FUNC-LABEL: {{^}}local_zextload_v64i16_to_v64i32: |
| 392 | ; GCN: ds_read_u16 |
| 393 | ; GCN: ds_read_u16 |
| 394 | ; GCN: ds_read_u16 |
| 395 | ; GCN: ds_read_u16 |
| 396 | ; GCN: ds_read_u16 |
| 397 | ; GCN: ds_read_u16 |
| 398 | ; GCN: ds_read_u16 |
| 399 | ; GCN: ds_read_u16 |
| 400 | ; GCN: ds_read_u16 |
| 401 | ; GCN: ds_read_u16 |
| 402 | ; GCN: ds_read_u16 |
| 403 | ; GCN: ds_read_u16 |
| 404 | ; GCN: ds_read_u16 |
| 405 | ; GCN: ds_read_u16 |
| 406 | ; GCN: ds_read_u16 |
| 407 | ; GCN: ds_read_u16 |
| 408 | ; GCN: ds_read_u16 |
| 409 | ; GCN: ds_read_u16 |
| 410 | ; GCN: ds_read_u16 |
| 411 | ; GCN: ds_read_u16 |
| 412 | ; GCN: ds_read_u16 |
| 413 | ; GCN: ds_read_u16 |
| 414 | ; GCN: ds_read_u16 |
| 415 | ; GCN: ds_read_u16 |
| 416 | ; GCN: ds_read_u16 |
| 417 | ; GCN: ds_read_u16 |
| 418 | ; GCN: ds_read_u16 |
| 419 | ; GCN: ds_read_u16 |
| 420 | ; GCN: ds_read_u16 |
| 421 | ; GCN: ds_read_u16 |
| 422 | ; GCN: ds_read_u16 |
| 423 | ; GCN: ds_read_u16 |
| 424 | ; GCN: ds_read_u16 |
| 425 | ; GCN: ds_read_u16 |
| 426 | ; GCN: ds_read_u16 |
| 427 | ; GCN: ds_read_u16 |
| 428 | ; GCN: ds_read_u16 |
| 429 | ; GCN: ds_read_u16 |
| 430 | ; GCN: ds_read_u16 |
| 431 | ; GCN: ds_read_u16 |
| 432 | ; GCN: ds_read_u16 |
| 433 | ; GCN: ds_read_u16 |
| 434 | ; GCN: ds_read_u16 |
| 435 | ; GCN: ds_read_u16 |
| 436 | ; GCN: ds_read_u16 |
| 437 | ; GCN: ds_read_u16 |
| 438 | ; GCN: ds_read_u16 |
| 439 | ; GCN: ds_read_u16 |
| 440 | ; GCN: ds_read_u16 |
| 441 | ; GCN: ds_read_u16 |
| 442 | ; GCN: ds_read_u16 |
| 443 | ; GCN: ds_read_u16 |
| 444 | ; GCN: ds_read_u16 |
| 445 | ; GCN: ds_read_u16 |
| 446 | ; GCN: ds_read_u16 |
| 447 | ; GCN: ds_read_u16 |
| 448 | ; GCN: ds_read_u16 |
| 449 | ; GCN: ds_read_u16 |
| 450 | ; GCN: ds_read_u16 |
| 451 | ; GCN: ds_read_u16 |
| 452 | ; GCN: ds_read_u16 |
| 453 | ; GCN: ds_read_u16 |
| 454 | ; GCN: ds_read_u16 |
| 455 | ; GCN: ds_read_u16 |
| 456 | |
| 457 | define void @local_zextload_v64i16_to_v64i32(<64 x i32> addrspace(3)* %out, <64 x i16> addrspace(3)* %in) #0 { |
| 458 | %load = load <64 x i16>, <64 x i16> addrspace(3)* %in |
| 459 | %ext = zext <64 x i16> %load to <64 x i32> |
| 460 | store <64 x i32> %ext, <64 x i32> addrspace(3)* %out |
| 461 | ret void |
| 462 | } |
| 463 | |
| 464 | ; FUNC-LABEL: {{^}}local_sextload_v64i16_to_v64i32: |
| 465 | define void @local_sextload_v64i16_to_v64i32(<64 x i32> addrspace(3)* %out, <64 x i16> addrspace(3)* %in) #0 { |
| 466 | %load = load <64 x i16>, <64 x i16> addrspace(3)* %in |
| 467 | %ext = sext <64 x i16> %load to <64 x i32> |
| 468 | store <64 x i32> %ext, <64 x i32> addrspace(3)* %out |
| 469 | ret void |
| 470 | } |
| 471 | |
| 472 | ; FUNC-LABEL: {{^}}local_zextload_i16_to_i64: |
| 473 | ; GCN-DAG: ds_read_u16 v[[LO:[0-9]+]], |
| 474 | ; GCN-DAG: v_mov_b32_e32 v[[HI:[0-9]+]], 0{{$}} |
| 475 | |
| 476 | ; GCN: ds_write_b64 v{{[0-9]+}}, v{{\[}}[[LO]]:[[HI]]] |
| 477 | define void @local_zextload_i16_to_i64(i64 addrspace(3)* %out, i16 addrspace(3)* %in) #0 { |
| 478 | %a = load i16, i16 addrspace(3)* %in |
| 479 | %ext = zext i16 %a to i64 |
| 480 | store i64 %ext, i64 addrspace(3)* %out |
| 481 | ret void |
| 482 | } |
| 483 | |
| 484 | ; FUNC-LABEL: {{^}}local_sextload_i16_to_i64: |
| 485 | ; GCN: ds_read_i16 v[[LO:[0-9]+]], |
| 486 | ; GCN-DAG: v_ashrrev_i32_e32 v[[HI:[0-9]+]], 31, v[[LO]] |
| 487 | |
| 488 | ; GCN: ds_write_b64 v{{[0-9]+}}, v{{\[}}[[LO]]:[[HI]]] |
| 489 | define void @local_sextload_i16_to_i64(i64 addrspace(3)* %out, i16 addrspace(3)* %in) #0 { |
| 490 | %a = load i16, i16 addrspace(3)* %in |
| 491 | %ext = sext i16 %a to i64 |
| 492 | store i64 %ext, i64 addrspace(3)* %out |
| 493 | ret void |
| 494 | } |
| 495 | |
| 496 | ; FUNC-LABEL: {{^}}local_zextload_v1i16_to_v1i64: |
| 497 | define void @local_zextload_v1i16_to_v1i64(<1 x i64> addrspace(3)* %out, <1 x i16> addrspace(3)* %in) #0 { |
| 498 | %load = load <1 x i16>, <1 x i16> addrspace(3)* %in |
| 499 | %ext = zext <1 x i16> %load to <1 x i64> |
| 500 | store <1 x i64> %ext, <1 x i64> addrspace(3)* %out |
| 501 | ret void |
| 502 | } |
| 503 | |
| 504 | ; FUNC-LABEL: {{^}}local_sextload_v1i16_to_v1i64: |
| 505 | define void @local_sextload_v1i16_to_v1i64(<1 x i64> addrspace(3)* %out, <1 x i16> addrspace(3)* %in) #0 { |
| 506 | %load = load <1 x i16>, <1 x i16> addrspace(3)* %in |
| 507 | %ext = sext <1 x i16> %load to <1 x i64> |
| 508 | store <1 x i64> %ext, <1 x i64> addrspace(3)* %out |
| 509 | ret void |
| 510 | } |
| 511 | |
| 512 | ; FUNC-LABEL: {{^}}local_zextload_v2i16_to_v2i64: |
| 513 | define void @local_zextload_v2i16_to_v2i64(<2 x i64> addrspace(3)* %out, <2 x i16> addrspace(3)* %in) #0 { |
| 514 | %load = load <2 x i16>, <2 x i16> addrspace(3)* %in |
| 515 | %ext = zext <2 x i16> %load to <2 x i64> |
| 516 | store <2 x i64> %ext, <2 x i64> addrspace(3)* %out |
| 517 | ret void |
| 518 | } |
| 519 | |
| 520 | ; FUNC-LABEL: {{^}}local_sextload_v2i16_to_v2i64: |
| 521 | define void @local_sextload_v2i16_to_v2i64(<2 x i64> addrspace(3)* %out, <2 x i16> addrspace(3)* %in) #0 { |
| 522 | %load = load <2 x i16>, <2 x i16> addrspace(3)* %in |
| 523 | %ext = sext <2 x i16> %load to <2 x i64> |
| 524 | store <2 x i64> %ext, <2 x i64> addrspace(3)* %out |
| 525 | ret void |
| 526 | } |
| 527 | |
| 528 | ; FUNC-LABEL: {{^}}local_zextload_v4i16_to_v4i64: |
| 529 | define void @local_zextload_v4i16_to_v4i64(<4 x i64> addrspace(3)* %out, <4 x i16> addrspace(3)* %in) #0 { |
| 530 | %load = load <4 x i16>, <4 x i16> addrspace(3)* %in |
| 531 | %ext = zext <4 x i16> %load to <4 x i64> |
| 532 | store <4 x i64> %ext, <4 x i64> addrspace(3)* %out |
| 533 | ret void |
| 534 | } |
| 535 | |
| 536 | ; FUNC-LABEL: {{^}}local_sextload_v4i16_to_v4i64: |
| 537 | define void @local_sextload_v4i16_to_v4i64(<4 x i64> addrspace(3)* %out, <4 x i16> addrspace(3)* %in) #0 { |
| 538 | %load = load <4 x i16>, <4 x i16> addrspace(3)* %in |
| 539 | %ext = sext <4 x i16> %load to <4 x i64> |
| 540 | store <4 x i64> %ext, <4 x i64> addrspace(3)* %out |
| 541 | ret void |
| 542 | } |
| 543 | |
| 544 | ; FUNC-LABEL: {{^}}local_zextload_v8i16_to_v8i64: |
| 545 | define void @local_zextload_v8i16_to_v8i64(<8 x i64> addrspace(3)* %out, <8 x i16> addrspace(3)* %in) #0 { |
| 546 | %load = load <8 x i16>, <8 x i16> addrspace(3)* %in |
| 547 | %ext = zext <8 x i16> %load to <8 x i64> |
| 548 | store <8 x i64> %ext, <8 x i64> addrspace(3)* %out |
| 549 | ret void |
| 550 | } |
| 551 | |
| 552 | ; FUNC-LABEL: {{^}}local_sextload_v8i16_to_v8i64: |
| 553 | define void @local_sextload_v8i16_to_v8i64(<8 x i64> addrspace(3)* %out, <8 x i16> addrspace(3)* %in) #0 { |
| 554 | %load = load <8 x i16>, <8 x i16> addrspace(3)* %in |
| 555 | %ext = sext <8 x i16> %load to <8 x i64> |
| 556 | store <8 x i64> %ext, <8 x i64> addrspace(3)* %out |
| 557 | ret void |
| 558 | } |
| 559 | |
| 560 | ; FUNC-LABEL: {{^}}local_zextload_v16i16_to_v16i64: |
| 561 | define void @local_zextload_v16i16_to_v16i64(<16 x i64> addrspace(3)* %out, <16 x i16> addrspace(3)* %in) #0 { |
| 562 | %load = load <16 x i16>, <16 x i16> addrspace(3)* %in |
| 563 | %ext = zext <16 x i16> %load to <16 x i64> |
| 564 | store <16 x i64> %ext, <16 x i64> addrspace(3)* %out |
| 565 | ret void |
| 566 | } |
| 567 | |
| 568 | ; FUNC-LABEL: {{^}}local_sextload_v16i16_to_v16i64: |
| 569 | define void @local_sextload_v16i16_to_v16i64(<16 x i64> addrspace(3)* %out, <16 x i16> addrspace(3)* %in) #0 { |
| 570 | %load = load <16 x i16>, <16 x i16> addrspace(3)* %in |
| 571 | %ext = sext <16 x i16> %load to <16 x i64> |
| 572 | store <16 x i64> %ext, <16 x i64> addrspace(3)* %out |
| 573 | ret void |
| 574 | } |
| 575 | |
| 576 | ; FUNC-LABEL: {{^}}local_zextload_v32i16_to_v32i64: |
| 577 | define void @local_zextload_v32i16_to_v32i64(<32 x i64> addrspace(3)* %out, <32 x i16> addrspace(3)* %in) #0 { |
| 578 | %load = load <32 x i16>, <32 x i16> addrspace(3)* %in |
| 579 | %ext = zext <32 x i16> %load to <32 x i64> |
| 580 | store <32 x i64> %ext, <32 x i64> addrspace(3)* %out |
| 581 | ret void |
| 582 | } |
| 583 | |
| 584 | ; FUNC-LABEL: {{^}}local_sextload_v32i16_to_v32i64: |
| 585 | define void @local_sextload_v32i16_to_v32i64(<32 x i64> addrspace(3)* %out, <32 x i16> addrspace(3)* %in) #0 { |
| 586 | %load = load <32 x i16>, <32 x i16> addrspace(3)* %in |
| 587 | %ext = sext <32 x i16> %load to <32 x i64> |
| 588 | store <32 x i64> %ext, <32 x i64> addrspace(3)* %out |
| 589 | ret void |
| 590 | } |
| 591 | |
| 592 | ; ; XFUNC-LABEL: {{^}}local_zextload_v64i16_to_v64i64: |
| 593 | ; define void @local_zextload_v64i16_to_v64i64(<64 x i64> addrspace(3)* %out, <64 x i16> addrspace(3)* %in) #0 { |
| 594 | ; %load = load <64 x i16>, <64 x i16> addrspace(3)* %in |
| 595 | ; %ext = zext <64 x i16> %load to <64 x i64> |
| 596 | ; store <64 x i64> %ext, <64 x i64> addrspace(3)* %out |
| 597 | ; ret void |
| 598 | ; } |
| 599 | |
| 600 | ; ; XFUNC-LABEL: {{^}}local_sextload_v64i16_to_v64i64: |
| 601 | ; define void @local_sextload_v64i16_to_v64i64(<64 x i64> addrspace(3)* %out, <64 x i16> addrspace(3)* %in) #0 { |
| 602 | ; %load = load <64 x i16>, <64 x i16> addrspace(3)* %in |
| 603 | ; %ext = sext <64 x i16> %load to <64 x i64> |
| 604 | ; store <64 x i64> %ext, <64 x i64> addrspace(3)* %out |
| 605 | ; ret void |
| 606 | ; } |
| 607 | |
| 608 | attributes #0 = { nounwind } |