annotate llvm/test/CodeGen/AMDGPU/lds-alignment.ll @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents 1d019706d866
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
1 ; RUN: llc -march=amdgcn -mtriple=amdgcn-unknown-amdhsa --amdhsa-code-object-version=2 < %s | FileCheck -check-prefix=HSA %s
150
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 @lds.align16.0 = internal unnamed_addr addrspace(3) global [38 x i8] undef, align 16
anatofuz
parents:
diff changeset
4 @lds.align16.1 = internal unnamed_addr addrspace(3) global [38 x i8] undef, align 16
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 @lds.align8.0 = internal unnamed_addr addrspace(3) global [38 x i8] undef, align 8
anatofuz
parents:
diff changeset
7 @lds.align32.0 = internal unnamed_addr addrspace(3) global [38 x i8] undef, align 32
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 @lds.missing.align.0 = internal unnamed_addr addrspace(3) global [39 x i32] undef
anatofuz
parents:
diff changeset
10 @lds.missing.align.1 = internal unnamed_addr addrspace(3) global [7 x i64] undef
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 declare void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* nocapture, i8 addrspace(1)* nocapture readonly, i32, i1) #0
anatofuz
parents:
diff changeset
13 declare void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* nocapture, i8 addrspace(3)* nocapture readonly, i32, i1) #0
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 ; HSA-LABEL: {{^}}test_no_round_size_1:
anatofuz
parents:
diff changeset
17 ; HSA: workgroup_group_segment_byte_size = 38
anatofuz
parents:
diff changeset
18 define amdgpu_kernel void @test_no_round_size_1(i8 addrspace(1)* %out, i8 addrspace(1)* %in) #1 {
anatofuz
parents:
diff changeset
19 %lds.align16.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align16.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
20 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 4 %lds.align16.0.bc, i8 addrspace(1)* align 4 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
21 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 4 %out, i8 addrspace(3)* align 4 %lds.align16.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
22 ret void
anatofuz
parents:
diff changeset
23 }
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 ; There are two objects, so one requires padding to be correctly
anatofuz
parents:
diff changeset
26 ; aligned after the other.
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 ; (38 -> 48) + 38 = 92
anatofuz
parents:
diff changeset
29
anatofuz
parents:
diff changeset
30 ; I don't think it is necessary to add padding after since if there
anatofuz
parents:
diff changeset
31 ; were to be a dynamically sized LDS kernel arg, the runtime should
anatofuz
parents:
diff changeset
32 ; add the alignment padding if necessary alignment padding if needed.
anatofuz
parents:
diff changeset
33
anatofuz
parents:
diff changeset
34 ; HSA-LABEL: {{^}}test_round_size_2:
anatofuz
parents:
diff changeset
35 ; HSA: workgroup_group_segment_byte_size = 86
anatofuz
parents:
diff changeset
36 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
37 define amdgpu_kernel void @test_round_size_2(i8 addrspace(1)* %out, i8 addrspace(1)* %in) #1 {
anatofuz
parents:
diff changeset
38 %lds.align16.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align16.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
39 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 4 %lds.align16.0.bc, i8 addrspace(1)* align 4 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
40 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 4 %out, i8 addrspace(3)* align 4 %lds.align16.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
41
anatofuz
parents:
diff changeset
42 %lds.align16.1.bc = bitcast [38 x i8] addrspace(3)* @lds.align16.1 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
43 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 4 %lds.align16.1.bc, i8 addrspace(1)* align 4 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
44 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 4 %out, i8 addrspace(3)* align 4 %lds.align16.1.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
45
anatofuz
parents:
diff changeset
46 ret void
anatofuz
parents:
diff changeset
47 }
anatofuz
parents:
diff changeset
48
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
49 ; 38 + (10 pad) + 38 (= 86)
150
anatofuz
parents:
diff changeset
50 ; HSA-LABEL: {{^}}test_round_size_2_align_8:
anatofuz
parents:
diff changeset
51 ; HSA: workgroup_group_segment_byte_size = 86
anatofuz
parents:
diff changeset
52 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
53 define amdgpu_kernel void @test_round_size_2_align_8(i8 addrspace(1)* %out, i8 addrspace(1)* %in) #1 {
anatofuz
parents:
diff changeset
54 %lds.align16.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align16.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
55 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align16.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
56 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align16.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
57
anatofuz
parents:
diff changeset
58 %lds.align8.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align8.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
59 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align8.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
60 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align8.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
61
anatofuz
parents:
diff changeset
62 ret void
anatofuz
parents:
diff changeset
63 }
anatofuz
parents:
diff changeset
64
anatofuz
parents:
diff changeset
65 ; HSA-LABEL: {{^}}test_round_local_lds_and_arg:
anatofuz
parents:
diff changeset
66 ; HSA: workgroup_group_segment_byte_size = 38
anatofuz
parents:
diff changeset
67 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
68 define amdgpu_kernel void @test_round_local_lds_and_arg(i8 addrspace(1)* %out, i8 addrspace(1)* %in, i8 addrspace(3)* %lds.arg) #1 {
anatofuz
parents:
diff changeset
69 %lds.align16.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align16.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
70 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 4 %lds.align16.0.bc, i8 addrspace(1)* align 4 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
71
anatofuz
parents:
diff changeset
72 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 4 %out, i8 addrspace(3)* align 4 %lds.align16.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
73 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 4 %lds.arg, i8 addrspace(1)* align 4 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
74 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 4 %out, i8 addrspace(3)* align 4 %lds.arg, i32 38, i1 false)
anatofuz
parents:
diff changeset
75 ret void
anatofuz
parents:
diff changeset
76 }
anatofuz
parents:
diff changeset
77
anatofuz
parents:
diff changeset
78 ; HSA-LABEL: {{^}}test_round_lds_arg:
anatofuz
parents:
diff changeset
79 ; HSA: workgroup_group_segment_byte_size = 0
anatofuz
parents:
diff changeset
80 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
81 define amdgpu_kernel void @test_round_lds_arg(i8 addrspace(1)* %out, i8 addrspace(1)* %in, i8 addrspace(3)* %lds.arg) #1 {
anatofuz
parents:
diff changeset
82 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 4 %lds.arg, i8 addrspace(1)* align 4 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
83 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 4 %out, i8 addrspace(3)* align 4 %lds.arg, i32 38, i1 false)
anatofuz
parents:
diff changeset
84 ret void
anatofuz
parents:
diff changeset
85 }
anatofuz
parents:
diff changeset
86
anatofuz
parents:
diff changeset
87 ; FIXME: Parameter alignment not considered
anatofuz
parents:
diff changeset
88 ; HSA-LABEL: {{^}}test_high_align_lds_arg:
anatofuz
parents:
diff changeset
89 ; HSA: workgroup_group_segment_byte_size = 0
anatofuz
parents:
diff changeset
90 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
91 define amdgpu_kernel void @test_high_align_lds_arg(i8 addrspace(1)* %out, i8 addrspace(1)* %in, i8 addrspace(3)* align 64 %lds.arg) #1 {
anatofuz
parents:
diff changeset
92 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 64 %lds.arg, i8 addrspace(1)* align 64 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
93 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 64 %out, i8 addrspace(3)* align 64 %lds.arg, i32 38, i1 false)
anatofuz
parents:
diff changeset
94 ret void
anatofuz
parents:
diff changeset
95 }
anatofuz
parents:
diff changeset
96
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
97 ; (39 * 4) + (4 pad) + (7 * 8) = 216
150
anatofuz
parents:
diff changeset
98 ; HSA-LABEL: {{^}}test_missing_alignment_size_2_order0:
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
99 ; HSA: workgroup_group_segment_byte_size = 216
150
anatofuz
parents:
diff changeset
100 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
101 define amdgpu_kernel void @test_missing_alignment_size_2_order0(i8 addrspace(1)* %out, i8 addrspace(1)* %in) #1 {
anatofuz
parents:
diff changeset
102 %lds.missing.align.0.bc = bitcast [39 x i32] addrspace(3)* @lds.missing.align.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
103 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 4 %lds.missing.align.0.bc, i8 addrspace(1)* align 4 %in, i32 160, i1 false)
anatofuz
parents:
diff changeset
104 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 4 %out, i8 addrspace(3)* align 4 %lds.missing.align.0.bc, i32 160, i1 false)
anatofuz
parents:
diff changeset
105
anatofuz
parents:
diff changeset
106 %lds.missing.align.1.bc = bitcast [7 x i64] addrspace(3)* @lds.missing.align.1 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
107 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.missing.align.1.bc, i8 addrspace(1)* align 8 %in, i32 56, i1 false)
anatofuz
parents:
diff changeset
108 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.missing.align.1.bc, i32 56, i1 false)
anatofuz
parents:
diff changeset
109
anatofuz
parents:
diff changeset
110 ret void
anatofuz
parents:
diff changeset
111 }
anatofuz
parents:
diff changeset
112
anatofuz
parents:
diff changeset
113 ; (39 * 4) + (4 pad) + (7 * 8) = 216
anatofuz
parents:
diff changeset
114 ; HSA-LABEL: {{^}}test_missing_alignment_size_2_order1:
anatofuz
parents:
diff changeset
115 ; HSA: workgroup_group_segment_byte_size = 216
anatofuz
parents:
diff changeset
116 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
117 define amdgpu_kernel void @test_missing_alignment_size_2_order1(i8 addrspace(1)* %out, i8 addrspace(1)* %in) #1 {
anatofuz
parents:
diff changeset
118 %lds.missing.align.1.bc = bitcast [7 x i64] addrspace(3)* @lds.missing.align.1 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
119 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.missing.align.1.bc, i8 addrspace(1)* align 8 %in, i32 56, i1 false)
anatofuz
parents:
diff changeset
120 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.missing.align.1.bc, i32 56, i1 false)
anatofuz
parents:
diff changeset
121
anatofuz
parents:
diff changeset
122 %lds.missing.align.0.bc = bitcast [39 x i32] addrspace(3)* @lds.missing.align.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
123 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 4 %lds.missing.align.0.bc, i8 addrspace(1)* align 4 %in, i32 160, i1 false)
anatofuz
parents:
diff changeset
124 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 4 %out, i8 addrspace(3)* align 4 %lds.missing.align.0.bc, i32 160, i1 false)
anatofuz
parents:
diff changeset
125
anatofuz
parents:
diff changeset
126 ret void
anatofuz
parents:
diff changeset
127 }
anatofuz
parents:
diff changeset
128
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
129 ; align 32, 16, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
130 ; 38 + (10 pad) + 38 + (10 pad) + 38 ( = 134)
150
anatofuz
parents:
diff changeset
131 ; HSA-LABEL: {{^}}test_round_size_3_order0:
anatofuz
parents:
diff changeset
132 ; HSA: workgroup_group_segment_byte_size = 134
anatofuz
parents:
diff changeset
133 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
134 define amdgpu_kernel void @test_round_size_3_order0(i8 addrspace(1)* %out, i8 addrspace(1)* %in) #1 {
anatofuz
parents:
diff changeset
135 %lds.align32.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align32.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
136 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align32.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
137 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align32.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
138
anatofuz
parents:
diff changeset
139 %lds.align16.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align16.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
140 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align16.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
141 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align16.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
142
anatofuz
parents:
diff changeset
143 %lds.align8.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align8.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
144 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align8.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
145 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align8.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
146
anatofuz
parents:
diff changeset
147 ret void
anatofuz
parents:
diff changeset
148 }
anatofuz
parents:
diff changeset
149
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
150 ; align 32, 16, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
151 ; 38 (+ 10 pad) + 38 + (10 pad) + 38 ( = 134)
150
anatofuz
parents:
diff changeset
152 ; HSA-LABEL: {{^}}test_round_size_3_order1:
anatofuz
parents:
diff changeset
153 ; HSA: workgroup_group_segment_byte_size = 134
anatofuz
parents:
diff changeset
154 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
155 define amdgpu_kernel void @test_round_size_3_order1(i8 addrspace(1)* %out, i8 addrspace(1)* %in) #1 {
anatofuz
parents:
diff changeset
156 %lds.align32.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align32.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
157 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align32.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
158 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align32.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
159
anatofuz
parents:
diff changeset
160 %lds.align8.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align8.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
161 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align8.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
162 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align8.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
163
anatofuz
parents:
diff changeset
164 %lds.align16.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align16.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
165 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align16.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
166 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align16.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
167
anatofuz
parents:
diff changeset
168 ret void
anatofuz
parents:
diff changeset
169 }
anatofuz
parents:
diff changeset
170
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
171 ; align 32, 16, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
172 ; 38 + (10 pad) + 38 + (10 pad) + 38 ( = 126)
150
anatofuz
parents:
diff changeset
173 ; HSA-LABEL: {{^}}test_round_size_3_order2:
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
174 ; HSA: workgroup_group_segment_byte_size = 134
150
anatofuz
parents:
diff changeset
175 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
176 define amdgpu_kernel void @test_round_size_3_order2(i8 addrspace(1)* %out, i8 addrspace(1)* %in) #1 {
anatofuz
parents:
diff changeset
177 %lds.align16.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align16.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
178 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align16.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
179 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align16.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
180
anatofuz
parents:
diff changeset
181 %lds.align32.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align32.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
182 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align32.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
183 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align32.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
184
anatofuz
parents:
diff changeset
185 %lds.align8.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align8.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
186 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align8.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
187 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align8.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
188
anatofuz
parents:
diff changeset
189 ret void
anatofuz
parents:
diff changeset
190 }
anatofuz
parents:
diff changeset
191
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
192 ; align 32, 16, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
193 ; 38 + (10 pad) + 38 + (10 pad) + 38 ( = 134)
150
anatofuz
parents:
diff changeset
194 ; HSA-LABEL: {{^}}test_round_size_3_order3:
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
195 ; HSA: workgroup_group_segment_byte_size = 134
150
anatofuz
parents:
diff changeset
196 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
197 define amdgpu_kernel void @test_round_size_3_order3(i8 addrspace(1)* %out, i8 addrspace(1)* %in) #1 {
anatofuz
parents:
diff changeset
198 %lds.align16.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align16.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
199 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align16.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
200 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align16.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
201
anatofuz
parents:
diff changeset
202 %lds.align8.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align8.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
203 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align8.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
204 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align8.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
205
anatofuz
parents:
diff changeset
206 %lds.align32.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align32.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
207 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align32.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
208 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align32.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
209
anatofuz
parents:
diff changeset
210 ret void
anatofuz
parents:
diff changeset
211 }
anatofuz
parents:
diff changeset
212
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
213 ; align 32, 16, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
214 ; 38 + (10 pad) + 38 + (10 pad) + 38 (= 134)
150
anatofuz
parents:
diff changeset
215 ; HSA-LABEL: {{^}}test_round_size_3_order4:
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
216 ; HSA: workgroup_group_segment_byte_size = 134
150
anatofuz
parents:
diff changeset
217 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
218 define amdgpu_kernel void @test_round_size_3_order4(i8 addrspace(1)* %out, i8 addrspace(1)* %in) #1 {
anatofuz
parents:
diff changeset
219 %lds.align8.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align8.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
220 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align8.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
221 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align8.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
222
anatofuz
parents:
diff changeset
223 %lds.align32.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align32.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
224 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align32.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
225 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align32.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
226
anatofuz
parents:
diff changeset
227 %lds.align16.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align16.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
228 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align16.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
229 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align16.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
230
anatofuz
parents:
diff changeset
231 ret void
anatofuz
parents:
diff changeset
232 }
anatofuz
parents:
diff changeset
233
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
234 ; align 32, 16, 16
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
235 ; 38 + (10 pad) + 38 + (10 pad) + 38 (= 134)
150
anatofuz
parents:
diff changeset
236 ; HSA-LABEL: {{^}}test_round_size_3_order5:
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
237 ; HSA: workgroup_group_segment_byte_size = 134
150
anatofuz
parents:
diff changeset
238 ; HSA: group_segment_alignment = 4
anatofuz
parents:
diff changeset
239 define amdgpu_kernel void @test_round_size_3_order5(i8 addrspace(1)* %out, i8 addrspace(1)* %in) #1 {
anatofuz
parents:
diff changeset
240 %lds.align8.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align8.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
241 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align8.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
242 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align8.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
243
anatofuz
parents:
diff changeset
244 %lds.align16.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align16.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
245 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align16.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
246 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align16.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
247
anatofuz
parents:
diff changeset
248 %lds.align32.0.bc = bitcast [38 x i8] addrspace(3)* @lds.align32.0 to i8 addrspace(3)*
anatofuz
parents:
diff changeset
249 call void @llvm.memcpy.p3i8.p1i8.i32(i8 addrspace(3)* align 8 %lds.align32.0.bc, i8 addrspace(1)* align 8 %in, i32 38, i1 false)
anatofuz
parents:
diff changeset
250 call void @llvm.memcpy.p1i8.p3i8.i32(i8 addrspace(1)* align 8 %out, i8 addrspace(3)* align 8 %lds.align32.0.bc, i32 38, i1 false)
anatofuz
parents:
diff changeset
251
anatofuz
parents:
diff changeset
252 ret void
anatofuz
parents:
diff changeset
253 }
anatofuz
parents:
diff changeset
254
anatofuz
parents:
diff changeset
255 attributes #0 = { argmemonly nounwind }
anatofuz
parents:
diff changeset
256 attributes #1 = { nounwind }
anatofuz
parents:
diff changeset
257 attributes #2 = { convergent nounwind }