annotate llvm/test/CodeGen/AMDGPU/indirect-addressing-si-gfx9.ll @ 206:f17a3b42b08b

Added tag before-12 for changeset b7591485f4cd
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 07 Jun 2021 21:25:57 +0900
parents 0572611fdcc8
children 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=gfx900 -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,IDXMODE,GFX9 %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 ; indexing of vectors.
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 ; Subtest below moved from file test/CodeGen/AMDGPU/indirect-addressing-si.ll
anatofuz
parents:
diff changeset
6 ; to avoid gfx9 scheduling induced issues.
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 ; GCN-LABEL: {{^}}insert_vgpr_offset_multiple_in_block:
anatofuz
parents:
diff changeset
10 ; GCN-DAG: s_load_dwordx16 s{{\[}}[[S_ELT0:[0-9]+]]:[[S_ELT15:[0-9]+]]{{\]}}
anatofuz
parents:
diff changeset
11 ; GCN-DAG: {{buffer|flat|global}}_load_dword [[IDX0:v[0-9]+]]
anatofuz
parents:
diff changeset
12 ; GCN-DAG: v_mov_b32 [[INS0:v[0-9]+]], 62
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 ; GCN-DAG: v_mov_b32_e32 v[[VEC_ELT15:[0-9]+]], s[[S_ELT15]]
anatofuz
parents:
diff changeset
15 ; GCN-DAG: v_mov_b32_e32 v[[VEC_ELT0:[0-9]+]], s[[S_ELT0]]
anatofuz
parents:
diff changeset
16
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
17 ; GCN: v_cmp_eq_u32_e32
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
18 ; GCN-COUNT-32: v_cndmask_b32
150
anatofuz
parents:
diff changeset
19
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
20 ; GCN-COUNT-4: buffer_store_dwordx4
150
anatofuz
parents:
diff changeset
21 define amdgpu_kernel void @insert_vgpr_offset_multiple_in_block(<16 x i32> addrspace(1)* %out0, <16 x i32> addrspace(1)* %out1, i32 addrspace(1)* %in, <16 x i32> %vec0) #0 {
anatofuz
parents:
diff changeset
22 entry:
anatofuz
parents:
diff changeset
23 %id = call i32 @llvm.amdgcn.workitem.id.x() #1
anatofuz
parents:
diff changeset
24 %id.ext = zext i32 %id to i64
anatofuz
parents:
diff changeset
25 %gep = getelementptr inbounds i32, i32 addrspace(1)* %in, i64 %id.ext
anatofuz
parents:
diff changeset
26 %idx0 = load volatile i32, i32 addrspace(1)* %gep
anatofuz
parents:
diff changeset
27 %idx1 = add i32 %idx0, 1
anatofuz
parents:
diff changeset
28 %live.out.val = call i32 asm sideeffect "v_mov_b32 $0, 62", "=v"()
anatofuz
parents:
diff changeset
29 %vec1 = insertelement <16 x i32> %vec0, i32 %live.out.val, i32 %idx0
anatofuz
parents:
diff changeset
30 %vec2 = insertelement <16 x i32> %vec1, i32 63, i32 %idx1
anatofuz
parents:
diff changeset
31 store volatile <16 x i32> %vec2, <16 x i32> addrspace(1)* %out0
anatofuz
parents:
diff changeset
32 %cmp = icmp eq i32 %id, 0
anatofuz
parents:
diff changeset
33 br i1 %cmp, label %bb1, label %bb2
anatofuz
parents:
diff changeset
34
anatofuz
parents:
diff changeset
35 bb1:
anatofuz
parents:
diff changeset
36 store volatile i32 %live.out.val, i32 addrspace(1)* undef
anatofuz
parents:
diff changeset
37 br label %bb2
anatofuz
parents:
diff changeset
38
anatofuz
parents:
diff changeset
39 bb2:
anatofuz
parents:
diff changeset
40 ret void
anatofuz
parents:
diff changeset
41 }
anatofuz
parents:
diff changeset
42
anatofuz
parents:
diff changeset
43 declare i32 @llvm.amdgcn.workitem.id.x() #1
anatofuz
parents:
diff changeset
44 declare void @llvm.amdgcn.s.barrier() #2
anatofuz
parents:
diff changeset
45
anatofuz
parents:
diff changeset
46 attributes #0 = { nounwind }
anatofuz
parents:
diff changeset
47 attributes #1 = { nounwind readnone }
anatofuz
parents:
diff changeset
48 attributes #2 = { nounwind convergent }