1 ; RUN: opt -passes='require<profile-summary>,function(codegenprepare)' -mtriple=thumbv7-apple-ios %s -o - -mattr=+neon -S | FileCheck --check-prefix=IR-BOTH --check-prefix=IR-NORMAL %s
2 ; RUN: opt -passes='require<profile-summary>,function(codegenprepare)' -mtriple=thumbv7-apple-ios %s -o - -mattr=+neon -S -stress-cgp-store-extract | FileCheck --check-prefix=IR-BOTH --check-prefix=IR-STRESS %s
3 ; RUN: llc -mtriple=thumbv7-apple-ios %s -o - -mattr=+neon | FileCheck --check-prefix=ASM %s
5 ; IR-BOTH-LABEL: @simpleOneInstructionPromotion
6 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
7 ; IR-BOTH-NEXT: [[VECTOR_OR:%[a-zA-Z_0-9-]+]] = or <2 x i32> [[LOAD]], <i32 undef, i32 1>
8 ; IR-BOTH-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[VECTOR_OR]], i32 1
9 ; IR-BOTH-NEXT: store i32 [[EXTRACT]], ptr %dest
12 ; Make sure we got rid of any expensive vmov.32 instructions.
13 ; ASM-LABEL: simpleOneInstructionPromotion:
14 ; ASM: vldr [[LOAD:d[0-9]+]], [r0]
15 ; ASM-NEXT: vorr.i32 [[LOAD]], #0x1
16 ; ASM-NEXT: vst1.32 {[[LOAD]][1]}, [r1:32]
18 define void @simpleOneInstructionPromotion(ptr %addr1, ptr %dest) {
19 %in1 = load <2 x i32>, ptr %addr1, align 8
20 %extract = extractelement <2 x i32> %in1, i32 1
21 %out = or i32 %extract, 1
22 store i32 %out, ptr %dest, align 4
26 ; IR-BOTH-LABEL: @unsupportedInstructionForPromotion
27 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
28 ; IR-BOTH-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[LOAD]], i32 0
29 ; IR-BOTH-NEXT: [[CMP:%[a-zA-Z_0-9-]+]] = icmp eq i32 [[EXTRACT]], %in2
30 ; IR-BOTH-NEXT: store i1 [[CMP]], ptr %dest
33 ; ASM-LABEL: unsupportedInstructionForPromotion:
34 ; ASM: vldr [[LOAD:d[0-9]+]], [r0]
35 ; ASM: vmov.32 {{r[0-9]+}}, [[LOAD]]
37 define void @unsupportedInstructionForPromotion(ptr %addr1, i32 %in2, ptr %dest) {
38 %in1 = load <2 x i32>, ptr %addr1, align 8
39 %extract = extractelement <2 x i32> %in1, i32 0
40 %out = icmp eq i32 %extract, %in2
41 store i1 %out, ptr %dest, align 4
46 ; IR-BOTH-LABEL: @unsupportedChainInDifferentBBs
47 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
48 ; IR-BOTH-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[LOAD]], i32 0
49 ; IR-BOTH-NEXT: br i1 %bool, label %bb2, label %end
51 ; IR-BOTH: [[OR:%[a-zA-Z_0-9-]+]] = or i32 [[EXTRACT]], 1
52 ; IR-BOTH-NEXT: store i32 [[OR]], ptr %dest, align 4
55 ; ASM-LABEL: unsupportedChainInDifferentBBs:
56 ; ASM: vldr [[LOAD:d[0-9]+]], [r0]
57 ; ASM: vmov.32 {{r[0-9]+}}, [[LOAD]]
59 define void @unsupportedChainInDifferentBBs(ptr %addr1, ptr %dest, i1 %bool) {
61 %in1 = load <2 x i32>, ptr %addr1, align 8
62 %extract = extractelement <2 x i32> %in1, i32 0
63 br i1 %bool, label %bb2, label %end
65 %out = or i32 %extract, 1
66 store i32 %out, ptr %dest, align 4
72 ; IR-LABEL: @chainOfInstructionsToPromote
73 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
74 ; IR-BOTH-NEXT: [[VECTOR_OR1:%[a-zA-Z_0-9-]+]] = or <2 x i32> [[LOAD]], <i32 1, i32 undef>
75 ; IR-BOTH-NEXT: [[VECTOR_OR2:%[a-zA-Z_0-9-]+]] = or <2 x i32> [[VECTOR_OR1]], <i32 1, i32 undef>
76 ; IR-BOTH-NEXT: [[VECTOR_OR3:%[a-zA-Z_0-9-]+]] = or <2 x i32> [[VECTOR_OR2]], <i32 1, i32 undef>
77 ; IR-BOTH-NEXT: [[VECTOR_OR4:%[a-zA-Z_0-9-]+]] = or <2 x i32> [[VECTOR_OR3]], <i32 1, i32 undef>
78 ; IR-BOTH-NEXT: [[VECTOR_OR5:%[a-zA-Z_0-9-]+]] = or <2 x i32> [[VECTOR_OR4]], <i32 1, i32 undef>
79 ; IR-BOTH-NEXT: [[VECTOR_OR6:%[a-zA-Z_0-9-]+]] = or <2 x i32> [[VECTOR_OR5]], <i32 1, i32 undef>
80 ; IR-BOTH-NEXT: [[VECTOR_OR7:%[a-zA-Z_0-9-]+]] = or <2 x i32> [[VECTOR_OR6]], <i32 1, i32 undef>
81 ; IR-BOTH-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[VECTOR_OR7]], i32 0
82 ; IR-BOTH-NEXT: store i32 [[EXTRACT]], ptr %dest
85 ; ASM-LABEL: chainOfInstructionsToPromote:
86 ; ASM: vldr [[LOAD:d[0-9]+]], [r0]
87 ; ASM-NOT: vmov.32 {{r[0-9]+}}, [[LOAD]]
89 define void @chainOfInstructionsToPromote(ptr %addr1, ptr %dest) {
90 %in1 = load <2 x i32>, ptr %addr1, align 8
91 %extract = extractelement <2 x i32> %in1, i32 0
92 %out1 = or i32 %extract, 1
93 %out2 = or i32 %out1, 1
94 %out3 = or i32 %out2, 1
95 %out4 = or i32 %out3, 1
96 %out5 = or i32 %out4, 1
97 %out6 = or i32 %out5, 1
98 %out7 = or i32 %out6, 1
99 store i32 %out7, ptr %dest, align 4
103 ; IR-BOTH-LABEL: @unsupportedMultiUses
104 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
105 ; IR-BOTH-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[LOAD]], i32 1
106 ; IR-BOTH-NEXT: [[OR:%[a-zA-Z_0-9-]+]] = or i32 [[EXTRACT]], 1
107 ; IR-BOTH-NEXT: store i32 [[OR]], ptr %dest
108 ; IR-BOTH-NEXT: ret i32 [[OR]]
110 ; ASM-LABEL: unsupportedMultiUses:
111 ; ASM: vldr [[LOAD:d[0-9]+]], [r0]
112 ; ASM: vmov.32 {{r[0-9]+}}, [[LOAD]]
114 define i32 @unsupportedMultiUses(ptr %addr1, ptr %dest) {
115 %in1 = load <2 x i32>, ptr %addr1, align 8
116 %extract = extractelement <2 x i32> %in1, i32 1
117 %out = or i32 %extract, 1
118 store i32 %out, ptr %dest, align 4
122 ; Check that we promote we a splat constant when this is a division.
123 ; The NORMAL mode does not promote anything as divisions are not legal.
124 ; IR-BOTH-LABEL: @udivCase
125 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
127 ; IR-NORMAL-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[LOAD]], i32 1
128 ; IR-NORMAL-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = udiv i32 [[EXTRACT]], 7
130 ; IR-STRESS-NEXT: [[DIV:%[a-zA-Z_0-9-]+]] = udiv <2 x i32> [[LOAD]], splat (i32 7)
131 ; IR-STRESS-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[DIV]], i32 1
133 ; IR-BOTH-NEXT: store i32 [[RES]], ptr %dest
135 define void @udivCase(ptr %addr1, ptr %dest) {
136 %in1 = load <2 x i32>, ptr %addr1, align 8
137 %extract = extractelement <2 x i32> %in1, i32 1
138 %out = udiv i32 %extract, 7
139 store i32 %out, ptr %dest, align 4
143 ; IR-BOTH-LABEL: @uremCase
144 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
146 ; IR-NORMAL-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[LOAD]], i32 1
147 ; IR-NORMAL-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = urem i32 [[EXTRACT]], 7
149 ; IR-STRESS-NEXT: [[DIV:%[a-zA-Z_0-9-]+]] = urem <2 x i32> [[LOAD]], splat (i32 7)
150 ; IR-STRESS-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[DIV]], i32 1
152 ; IR-BOTH-NEXT: store i32 [[RES]], ptr %dest
154 define void @uremCase(ptr %addr1, ptr %dest) {
155 %in1 = load <2 x i32>, ptr %addr1, align 8
156 %extract = extractelement <2 x i32> %in1, i32 1
157 %out = urem i32 %extract, 7
158 store i32 %out, ptr %dest, align 4
162 ; IR-BOTH-LABEL: @sdivCase
163 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
165 ; IR-NORMAL-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[LOAD]], i32 1
166 ; IR-NORMAL-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = sdiv i32 [[EXTRACT]], 7
168 ; IR-STRESS-NEXT: [[DIV:%[a-zA-Z_0-9-]+]] = sdiv <2 x i32> [[LOAD]], splat (i32 7)
169 ; IR-STRESS-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[DIV]], i32 1
171 ; IR-BOTH-NEXT: store i32 [[RES]], ptr %dest
173 define void @sdivCase(ptr %addr1, ptr %dest) {
174 %in1 = load <2 x i32>, ptr %addr1, align 8
175 %extract = extractelement <2 x i32> %in1, i32 1
176 %out = sdiv i32 %extract, 7
177 store i32 %out, ptr %dest, align 4
181 ; IR-BOTH-LABEL: @sremCase
182 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
184 ; IR-NORMAL-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[LOAD]], i32 1
185 ; IR-NORMAL-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = srem i32 [[EXTRACT]], 7
187 ; IR-STRESS-NEXT: [[DIV:%[a-zA-Z_0-9-]+]] = srem <2 x i32> [[LOAD]], splat (i32 7)
188 ; IR-STRESS-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[DIV]], i32 1
190 ; IR-BOTH-NEXT: store i32 [[RES]], ptr %dest
192 define void @sremCase(ptr %addr1, ptr %dest) {
193 %in1 = load <2 x i32>, ptr %addr1, align 8
194 %extract = extractelement <2 x i32> %in1, i32 1
195 %out = srem i32 %extract, 7
196 store i32 %out, ptr %dest, align 4
200 ; IR-BOTH-LABEL: @fdivCase
201 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x float>, ptr %addr1
203 ; IR-NORMAL-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x float> [[LOAD]], i32 1
204 ; IR-NORMAL-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = fdiv float [[EXTRACT]], 7.0
206 ; IR-STRESS-NEXT: [[DIV:%[a-zA-Z_0-9-]+]] = fdiv <2 x float> [[LOAD]], splat (float 7.000000e+00)
207 ; IR-STRESS-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = extractelement <2 x float> [[DIV]], i32 1
209 ; IR-BOTH-NEXT: store float [[RES]], ptr %dest
211 define void @fdivCase(ptr %addr1, ptr %dest) {
212 %in1 = load <2 x float>, ptr %addr1, align 8
213 %extract = extractelement <2 x float> %in1, i32 1
214 %out = fdiv float %extract, 7.0
215 store float %out, ptr %dest, align 4
219 ; IR-BOTH-LABEL: @fremCase
220 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x float>, ptr %addr1
222 ; IR-NORMAL-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x float> [[LOAD]], i32 1
223 ; IR-NORMAL-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = frem float [[EXTRACT]], 7.0
225 ; IR-STRESS-NEXT: [[DIV:%[a-zA-Z_0-9-]+]] = frem <2 x float> [[LOAD]], splat (float 7.000000e+00)
226 ; IR-STRESS-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = extractelement <2 x float> [[DIV]], i32 1
228 ; IR-BOTH-NEXT: store float [[RES]], ptr %dest
230 define void @fremCase(ptr %addr1, ptr %dest) {
231 %in1 = load <2 x float>, ptr %addr1, align 8
232 %extract = extractelement <2 x float> %in1, i32 1
233 %out = frem float %extract, 7.0
234 store float %out, ptr %dest, align 4
238 ; Check that we do not promote when we may introduce undefined behavior
239 ; like division by zero.
240 ; IR-BOTH-LABEL: @undefDivCase
241 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
242 ; IR-BOTH-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[LOAD]], i32 1
243 ; IR-BOTH-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = udiv i32 7, [[EXTRACT]]
244 ; IR-BOTH-NEXT: store i32 [[RES]], ptr %dest
246 define void @undefDivCase(ptr %addr1, ptr %dest) {
247 %in1 = load <2 x i32>, ptr %addr1, align 8
248 %extract = extractelement <2 x i32> %in1, i32 1
249 %out = udiv i32 7, %extract
250 store i32 %out, ptr %dest, align 4
255 ; Check that we do not promote when we may introduce undefined behavior
256 ; like division by zero.
257 ; IR-BOTH-LABEL: @undefRemCase
258 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
259 ; IR-BOTH-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[LOAD]], i32 1
260 ; IR-BOTH-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = srem i32 7, [[EXTRACT]]
261 ; IR-BOTH-NEXT: store i32 [[RES]], ptr %dest
263 define void @undefRemCase(ptr %addr1, ptr %dest) {
264 %in1 = load <2 x i32>, ptr %addr1, align 8
265 %extract = extractelement <2 x i32> %in1, i32 1
266 %out = srem i32 7, %extract
267 store i32 %out, ptr %dest, align 4
271 ; Check that we use an undef mask for undefined behavior if the fast-math
273 ; IR-BOTH-LABEL: @undefConstantFRemCaseWithFastMath
274 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x float>, ptr %addr1
276 ; IR-NORMAL-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x float> [[LOAD]], i32 1
277 ; IR-NORMAL-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = frem nnan float [[EXTRACT]], 7.0
279 ; IR-STRESS-NEXT: [[DIV:%[a-zA-Z_0-9-]+]] = frem nnan <2 x float> [[LOAD]], <float undef, float 7.000000e+00>
280 ; IR-STRESS-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = extractelement <2 x float> [[DIV]], i32 1
282 ; IR-BOTH-NEXT: store float [[RES]], ptr %dest
284 define void @undefConstantFRemCaseWithFastMath(ptr %addr1, ptr %dest) {
285 %in1 = load <2 x float>, ptr %addr1, align 8
286 %extract = extractelement <2 x float> %in1, i32 1
287 %out = frem nnan float %extract, 7.0
288 store float %out, ptr %dest, align 4
292 ; Check that we use an undef mask for undefined behavior if the fast-math
294 ; IR-BOTH-LABEL: @undefVectorFRemCaseWithFastMath
295 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x float>, ptr %addr1
297 ; IR-NORMAL-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x float> [[LOAD]], i32 1
298 ; IR-NORMAL-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = frem nnan float 7.000000e+00, [[EXTRACT]]
300 ; IR-STRESS-NEXT: [[DIV:%[a-zA-Z_0-9-]+]] = frem nnan <2 x float> <float undef, float 7.000000e+00>, [[LOAD]]
301 ; IR-STRESS-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = extractelement <2 x float> [[DIV]], i32 1
303 ; IR-BOTH-NEXT: store float [[RES]], ptr %dest
305 define void @undefVectorFRemCaseWithFastMath(ptr %addr1, ptr %dest) {
306 %in1 = load <2 x float>, ptr %addr1, align 8
307 %extract = extractelement <2 x float> %in1, i32 1
308 %out = frem nnan float 7.0, %extract
309 store float %out, ptr %dest, align 4
313 ; Check that we are able to promote floating point value.
314 ; This requires the STRESS mode, as floating point value are
315 ; not promote on armv7.
316 ; IR-BOTH-LABEL: @simpleOneInstructionPromotionFloat
317 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x float>, ptr %addr1
319 ; IR-NORMAL-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x float> [[LOAD]], i32 1
320 ; IR-NORMAL-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = fadd float [[EXTRACT]], 1.0
322 ; IR-STRESS-NEXT: [[DIV:%[a-zA-Z_0-9-]+]] = fadd <2 x float> [[LOAD]], <float undef, float 1.000000e+00>
323 ; IR-STRESS-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = extractelement <2 x float> [[DIV]], i32 1
325 ; IR-BOTH-NEXT: store float [[RES]], ptr %dest
327 define void @simpleOneInstructionPromotionFloat(ptr %addr1, ptr %dest) {
328 %in1 = load <2 x float>, ptr %addr1, align 8
329 %extract = extractelement <2 x float> %in1, i32 1
330 %out = fadd float %extract, 1.0
331 store float %out, ptr %dest, align 4
335 ; Check that we correctly use a splat constant when we cannot
336 ; determine at compile time the index of the extract.
337 ; This requires the STRESS modes, as variable index are expensive
339 ; IR-BOTH-LABEL: @simpleOneInstructionPromotionVariableIdx
340 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <2 x i32>, ptr %addr1
342 ; IR-NORMAL-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[LOAD]], i32 %idx
343 ; IR-NORMAL-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = or i32 [[EXTRACT]], 1
345 ; IR-STRESS-NEXT: [[OR:%[a-zA-Z_0-9-]+]] = or <2 x i32> [[LOAD]], splat (i32 1)
346 ; IR-STRESS-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = extractelement <2 x i32> [[OR]], i32 %idx
348 ; IR-BOTH-NEXT: store i32 [[RES]], ptr %dest
350 define void @simpleOneInstructionPromotionVariableIdx(ptr %addr1, ptr %dest, i32 %idx) {
351 %in1 = load <2 x i32>, ptr %addr1, align 8
352 %extract = extractelement <2 x i32> %in1, i32 %idx
353 %out = or i32 %extract, 1
354 store i32 %out, ptr %dest, align 4
358 ; Check a vector with more than 2 elements.
359 ; IR-BOTH-LABEL: @simpleOneInstructionPromotion8x8
360 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <8 x i8>, ptr %addr1
361 ; IR-BOTH-NEXT: [[OR:%[a-zA-Z_0-9-]+]] = or <8 x i8> [[LOAD]], <i8 undef, i8 1, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef>
362 ; IR-BOTH-NEXT: [[RES:%[a-zA-Z_0-9-]+]] = extractelement <8 x i8> [[OR]], i32 1
363 ; IR-BOTH-NEXT: store i8 [[RES]], ptr %dest
365 define void @simpleOneInstructionPromotion8x8(ptr %addr1, ptr %dest) {
366 %in1 = load <8 x i8>, ptr %addr1, align 8
367 %extract = extractelement <8 x i8> %in1, i32 1
368 %out = or i8 %extract, 1
369 store i8 %out, ptr %dest, align 4
373 ; Check that we optimized the sequence correctly when it can be
374 ; lowered on a Q register.
375 ; IR-BOTH-LABEL: @simpleOneInstructionPromotion
376 ; IR-BOTH: [[LOAD:%[a-zA-Z_0-9-]+]] = load <4 x i32>, ptr %addr1
377 ; IR-BOTH-NEXT: [[VECTOR_OR:%[a-zA-Z_0-9-]+]] = or <4 x i32> [[LOAD]], <i32 undef, i32 1, i32 undef, i32 undef>
378 ; IR-BOTH-NEXT: [[EXTRACT:%[a-zA-Z_0-9-]+]] = extractelement <4 x i32> [[VECTOR_OR]], i32 1
379 ; IR-BOTH-NEXT: store i32 [[EXTRACT]], ptr %dest
382 ; Make sure we got rid of any expensive vmov.32 instructions.
383 ; ASM-LABEL: simpleOneInstructionPromotion4x32:
384 ; ASM: vld1.64 {[[LOAD:d[0-9]+]], d{{[0-9]+}}}, [r0]
385 ; The Q register used here must be [[LOAD]] / 2, but we cannot express that.
386 ; ASM-NEXT: vorr.i32 q{{[[0-9]+}}, #0x1
387 ; ASM-NEXT: vst1.32 {[[LOAD]][1]}, [r1]
389 define void @simpleOneInstructionPromotion4x32(ptr %addr1, ptr %dest) {
390 %in1 = load <4 x i32>, ptr %addr1, align 8
391 %extract = extractelement <4 x i32> %in1, i32 1
392 %out = or i32 %extract, 1
393 store i32 %out, ptr %dest, align 1