annotate llvm/test/CodeGen/AMDGPU/drop-mem-operand-move-smrd.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 1d019706d866
children 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; RUN: llc -march=amdgcn -mcpu=bonaire -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=CI %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 ; The memory operand was dropped from the buffer_load_dword_offset
anatofuz
parents:
diff changeset
4 ; when replaced with the addr64 during operand legalization, resulting
anatofuz
parents:
diff changeset
5 ; in the global loads not being scheduled together.
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 ; GCN-LABEL: {{^}}reschedule_global_load_lds_store:
anatofuz
parents:
diff changeset
8 ; GCN: buffer_load_dword
anatofuz
parents:
diff changeset
9 ; GCN: buffer_load_dword
anatofuz
parents:
diff changeset
10 ; GCN: ds_write2_b32
anatofuz
parents:
diff changeset
11 ; GCN: s_endpgm
anatofuz
parents:
diff changeset
12 define amdgpu_kernel void @reschedule_global_load_lds_store(i32 addrspace(1)* noalias %gptr0, i32 addrspace(1)* noalias %gptr1, i32 addrspace(3)* noalias %lptr, i32 %c) #0 {
anatofuz
parents:
diff changeset
13 entry:
anatofuz
parents:
diff changeset
14 %tid = tail call i32 @llvm.amdgcn.workitem.id.x() #1
anatofuz
parents:
diff changeset
15 %idx = shl i32 %tid, 2
anatofuz
parents:
diff changeset
16 %gep0 = getelementptr i32, i32 addrspace(1)* %gptr0, i32 %idx
anatofuz
parents:
diff changeset
17 %gep1 = getelementptr i32, i32 addrspace(1)* %gptr1, i32 %idx
anatofuz
parents:
diff changeset
18 %gep2 = getelementptr i32, i32 addrspace(3)* %lptr, i32 %tid
anatofuz
parents:
diff changeset
19 %cmp0 = icmp eq i32 %c, 0
anatofuz
parents:
diff changeset
20 br i1 %cmp0, label %for.body, label %exit
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 for.body: ; preds = %for.body, %entry
anatofuz
parents:
diff changeset
23 %i = phi i32 [ 0, %entry ], [ %i.inc, %for.body ]
anatofuz
parents:
diff changeset
24 %gptr0.phi = phi i32 addrspace(1)* [ %gep0, %entry ], [ %gep0.inc, %for.body ]
anatofuz
parents:
diff changeset
25 %gptr1.phi = phi i32 addrspace(1)* [ %gep1, %entry ], [ %gep1.inc, %for.body ]
anatofuz
parents:
diff changeset
26 %lptr0.phi = phi i32 addrspace(3)* [ %gep2, %entry ], [ %gep2.inc, %for.body ]
anatofuz
parents:
diff changeset
27 %lptr1 = getelementptr i32, i32 addrspace(3)* %lptr0.phi, i32 2
anatofuz
parents:
diff changeset
28 %val0 = load i32, i32 addrspace(1)* %gep0
anatofuz
parents:
diff changeset
29 store i32 %val0, i32 addrspace(3)* %lptr0.phi
anatofuz
parents:
diff changeset
30 %val1 = load i32, i32 addrspace(1)* %gep1
anatofuz
parents:
diff changeset
31 store i32 %val1, i32 addrspace(3)* %lptr1
anatofuz
parents:
diff changeset
32 %gep0.inc = getelementptr i32, i32 addrspace(1)* %gptr0.phi, i32 4
anatofuz
parents:
diff changeset
33 %gep1.inc = getelementptr i32, i32 addrspace(1)* %gptr1.phi, i32 4
anatofuz
parents:
diff changeset
34 %gep2.inc = getelementptr i32, i32 addrspace(3)* %lptr0.phi, i32 4
anatofuz
parents:
diff changeset
35 %i.inc = add nsw i32 %i, 1
anatofuz
parents:
diff changeset
36 %cmp1 = icmp ne i32 %i, 256
anatofuz
parents:
diff changeset
37 br i1 %cmp1, label %for.body, label %exit
anatofuz
parents:
diff changeset
38
anatofuz
parents:
diff changeset
39 exit: ; preds = %for.body, %entry
anatofuz
parents:
diff changeset
40 ret void
anatofuz
parents:
diff changeset
41 }
anatofuz
parents:
diff changeset
42
anatofuz
parents:
diff changeset
43 ; Function Attrs: nounwind readnone
anatofuz
parents:
diff changeset
44 declare i32 @llvm.amdgcn.workitem.id.x() #1
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 = { convergent nounwind }