Alexander Timofeev | 982aee6 | 2017-07-04 17:32:00 +0000 | [diff] [blame] | 1 | ; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck %s |
Stanislav Mekhanoshin | 8e45acf | 2017-03-17 23:56:58 +0000 | [diff] [blame] | 2 | ; CHECK-DAG: flat_load_dwordx4 |
| 3 | ; CHECK-DAG: flat_load_dwordx4 |
| 4 | ; CHECK-DAG: flat_load_dwordx4 |
| 5 | ; CHECK-DAG: flat_load_dwordx4 |
| 6 | ; CHECK-DAG: ds_write2_b32 |
| 7 | ; CHECK-DAG: ds_write2_b32 |
| 8 | ; CHECK-DAG: ds_write2_b32 |
| 9 | ; CHECK-DAG: ds_write2_b32 |
| 10 | ; CHECK-DAG: ds_write2_b32 |
| 11 | ; CHECK-DAG: ds_write2_b32 |
| 12 | ; CHECK-DAG: ds_write2_b32 |
| 13 | ; CHECK-DAG: ds_write2_b32 |
| 14 | |
Matt Arsenault | 3dbeefa | 2017-03-21 21:39:51 +0000 | [diff] [blame] | 15 | define amdgpu_kernel void @vectorize_global_local(i32 addrspace(1)* nocapture readonly %arg, i32 addrspace(3)* nocapture %arg1) { |
Stanislav Mekhanoshin | 8e45acf | 2017-03-17 23:56:58 +0000 | [diff] [blame] | 16 | bb: |
| 17 | %tmp = load i32, i32 addrspace(1)* %arg, align 4 |
| 18 | store i32 %tmp, i32 addrspace(3)* %arg1, align 4 |
| 19 | %tmp2 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 1 |
| 20 | %tmp3 = load i32, i32 addrspace(1)* %tmp2, align 4 |
| 21 | %tmp4 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 1 |
| 22 | store i32 %tmp3, i32 addrspace(3)* %tmp4, align 4 |
| 23 | %tmp5 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 2 |
| 24 | %tmp6 = load i32, i32 addrspace(1)* %tmp5, align 4 |
| 25 | %tmp7 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 2 |
| 26 | store i32 %tmp6, i32 addrspace(3)* %tmp7, align 4 |
| 27 | %tmp8 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 3 |
| 28 | %tmp9 = load i32, i32 addrspace(1)* %tmp8, align 4 |
| 29 | %tmp10 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 3 |
| 30 | store i32 %tmp9, i32 addrspace(3)* %tmp10, align 4 |
| 31 | %tmp11 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 4 |
| 32 | %tmp12 = load i32, i32 addrspace(1)* %tmp11, align 4 |
| 33 | %tmp13 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 4 |
| 34 | store i32 %tmp12, i32 addrspace(3)* %tmp13, align 4 |
| 35 | %tmp14 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 5 |
| 36 | %tmp15 = load i32, i32 addrspace(1)* %tmp14, align 4 |
| 37 | %tmp16 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 5 |
| 38 | store i32 %tmp15, i32 addrspace(3)* %tmp16, align 4 |
| 39 | %tmp17 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 6 |
| 40 | %tmp18 = load i32, i32 addrspace(1)* %tmp17, align 4 |
| 41 | %tmp19 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 6 |
| 42 | store i32 %tmp18, i32 addrspace(3)* %tmp19, align 4 |
| 43 | %tmp20 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 7 |
| 44 | %tmp21 = load i32, i32 addrspace(1)* %tmp20, align 4 |
| 45 | %tmp22 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 7 |
| 46 | store i32 %tmp21, i32 addrspace(3)* %tmp22, align 4 |
| 47 | %tmp23 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 8 |
| 48 | %tmp24 = load i32, i32 addrspace(1)* %tmp23, align 4 |
| 49 | %tmp25 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 8 |
| 50 | store i32 %tmp24, i32 addrspace(3)* %tmp25, align 4 |
| 51 | %tmp26 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 9 |
| 52 | %tmp27 = load i32, i32 addrspace(1)* %tmp26, align 4 |
| 53 | %tmp28 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 9 |
| 54 | store i32 %tmp27, i32 addrspace(3)* %tmp28, align 4 |
| 55 | %tmp29 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 10 |
| 56 | %tmp30 = load i32, i32 addrspace(1)* %tmp29, align 4 |
| 57 | %tmp31 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 10 |
| 58 | store i32 %tmp30, i32 addrspace(3)* %tmp31, align 4 |
| 59 | %tmp32 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 11 |
| 60 | %tmp33 = load i32, i32 addrspace(1)* %tmp32, align 4 |
| 61 | %tmp34 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 11 |
| 62 | store i32 %tmp33, i32 addrspace(3)* %tmp34, align 4 |
| 63 | %tmp35 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 12 |
| 64 | %tmp36 = load i32, i32 addrspace(1)* %tmp35, align 4 |
| 65 | %tmp37 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 12 |
| 66 | store i32 %tmp36, i32 addrspace(3)* %tmp37, align 4 |
| 67 | %tmp38 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 13 |
| 68 | %tmp39 = load i32, i32 addrspace(1)* %tmp38, align 4 |
| 69 | %tmp40 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 13 |
| 70 | store i32 %tmp39, i32 addrspace(3)* %tmp40, align 4 |
| 71 | %tmp41 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 14 |
| 72 | %tmp42 = load i32, i32 addrspace(1)* %tmp41, align 4 |
| 73 | %tmp43 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 14 |
| 74 | store i32 %tmp42, i32 addrspace(3)* %tmp43, align 4 |
| 75 | %tmp44 = getelementptr inbounds i32, i32 addrspace(1)* %arg, i64 15 |
| 76 | %tmp45 = load i32, i32 addrspace(1)* %tmp44, align 4 |
| 77 | %tmp46 = getelementptr inbounds i32, i32 addrspace(3)* %arg1, i32 15 |
| 78 | store i32 %tmp45, i32 addrspace(3)* %tmp46, align 4 |
| 79 | ret void |
| 80 | } |