1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu -mcpu=skylake-avx512 | FileCheck %s
4 %struct.S = type { [8 x i32], [8 x i32], [16 x i32] }
6 define dso_local void @_Z4testP1S(%struct.S* %p) local_unnamed_addr {
7 ; CHECK-LABEL: @_Z4testP1S(
9 ; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], %struct.S* [[P:%.*]], i64 0, i32 1, i64 0
10 ; CHECK-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 2, i64 15
11 ; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 0
12 ; CHECK-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 1, i64 1
13 ; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 2, i64 7
14 ; CHECK-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 1
15 ; CHECK-NEXT: [[ARRAYIDX11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 1, i64 2
16 ; CHECK-NEXT: [[ARRAYIDX13:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 2, i64 6
17 ; CHECK-NEXT: [[ARRAYIDX16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 2
18 ; CHECK-NEXT: [[ARRAYIDX18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 1, i64 3
19 ; CHECK-NEXT: [[ARRAYIDX20:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 2, i64 4
20 ; CHECK-NEXT: [[ARRAYIDX23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 3
21 ; CHECK-NEXT: [[ARRAYIDX25:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 1, i64 4
22 ; CHECK-NEXT: [[ARRAYIDX27:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 2, i64 12
23 ; CHECK-NEXT: [[ARRAYIDX30:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 4
24 ; CHECK-NEXT: [[ARRAYIDX32:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 1, i64 5
25 ; CHECK-NEXT: [[ARRAYIDX34:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 2, i64 13
26 ; CHECK-NEXT: [[ARRAYIDX37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 5
27 ; CHECK-NEXT: [[ARRAYIDX39:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 1, i64 6
28 ; CHECK-NEXT: [[ARRAYIDX41:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 2, i64 14
29 ; CHECK-NEXT: [[ARRAYIDX44:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 6
30 ; CHECK-NEXT: [[ARRAYIDX46:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 1, i64 7
31 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i32* [[ARRAYIDX]] to <8 x i32>*
32 ; CHECK-NEXT: [[TMP1:%.*]] = load <8 x i32>, <8 x i32>* [[TMP0]], align 4
33 ; CHECK-NEXT: [[ARRAYIDX48:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 2, i64 5
34 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <8 x i32*> poison, i32* [[ARRAYIDX1]], i32 0
35 ; CHECK-NEXT: [[TMP3:%.*]] = insertelement <8 x i32*> [[TMP2]], i32* [[ARRAYIDX6]], i32 1
36 ; CHECK-NEXT: [[TMP4:%.*]] = insertelement <8 x i32*> [[TMP3]], i32* [[ARRAYIDX13]], i32 2
37 ; CHECK-NEXT: [[TMP5:%.*]] = insertelement <8 x i32*> [[TMP4]], i32* [[ARRAYIDX20]], i32 3
38 ; CHECK-NEXT: [[TMP6:%.*]] = insertelement <8 x i32*> [[TMP5]], i32* [[ARRAYIDX27]], i32 4
39 ; CHECK-NEXT: [[TMP7:%.*]] = insertelement <8 x i32*> [[TMP6]], i32* [[ARRAYIDX34]], i32 5
40 ; CHECK-NEXT: [[TMP8:%.*]] = insertelement <8 x i32*> [[TMP7]], i32* [[ARRAYIDX41]], i32 6
41 ; CHECK-NEXT: [[TMP9:%.*]] = insertelement <8 x i32*> [[TMP8]], i32* [[ARRAYIDX48]], i32 7
42 ; CHECK-NEXT: [[TMP10:%.*]] = call <8 x i32> @llvm.masked.gather.v8i32.v8p0i32(<8 x i32*> [[TMP9]], i32 4, <8 x i1> <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>, <8 x i32> undef)
43 ; CHECK-NEXT: [[TMP11:%.*]] = add nsw <8 x i32> [[TMP10]], [[TMP1]]
44 ; CHECK-NEXT: [[ARRAYIDX51:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 7
45 ; CHECK-NEXT: [[TMP12:%.*]] = bitcast i32* [[ARRAYIDX2]] to <8 x i32>*
46 ; CHECK-NEXT: store <8 x i32> [[TMP11]], <8 x i32>* [[TMP12]], align 4
47 ; CHECK-NEXT: ret void
50 %arrayidx = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 1, i64 0
51 %i = load i32, i32* %arrayidx, align 4
52 %arrayidx1 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 2, i64 15
53 %i1 = load i32, i32* %arrayidx1, align 4
54 %add = add nsw i32 %i1, %i
55 %arrayidx2 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 0
56 store i32 %add, i32* %arrayidx2, align 4
57 %arrayidx4 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 1, i64 1
58 %i2 = load i32, i32* %arrayidx4, align 4
59 %arrayidx6 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 2, i64 7
60 %i3 = load i32, i32* %arrayidx6, align 4
61 %add7 = add nsw i32 %i3, %i2
62 %arrayidx9 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 1
63 store i32 %add7, i32* %arrayidx9, align 4
64 %arrayidx11 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 1, i64 2
65 %i4 = load i32, i32* %arrayidx11, align 4
66 %arrayidx13 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 2, i64 6
67 %i5 = load i32, i32* %arrayidx13, align 4
68 %add14 = add nsw i32 %i5, %i4
69 %arrayidx16 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 2
70 store i32 %add14, i32* %arrayidx16, align 4
71 %arrayidx18 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 1, i64 3
72 %i6 = load i32, i32* %arrayidx18, align 4
73 %arrayidx20 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 2, i64 4
74 %i7 = load i32, i32* %arrayidx20, align 4
75 %add21 = add nsw i32 %i7, %i6
76 %arrayidx23 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 3
77 store i32 %add21, i32* %arrayidx23, align 4
78 %arrayidx25 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 1, i64 4
79 %i8 = load i32, i32* %arrayidx25, align 4
80 %arrayidx27 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 2, i64 12
81 %i9 = load i32, i32* %arrayidx27, align 4
82 %add28 = add nsw i32 %i9, %i8
83 %arrayidx30 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 4
84 store i32 %add28, i32* %arrayidx30, align 4
85 %arrayidx32 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 1, i64 5
86 %i10 = load i32, i32* %arrayidx32, align 4
87 %arrayidx34 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 2, i64 13
88 %i11 = load i32, i32* %arrayidx34, align 4
89 %add35 = add nsw i32 %i11, %i10
90 %arrayidx37 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 5
91 store i32 %add35, i32* %arrayidx37, align 4
92 %arrayidx39 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 1, i64 6
93 %i12 = load i32, i32* %arrayidx39, align 4
94 %arrayidx41 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 2, i64 14
95 %i13 = load i32, i32* %arrayidx41, align 4
96 %add42 = add nsw i32 %i13, %i12
97 %arrayidx44 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 6
98 store i32 %add42, i32* %arrayidx44, align 4
99 %arrayidx46 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 1, i64 7
100 %i14 = load i32, i32* %arrayidx46, align 4
101 %arrayidx48 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 2, i64 5
102 %i15 = load i32, i32* %arrayidx48, align 4
103 %add49 = add nsw i32 %i15, %i14
104 %arrayidx51 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 7
105 store i32 %add49, i32* %arrayidx51, align 4
109 ; Test for 2 load groups 4 elements each against different base pointers.
110 ; Both loaded groups are not ordered thus here are few specific points:
111 ; (1) these groups are detected, (2) reordereing shuffles generated and
112 ; (3) these loads vectorized as a part of tree that is seeded by stores
115 define dso_local void @test_unordered_splits(%struct.S* nocapture %p) local_unnamed_addr {
116 ; CHECK-LABEL: @test_unordered_splits(
118 ; CHECK-NEXT: [[P1:%.*]] = alloca [16 x i32], align 16
119 ; CHECK-NEXT: [[P2:%.*]] = alloca [16 x i32], align 16
120 ; CHECK-NEXT: [[G10:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P1]], i32 0, i64 4
121 ; CHECK-NEXT: [[G11:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P1]], i32 0, i64 5
122 ; CHECK-NEXT: [[G12:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P1]], i32 0, i64 6
123 ; CHECK-NEXT: [[G13:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P1]], i32 0, i64 7
124 ; CHECK-NEXT: [[G20:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P2]], i32 0, i64 12
125 ; CHECK-NEXT: [[G21:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P2]], i32 0, i64 13
126 ; CHECK-NEXT: [[G22:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P2]], i32 0, i64 14
127 ; CHECK-NEXT: [[G23:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P2]], i32 0, i64 15
128 ; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], %struct.S* [[P:%.*]], i64 0, i32 0, i64 0
129 ; CHECK-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 1
130 ; CHECK-NEXT: [[ARRAYIDX16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 2
131 ; CHECK-NEXT: [[TMP0:%.*]] = bitcast i32* [[G10]] to <4 x i32>*
132 ; CHECK-NEXT: [[TMP1:%.*]] = load <4 x i32>, <4 x i32>* [[TMP0]], align 4
133 ; CHECK-NEXT: [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[TMP1]], <4 x i32> poison, <4 x i32> <i32 1, i32 0, i32 2, i32 3>
134 ; CHECK-NEXT: [[ARRAYIDX23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 3
135 ; CHECK-NEXT: [[TMP2:%.*]] = bitcast i32* [[ARRAYIDX2]] to <4 x i32>*
136 ; CHECK-NEXT: store <4 x i32> [[SHUFFLE]], <4 x i32>* [[TMP2]], align 4
137 ; CHECK-NEXT: [[ARRAYIDX30:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 4
138 ; CHECK-NEXT: [[ARRAYIDX37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 5
139 ; CHECK-NEXT: [[ARRAYIDX44:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 6
140 ; CHECK-NEXT: [[TMP3:%.*]] = bitcast i32* [[G20]] to <4 x i32>*
141 ; CHECK-NEXT: [[TMP4:%.*]] = load <4 x i32>, <4 x i32>* [[TMP3]], align 4
142 ; CHECK-NEXT: [[SHUFFLE1:%.*]] = shufflevector <4 x i32> [[TMP4]], <4 x i32> poison, <4 x i32> <i32 3, i32 1, i32 2, i32 0>
143 ; CHECK-NEXT: [[ARRAYIDX51:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 7
144 ; CHECK-NEXT: [[TMP5:%.*]] = bitcast i32* [[ARRAYIDX30]] to <4 x i32>*
145 ; CHECK-NEXT: store <4 x i32> [[SHUFFLE1]], <4 x i32>* [[TMP5]], align 4
146 ; CHECK-NEXT: ret void
149 %p1 = alloca [16 x i32], align 16
150 %p2 = alloca [16 x i32], align 16
151 %g10 = getelementptr inbounds [16 x i32], [16 x i32]* %p1, i32 0, i64 4
152 %g11 = getelementptr inbounds [16 x i32], [16 x i32]* %p1, i32 0, i64 5
153 %g12 = getelementptr inbounds [16 x i32], [16 x i32]* %p1, i32 0, i64 6
154 %g13 = getelementptr inbounds [16 x i32], [16 x i32]* %p1, i32 0, i64 7
155 %g20 = getelementptr inbounds [16 x i32], [16 x i32]* %p2, i32 0, i64 12
156 %g21 = getelementptr inbounds [16 x i32], [16 x i32]* %p2, i32 0, i64 13
157 %g22 = getelementptr inbounds [16 x i32], [16 x i32]* %p2, i32 0, i64 14
158 %g23 = getelementptr inbounds [16 x i32], [16 x i32]* %p2, i32 0, i64 15
159 %i1 = load i32, i32* %g11, align 4
160 %arrayidx2 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 0
161 store i32 %i1, i32* %arrayidx2, align 4
162 %i3 = load i32, i32* %g10, align 4
163 %arrayidx9 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 1
164 store i32 %i3, i32* %arrayidx9, align 4
165 %i5 = load i32, i32* %g12, align 4
166 %arrayidx16 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 2
167 store i32 %i5, i32* %arrayidx16, align 4
168 %i7 = load i32, i32* %g13, align 4
169 %arrayidx23 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 3
170 store i32 %i7, i32* %arrayidx23, align 4
171 %i9 = load i32, i32* %g23, align 4
172 %arrayidx30 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 4
173 store i32 %i9, i32* %arrayidx30, align 4
174 %i11 = load i32, i32* %g21, align 4
175 %arrayidx37 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 5
176 store i32 %i11, i32* %arrayidx37, align 4
177 %i13 = load i32, i32* %g22, align 4
178 %arrayidx44 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 6
179 store i32 %i13, i32* %arrayidx44, align 4
180 %i15 = load i32, i32* %g20, align 4
181 %arrayidx51 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 7
182 store i32 %i15, i32* %arrayidx51, align 4
186 define dso_local void @test_cost_splits(%struct.S* nocapture %p) local_unnamed_addr {
187 ; CHECK-LABEL: @test_cost_splits(
189 ; CHECK-NEXT: [[P1:%.*]] = alloca [16 x i32], align 16
190 ; CHECK-NEXT: [[P2:%.*]] = alloca [16 x i32], align 16
191 ; CHECK-NEXT: [[P3:%.*]] = alloca [16 x i32], align 16
192 ; CHECK-NEXT: [[P4:%.*]] = alloca [16 x i32], align 16
193 ; CHECK-NEXT: [[G10:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P1]], i32 0, i64 4
194 ; CHECK-NEXT: [[G11:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P1]], i32 0, i64 5
195 ; CHECK-NEXT: [[G12:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P2]], i32 0, i64 6
196 ; CHECK-NEXT: [[G13:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P2]], i32 0, i64 7
197 ; CHECK-NEXT: [[G20:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P3]], i32 0, i64 12
198 ; CHECK-NEXT: [[G21:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P3]], i32 0, i64 13
199 ; CHECK-NEXT: [[G22:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P4]], i32 0, i64 14
200 ; CHECK-NEXT: [[G23:%.*]] = getelementptr inbounds [16 x i32], [16 x i32]* [[P4]], i32 0, i64 15
201 ; CHECK-NEXT: [[I1:%.*]] = load i32, i32* [[G10]], align 4
202 ; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [[STRUCT_S:%.*]], %struct.S* [[P:%.*]], i64 0, i32 0, i64 0
203 ; CHECK-NEXT: store i32 [[I1]], i32* [[ARRAYIDX2]], align 4
204 ; CHECK-NEXT: [[I3:%.*]] = load i32, i32* [[G11]], align 4
205 ; CHECK-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 1
206 ; CHECK-NEXT: store i32 [[I3]], i32* [[ARRAYIDX9]], align 4
207 ; CHECK-NEXT: [[I5:%.*]] = load i32, i32* [[G12]], align 4
208 ; CHECK-NEXT: [[ARRAYIDX16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 2
209 ; CHECK-NEXT: store i32 [[I5]], i32* [[ARRAYIDX16]], align 4
210 ; CHECK-NEXT: [[I7:%.*]] = load i32, i32* [[G13]], align 4
211 ; CHECK-NEXT: [[ARRAYIDX23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 3
212 ; CHECK-NEXT: store i32 [[I7]], i32* [[ARRAYIDX23]], align 4
213 ; CHECK-NEXT: [[I9:%.*]] = load i32, i32* [[G20]], align 4
214 ; CHECK-NEXT: [[ARRAYIDX30:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 4
215 ; CHECK-NEXT: store i32 [[I9]], i32* [[ARRAYIDX30]], align 4
216 ; CHECK-NEXT: [[I11:%.*]] = load i32, i32* [[G21]], align 4
217 ; CHECK-NEXT: [[ARRAYIDX37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 5
218 ; CHECK-NEXT: store i32 [[I11]], i32* [[ARRAYIDX37]], align 4
219 ; CHECK-NEXT: [[I13:%.*]] = load i32, i32* [[G22]], align 4
220 ; CHECK-NEXT: [[ARRAYIDX44:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 6
221 ; CHECK-NEXT: store i32 [[I13]], i32* [[ARRAYIDX44]], align 4
222 ; CHECK-NEXT: [[I15:%.*]] = load i32, i32* [[G23]], align 4
223 ; CHECK-NEXT: [[ARRAYIDX51:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[P]], i64 0, i32 0, i64 7
224 ; CHECK-NEXT: store i32 [[I15]], i32* [[ARRAYIDX51]], align 4
225 ; CHECK-NEXT: ret void
228 %p1 = alloca [16 x i32], align 16
229 %p2 = alloca [16 x i32], align 16
230 %p3 = alloca [16 x i32], align 16
231 %p4 = alloca [16 x i32], align 16
232 %g10 = getelementptr inbounds [16 x i32], [16 x i32]* %p1, i32 0, i64 4
233 %g11 = getelementptr inbounds [16 x i32], [16 x i32]* %p1, i32 0, i64 5
234 %g12 = getelementptr inbounds [16 x i32], [16 x i32]* %p2, i32 0, i64 6
235 %g13 = getelementptr inbounds [16 x i32], [16 x i32]* %p2, i32 0, i64 7
236 %g20 = getelementptr inbounds [16 x i32], [16 x i32]* %p3, i32 0, i64 12
237 %g21 = getelementptr inbounds [16 x i32], [16 x i32]* %p3, i32 0, i64 13
238 %g22 = getelementptr inbounds [16 x i32], [16 x i32]* %p4, i32 0, i64 14
239 %g23 = getelementptr inbounds [16 x i32], [16 x i32]* %p4, i32 0, i64 15
240 %i1 = load i32, i32* %g10, align 4
241 %arrayidx2 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 0
242 store i32 %i1, i32* %arrayidx2, align 4
243 %i3 = load i32, i32* %g11, align 4
244 %arrayidx9 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 1
245 store i32 %i3, i32* %arrayidx9, align 4
246 %i5 = load i32, i32* %g12, align 4
247 %arrayidx16 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 2
248 store i32 %i5, i32* %arrayidx16, align 4
249 %i7 = load i32, i32* %g13, align 4
250 %arrayidx23 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 3
251 store i32 %i7, i32* %arrayidx23, align 4
252 %i9 = load i32, i32* %g20, align 4
253 %arrayidx30 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 4
254 store i32 %i9, i32* %arrayidx30, align 4
255 %i11 = load i32, i32* %g21, align 4
256 %arrayidx37 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 5
257 store i32 %i11, i32* %arrayidx37, align 4
258 %i13 = load i32, i32* %g22, align 4
259 %arrayidx44 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 6
260 store i32 %i13, i32* %arrayidx44, align 4
261 %i15 = load i32, i32* %g23, align 4
262 %arrayidx51 = getelementptr inbounds %struct.S, %struct.S* %p, i64 0, i32 0, i64 7
263 store i32 %i15, i32* %arrayidx51, align 4