Tim Renouf | 4f703f5 | 2018-08-21 11:07:10 +0000 | [diff] [blame] | 1 | ;RUN: llc < %s -march=amdgcn -mcpu=verde -verify-machineinstrs | FileCheck %s -check-prefix=CHECK -check-prefix=SICI |
| 2 | ;RUN: llc < %s -march=amdgcn -mcpu=tonga -verify-machineinstrs | FileCheck %s -check-prefix=CHECK -check-prefix=VI |
| 3 | |
| 4 | ;CHECK-LABEL: {{^}}buffer_load: |
| 5 | ;CHECK: buffer_load_dwordx4 v[0:3], off, s[0:3], 0 |
| 6 | ;CHECK: buffer_load_dwordx4 v[4:7], off, s[0:3], 0 glc |
| 7 | ;CHECK: buffer_load_dwordx4 v[8:11], off, s[0:3], 0 slc |
| 8 | ;CHECK: s_waitcnt |
| 9 | define amdgpu_ps {<4 x float>, <4 x float>, <4 x float>} @buffer_load(<4 x i32> inreg) { |
| 10 | main_body: |
| 11 | %data = call <4 x float> @llvm.amdgcn.raw.buffer.load.v4f32(<4 x i32> %0, i32 0, i32 0, i32 0) |
| 12 | %data_glc = call <4 x float> @llvm.amdgcn.raw.buffer.load.v4f32(<4 x i32> %0, i32 0, i32 0, i32 1) |
| 13 | %data_slc = call <4 x float> @llvm.amdgcn.raw.buffer.load.v4f32(<4 x i32> %0, i32 0, i32 0, i32 2) |
| 14 | %r0 = insertvalue {<4 x float>, <4 x float>, <4 x float>} undef, <4 x float> %data, 0 |
| 15 | %r1 = insertvalue {<4 x float>, <4 x float>, <4 x float>} %r0, <4 x float> %data_glc, 1 |
| 16 | %r2 = insertvalue {<4 x float>, <4 x float>, <4 x float>} %r1, <4 x float> %data_slc, 2 |
| 17 | ret {<4 x float>, <4 x float>, <4 x float>} %r2 |
| 18 | } |
| 19 | |
| 20 | ;CHECK-LABEL: {{^}}buffer_load_immoffs: |
| 21 | ;CHECK: buffer_load_dwordx4 v[0:3], off, s[0:3], 0 offset:40 |
| 22 | ;CHECK: s_waitcnt |
| 23 | define amdgpu_ps <4 x float> @buffer_load_immoffs(<4 x i32> inreg) { |
| 24 | main_body: |
| 25 | %data = call <4 x float> @llvm.amdgcn.raw.buffer.load.v4f32(<4 x i32> %0, i32 40, i32 0, i32 0) |
| 26 | ret <4 x float> %data |
| 27 | } |
| 28 | |
| 29 | ;CHECK-LABEL: {{^}}buffer_load_immoffs_large: |
| 30 | ;CHECK: s_movk_i32 [[OFFSET:s[0-9]+]], 0x1ffc |
| 31 | ;CHECK: buffer_load_dwordx4 v[0:3], off, s[0:3], [[OFFSET]] offset:4 |
| 32 | ;CHECK: s_waitcnt |
| 33 | define amdgpu_ps <4 x float> @buffer_load_immoffs_large(<4 x i32> inreg) { |
| 34 | main_body: |
| 35 | %data = call <4 x float> @llvm.amdgcn.raw.buffer.load.v4f32(<4 x i32> %0, i32 4, i32 8188, i32 0) |
| 36 | ret <4 x float> %data |
| 37 | } |
| 38 | |
| 39 | ;CHECK-LABEL: {{^}}buffer_load_ofs: |
| 40 | ;CHECK: buffer_load_dwordx4 v[0:3], v0, s[0:3], 0 offen |
| 41 | ;CHECK: s_waitcnt |
| 42 | define amdgpu_ps <4 x float> @buffer_load_ofs(<4 x i32> inreg, i32) { |
| 43 | main_body: |
| 44 | %data = call <4 x float> @llvm.amdgcn.raw.buffer.load.v4f32(<4 x i32> %0, i32 %1, i32 0, i32 0) |
| 45 | ret <4 x float> %data |
| 46 | } |
| 47 | |
| 48 | ;CHECK-LABEL: {{^}}buffer_load_ofs_imm: |
| 49 | ;CHECK: buffer_load_dwordx4 v[0:3], v0, s[0:3], 0 offen offset:60 |
| 50 | ;CHECK: s_waitcnt |
| 51 | define amdgpu_ps <4 x float> @buffer_load_ofs_imm(<4 x i32> inreg, i32) { |
| 52 | main_body: |
| 53 | %ofs = add i32 %1, 60 |
| 54 | %data = call <4 x float> @llvm.amdgcn.raw.buffer.load.v4f32(<4 x i32> %0, i32 %ofs, i32 0, i32 0) |
| 55 | ret <4 x float> %data |
| 56 | } |
| 57 | |
| 58 | ;CHECK-LABEL: {{^}}buffer_load_x1: |
| 59 | ;CHECK: buffer_load_dword v0, v0, s[0:3], 0 offen |
| 60 | ;CHECK: s_waitcnt |
| 61 | define amdgpu_ps float @buffer_load_x1(<4 x i32> inreg %rsrc, i32 %ofs) { |
| 62 | main_body: |
| 63 | %data = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %ofs, i32 0, i32 0) |
| 64 | ret float %data |
| 65 | } |
| 66 | |
| 67 | ;CHECK-LABEL: {{^}}buffer_load_x2: |
| 68 | ;CHECK: buffer_load_dwordx2 v[0:1], v0, s[0:3], 0 offen |
| 69 | ;CHECK: s_waitcnt |
| 70 | define amdgpu_ps <2 x float> @buffer_load_x2(<4 x i32> inreg %rsrc, i32 %ofs) { |
| 71 | main_body: |
| 72 | %data = call <2 x float> @llvm.amdgcn.raw.buffer.load.v2f32(<4 x i32> %rsrc, i32 %ofs, i32 0, i32 0) |
| 73 | ret <2 x float> %data |
| 74 | } |
| 75 | |
| 76 | ;CHECK-LABEL: {{^}}buffer_load_negative_offset: |
Tim Renouf | a37679d | 2018-10-03 10:29:43 +0000 | [diff] [blame] | 77 | ;CHECK: v_add_{{[iu]}}32_e32 [[VOFS:v[0-9]+]], vcc, -16, v0 |
| 78 | ;CHECK: buffer_load_dwordx4 v[0:3], [[VOFS]], s[0:3], 0 offen |
Tim Renouf | 4f703f5 | 2018-08-21 11:07:10 +0000 | [diff] [blame] | 79 | define amdgpu_ps <4 x float> @buffer_load_negative_offset(<4 x i32> inreg, i32 %ofs) { |
| 80 | main_body: |
| 81 | %ofs.1 = add i32 %ofs, -16 |
| 82 | %data = call <4 x float> @llvm.amdgcn.raw.buffer.load.v4f32(<4 x i32> %0, i32 %ofs.1, i32 0, i32 0) |
| 83 | ret <4 x float> %data |
| 84 | } |
| 85 | |
| 86 | ; SI won't merge ds memory operations, because of the signed offset bug, so |
| 87 | ; we only have check lines for VI. |
| 88 | ; CHECK-LABEL: buffer_load_mmo: |
| 89 | ; VI: v_mov_b32_e32 [[ZERO:v[0-9]+]], 0 |
| 90 | ; VI: ds_write2_b32 v{{[0-9]+}}, [[ZERO]], [[ZERO]] offset1:4 |
| 91 | define amdgpu_ps float @buffer_load_mmo(<4 x i32> inreg %rsrc, float addrspace(3)* %lds) { |
| 92 | entry: |
| 93 | store float 0.0, float addrspace(3)* %lds |
| 94 | %val = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 0, i32 0, i32 0) |
| 95 | %tmp2 = getelementptr float, float addrspace(3)* %lds, i32 4 |
| 96 | store float 0.0, float addrspace(3)* %tmp2 |
| 97 | ret float %val |
| 98 | } |
| 99 | |
Piotr Sobczak | 378131b | 2019-01-02 09:47:41 +0000 | [diff] [blame] | 100 | ;CHECK-LABEL: {{^}}buffer_load_x1_offen_merged_and: |
Tim Renouf | 4f703f5 | 2018-08-21 11:07:10 +0000 | [diff] [blame] | 101 | ;CHECK-NEXT: %bb. |
| 102 | ;CHECK-NEXT: buffer_load_dwordx4 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:4 |
| 103 | ;CHECK-NEXT: buffer_load_dwordx2 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:28 |
| 104 | ;CHECK: s_waitcnt |
Piotr Sobczak | 378131b | 2019-01-02 09:47:41 +0000 | [diff] [blame] | 105 | define amdgpu_ps void @buffer_load_x1_offen_merged_and(<4 x i32> inreg %rsrc, i32 %a) { |
Tim Renouf | 4f703f5 | 2018-08-21 11:07:10 +0000 | [diff] [blame] | 106 | main_body: |
| 107 | %a1 = add i32 %a, 4 |
| 108 | %a2 = add i32 %a, 8 |
| 109 | %a3 = add i32 %a, 12 |
| 110 | %a4 = add i32 %a, 16 |
| 111 | %a5 = add i32 %a, 28 |
| 112 | %a6 = add i32 %a, 32 |
| 113 | %r1 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a1, i32 0, i32 0) |
| 114 | %r2 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a2, i32 0, i32 0) |
| 115 | %r3 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a3, i32 0, i32 0) |
| 116 | %r4 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a4, i32 0, i32 0) |
| 117 | %r5 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a5, i32 0, i32 0) |
| 118 | %r6 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a6, i32 0, i32 0) |
| 119 | call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r1, float %r2, float %r3, float %r4, i1 true, i1 true) |
| 120 | call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r5, float %r6, float undef, float undef, i1 true, i1 true) |
| 121 | ret void |
| 122 | } |
| 123 | |
Piotr Sobczak | 378131b | 2019-01-02 09:47:41 +0000 | [diff] [blame] | 124 | ;CHECK-LABEL: {{^}}buffer_load_x1_offen_merged_or: |
| 125 | ;CHECK-NEXT: %bb. |
| 126 | ;CHECK-NEXT: v_lshlrev_b32_e32 v{{[0-9]}}, 6, v0 |
| 127 | ;CHECK-NEXT: buffer_load_dwordx4 v[{{[0-9]}}:{{[0-9]}}], v{{[0-9]}}, s[0:3], 0 offen offset:4 |
| 128 | ;CHECK-NEXT: buffer_load_dwordx2 v[{{[0-9]}}:{{[0-9]}}], v{{[0-9]}}, s[0:3], 0 offen offset:28 |
| 129 | ;CHECK: s_waitcnt |
| 130 | define amdgpu_ps void @buffer_load_x1_offen_merged_or(<4 x i32> inreg %rsrc, i32 %inp) { |
| 131 | main_body: |
| 132 | %a = shl i32 %inp, 6 |
| 133 | %a1 = or i32 %a, 4 |
| 134 | %a2 = or i32 %a, 8 |
| 135 | %a3 = or i32 %a, 12 |
| 136 | %a4 = or i32 %a, 16 |
| 137 | %a5 = or i32 %a, 28 |
| 138 | %a6 = or i32 %a, 32 |
| 139 | %r1 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a1, i32 0, i32 0) |
| 140 | %r2 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a2, i32 0, i32 0) |
| 141 | %r3 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a3, i32 0, i32 0) |
| 142 | %r4 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a4, i32 0, i32 0) |
| 143 | %r5 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a5, i32 0, i32 0) |
| 144 | %r6 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a6, i32 0, i32 0) |
| 145 | call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r1, float %r2, float %r3, float %r4, i1 true, i1 true) |
| 146 | call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r5, float %r6, float undef, float undef, i1 true, i1 true) |
| 147 | ret void |
| 148 | } |
| 149 | |
Tim Renouf | 4f703f5 | 2018-08-21 11:07:10 +0000 | [diff] [blame] | 150 | ;CHECK-LABEL: {{^}}buffer_load_x1_offen_merged_glc_slc: |
| 151 | ;CHECK-NEXT: %bb. |
| 152 | ;CHECK-NEXT: buffer_load_dwordx2 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:4{{$}} |
| 153 | ;CHECK-NEXT: buffer_load_dwordx2 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:12 glc{{$}} |
| 154 | ;CHECK-NEXT: buffer_load_dwordx2 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:28 glc slc{{$}} |
| 155 | ;CHECK: s_waitcnt |
| 156 | define amdgpu_ps void @buffer_load_x1_offen_merged_glc_slc(<4 x i32> inreg %rsrc, i32 %a) { |
| 157 | main_body: |
| 158 | %a1 = add i32 %a, 4 |
| 159 | %a2 = add i32 %a, 8 |
| 160 | %a3 = add i32 %a, 12 |
| 161 | %a4 = add i32 %a, 16 |
| 162 | %a5 = add i32 %a, 28 |
| 163 | %a6 = add i32 %a, 32 |
| 164 | %r1 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a1, i32 0, i32 0) |
| 165 | %r2 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a2, i32 0, i32 0) |
| 166 | %r3 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a3, i32 0, i32 1) |
| 167 | %r4 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a4, i32 0, i32 1) |
| 168 | %r5 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a5, i32 0, i32 3) |
| 169 | %r6 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 %a6, i32 0, i32 3) |
| 170 | call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r1, float %r2, float %r3, float %r4, i1 true, i1 true) |
| 171 | call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r5, float %r6, float undef, float undef, i1 true, i1 true) |
| 172 | ret void |
| 173 | } |
| 174 | |
Piotr Sobczak | 378131b | 2019-01-02 09:47:41 +0000 | [diff] [blame] | 175 | ;CHECK-LABEL: {{^}}buffer_load_x2_offen_merged_and: |
Tim Renouf | 4f703f5 | 2018-08-21 11:07:10 +0000 | [diff] [blame] | 176 | ;CHECK-NEXT: %bb. |
| 177 | ;CHECK-NEXT: buffer_load_dwordx4 v[{{[0-9]}}:{{[0-9]}}], v0, s[0:3], 0 offen offset:4 |
| 178 | ;CHECK: s_waitcnt |
Piotr Sobczak | 378131b | 2019-01-02 09:47:41 +0000 | [diff] [blame] | 179 | define amdgpu_ps void @buffer_load_x2_offen_merged_and(<4 x i32> inreg %rsrc, i32 %a) { |
Tim Renouf | 4f703f5 | 2018-08-21 11:07:10 +0000 | [diff] [blame] | 180 | main_body: |
| 181 | %a1 = add i32 %a, 4 |
| 182 | %a2 = add i32 %a, 12 |
| 183 | %vr1 = call <2 x float> @llvm.amdgcn.raw.buffer.load.v2f32(<4 x i32> %rsrc, i32 %a1, i32 0, i32 0) |
| 184 | %vr2 = call <2 x float> @llvm.amdgcn.raw.buffer.load.v2f32(<4 x i32> %rsrc, i32 %a2, i32 0, i32 0) |
| 185 | %r1 = extractelement <2 x float> %vr1, i32 0 |
| 186 | %r2 = extractelement <2 x float> %vr1, i32 1 |
| 187 | %r3 = extractelement <2 x float> %vr2, i32 0 |
| 188 | %r4 = extractelement <2 x float> %vr2, i32 1 |
| 189 | call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r1, float %r2, float %r3, float %r4, i1 true, i1 true) |
| 190 | ret void |
| 191 | } |
| 192 | |
Piotr Sobczak | 378131b | 2019-01-02 09:47:41 +0000 | [diff] [blame] | 193 | ;CHECK-LABEL: {{^}}buffer_load_x2_offen_merged_or: |
| 194 | ;CHECK-NEXT: %bb. |
| 195 | ;CHECK-NEXT: v_lshlrev_b32_e32 v{{[0-9]}}, 4, v0 |
| 196 | ;CHECK-NEXT: buffer_load_dwordx4 v[{{[0-9]}}:{{[0-9]}}], v{{[0-9]}}, s[0:3], 0 offen offset:4 |
| 197 | ;CHECK: s_waitcnt |
| 198 | define amdgpu_ps void @buffer_load_x2_offen_merged_or(<4 x i32> inreg %rsrc, i32 %inp) { |
| 199 | main_body: |
| 200 | %a = shl i32 %inp, 4 |
| 201 | %a1 = add i32 %a, 4 |
| 202 | %a2 = add i32 %a, 12 |
| 203 | %vr1 = call <2 x float> @llvm.amdgcn.raw.buffer.load.v2f32(<4 x i32> %rsrc, i32 %a1, i32 0, i32 0) |
| 204 | %vr2 = call <2 x float> @llvm.amdgcn.raw.buffer.load.v2f32(<4 x i32> %rsrc, i32 %a2, i32 0, i32 0) |
| 205 | %r1 = extractelement <2 x float> %vr1, i32 0 |
| 206 | %r2 = extractelement <2 x float> %vr1, i32 1 |
| 207 | %r3 = extractelement <2 x float> %vr2, i32 0 |
| 208 | %r4 = extractelement <2 x float> %vr2, i32 1 |
| 209 | call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r1, float %r2, float %r3, float %r4, i1 true, i1 true) |
| 210 | ret void |
| 211 | } |
| 212 | |
Tim Renouf | 4f703f5 | 2018-08-21 11:07:10 +0000 | [diff] [blame] | 213 | ;CHECK-LABEL: {{^}}buffer_load_x1_offset_merged: |
| 214 | ;CHECK-NEXT: %bb. |
| 215 | ;CHECK-NEXT: buffer_load_dwordx4 v[{{[0-9]}}:{{[0-9]}}], off, s[0:3], 0 offset:4 |
| 216 | ;CHECK-NEXT: buffer_load_dwordx2 v[{{[0-9]}}:{{[0-9]}}], off, s[0:3], 0 offset:28 |
| 217 | ;CHECK: s_waitcnt |
| 218 | define amdgpu_ps void @buffer_load_x1_offset_merged(<4 x i32> inreg %rsrc) { |
| 219 | main_body: |
| 220 | %r1 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 4, i32 0, i32 0) |
| 221 | %r2 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 8, i32 0, i32 0) |
| 222 | %r3 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 12, i32 0, i32 0) |
| 223 | %r4 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 16, i32 0, i32 0) |
| 224 | %r5 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 28, i32 0, i32 0) |
| 225 | %r6 = call float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32> %rsrc, i32 32, i32 0, i32 0) |
| 226 | call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r1, float %r2, float %r3, float %r4, i1 true, i1 true) |
| 227 | call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r5, float %r6, float undef, float undef, i1 true, i1 true) |
| 228 | ret void |
| 229 | } |
| 230 | |
| 231 | ;CHECK-LABEL: {{^}}buffer_load_x2_offset_merged: |
| 232 | ;CHECK-NEXT: %bb. |
| 233 | ;CHECK-NEXT: buffer_load_dwordx4 v[{{[0-9]}}:{{[0-9]}}], off, s[0:3], 0 offset:4 |
| 234 | ;CHECK: s_waitcnt |
| 235 | define amdgpu_ps void @buffer_load_x2_offset_merged(<4 x i32> inreg %rsrc) { |
| 236 | main_body: |
| 237 | %vr1 = call <2 x float> @llvm.amdgcn.raw.buffer.load.v2f32(<4 x i32> %rsrc, i32 4, i32 0, i32 0) |
| 238 | %vr2 = call <2 x float> @llvm.amdgcn.raw.buffer.load.v2f32(<4 x i32> %rsrc, i32 12, i32 0, i32 0) |
| 239 | %r1 = extractelement <2 x float> %vr1, i32 0 |
| 240 | %r2 = extractelement <2 x float> %vr1, i32 1 |
| 241 | %r3 = extractelement <2 x float> %vr2, i32 0 |
| 242 | %r4 = extractelement <2 x float> %vr2, i32 1 |
| 243 | call void @llvm.amdgcn.exp.f32(i32 0, i32 15, float %r1, float %r2, float %r3, float %r4, i1 true, i1 true) |
| 244 | ret void |
| 245 | } |
| 246 | |
Tim Renouf | bb5ee41 | 2018-08-21 11:08:12 +0000 | [diff] [blame] | 247 | ;CHECK-LABEL: {{^}}buffer_load_int: |
| 248 | ;CHECK: buffer_load_dwordx4 v[0:3], off, s[0:3], 0 |
| 249 | ;CHECK: buffer_load_dwordx2 v[4:5], off, s[0:3], 0 glc |
| 250 | ;CHECK: buffer_load_dword v6, off, s[0:3], 0 slc |
| 251 | ;CHECK: s_waitcnt |
| 252 | define amdgpu_ps {<4 x float>, <2 x float>, float} @buffer_load_int(<4 x i32> inreg) { |
| 253 | main_body: |
| 254 | %data = call <4 x i32> @llvm.amdgcn.raw.buffer.load.v4i32(<4 x i32> %0, i32 0, i32 0, i32 0) |
| 255 | %data_glc = call <2 x i32> @llvm.amdgcn.raw.buffer.load.v2i32(<4 x i32> %0, i32 0, i32 0, i32 1) |
| 256 | %data_slc = call i32 @llvm.amdgcn.raw.buffer.load.i32(<4 x i32> %0, i32 0, i32 0, i32 2) |
| 257 | %fdata = bitcast <4 x i32> %data to <4 x float> |
| 258 | %fdata_glc = bitcast <2 x i32> %data_glc to <2 x float> |
| 259 | %fdata_slc = bitcast i32 %data_slc to float |
| 260 | %r0 = insertvalue {<4 x float>, <2 x float>, float} undef, <4 x float> %fdata, 0 |
| 261 | %r1 = insertvalue {<4 x float>, <2 x float>, float} %r0, <2 x float> %fdata_glc, 1 |
| 262 | %r2 = insertvalue {<4 x float>, <2 x float>, float} %r1, float %fdata_slc, 2 |
| 263 | ret {<4 x float>, <2 x float>, float} %r2 |
| 264 | } |
| 265 | |
Tim Renouf | 4f703f5 | 2018-08-21 11:07:10 +0000 | [diff] [blame] | 266 | declare float @llvm.amdgcn.raw.buffer.load.f32(<4 x i32>, i32, i32, i32) #0 |
| 267 | declare <2 x float> @llvm.amdgcn.raw.buffer.load.v2f32(<4 x i32>, i32, i32, i32) #0 |
| 268 | declare <4 x float> @llvm.amdgcn.raw.buffer.load.v4f32(<4 x i32>, i32, i32, i32) #0 |
Tim Renouf | bb5ee41 | 2018-08-21 11:08:12 +0000 | [diff] [blame] | 269 | declare i32 @llvm.amdgcn.raw.buffer.load.i32(<4 x i32>, i32, i32, i32) #0 |
| 270 | declare <2 x i32> @llvm.amdgcn.raw.buffer.load.v2i32(<4 x i32>, i32, i32, i32) #0 |
| 271 | declare <4 x i32> @llvm.amdgcn.raw.buffer.load.v4i32(<4 x i32>, i32, i32, i32) #0 |
Tim Renouf | 4f703f5 | 2018-08-21 11:07:10 +0000 | [diff] [blame] | 272 | declare void @llvm.amdgcn.exp.f32(i32, i32, float, float, float, float, i1, i1) #0 |
| 273 | |
| 274 | attributes #0 = { nounwind readonly } |