1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 @g0 = common global i8 0, align 1
4 @g1 = common global i8 0, align 1
5 @g2 = common global i16 0, align 2
6 @g3 = common global i16 0, align 2
7 @g4 = common global i32 0, align 4
8 @g5 = common global i32 0, align 4
11 ; CHECK: memb(r{{[0-9]+}}+#0) += #1
12 define void @f0() #0 {
14 %v0 = load i8, ptr @g0, align 1, !tbaa !0
16 store i8 %v1, ptr @g0, align 1, !tbaa !0
21 ; CHECK: memb(r{{[0-9]+}}+#0) -= #1
22 define void @f1() #0 {
24 %v0 = load i8, ptr @g0, align 1, !tbaa !0
26 store i8 %v1, ptr @g0, align 1, !tbaa !0
31 ; CHECK: memb(r{{[0-9]+}}+#0) += #5
32 define void @f2() #0 {
34 %v0 = load i8, ptr @g0, align 1, !tbaa !0
35 %v1 = zext i8 %v0 to i32
36 %v2 = add nsw i32 %v1, 5
37 %v3 = trunc i32 %v2 to i8
38 store i8 %v3, ptr @g0, align 1, !tbaa !0
43 ; CHECK: memb(r{{[0-9]+}}+#0) -= #5
44 define void @f3() #0 {
46 %v0 = load i8, ptr @g0, align 1, !tbaa !0
47 %v1 = zext i8 %v0 to i32
48 %v2 = add nsw i32 %v1, 251
49 %v3 = trunc i32 %v2 to i8
50 store i8 %v3, ptr @g0, align 1, !tbaa !0
55 ; CHECK: memb(r{{[0-9]+}}+#0) -= #5
56 define void @f4() #0 {
58 %v0 = load i8, ptr @g0, align 1, !tbaa !0
59 %v1 = zext i8 %v0 to i32
60 %v2 = add nsw i32 %v1, 251
61 %v3 = trunc i32 %v2 to i8
62 store i8 %v3, ptr @g0, align 1, !tbaa !0
67 ; CHECK: memb(r{{[0-9]+}}+#0) += #5
68 define void @f5() #0 {
70 %v0 = load i8, ptr @g0, align 1, !tbaa !0
71 %v1 = zext i8 %v0 to i32
72 %v2 = add nsw i32 %v1, 5
73 %v3 = trunc i32 %v2 to i8
74 store i8 %v3, ptr @g0, align 1, !tbaa !0
79 ; CHECK: memb(r{{[0-9]+}}+#0) += r{{[0-9]+}}
80 define void @f6(i8 zeroext %a0) #0 {
82 %v0 = zext i8 %a0 to i32
83 %v1 = load i8, ptr @g0, align 1, !tbaa !0
84 %v2 = zext i8 %v1 to i32
85 %v3 = add nsw i32 %v2, %v0
86 %v4 = trunc i32 %v3 to i8
87 store i8 %v4, ptr @g0, align 1, !tbaa !0
92 ; CHECK: memb(r{{[0-9]+}}+#0) -= r{{[0-9]+}}
93 define void @f7(i8 zeroext %a0) #0 {
95 %v0 = zext i8 %a0 to i32
96 %v1 = load i8, ptr @g0, align 1, !tbaa !0
97 %v2 = zext i8 %v1 to i32
98 %v3 = sub nsw i32 %v2, %v0
99 %v4 = trunc i32 %v3 to i8
100 store i8 %v4, ptr @g0, align 1, !tbaa !0
105 ; CHECK: memb(r{{[0-9]+}}+#0) |= r{{[0-9]+}}
106 define void @f8(i8 zeroext %a0) #0 {
108 %v0 = load i8, ptr @g0, align 1, !tbaa !0
110 store i8 %v1, ptr @g0, align 1, !tbaa !0
115 ; CHECK: memb(r{{[0-9]+}}+#0) &= r{{[0-9]+}}
116 define void @f9(i8 zeroext %a0) #0 {
118 %v0 = load i8, ptr @g0, align 1, !tbaa !0
119 %v1 = and i8 %v0, %a0
120 store i8 %v1, ptr @g0, align 1, !tbaa !0
125 ; CHECK: memb(r{{[0-9]+}}+#0) = clrbit(#5)
126 define void @f10() #0 {
128 %v0 = load i8, ptr @g0, align 1, !tbaa !0
129 %v1 = zext i8 %v0 to i32
130 %v2 = and i32 %v1, 223
131 %v3 = trunc i32 %v2 to i8
132 store i8 %v3, ptr @g0, align 1, !tbaa !0
137 ; CHECK: memb(r{{[0-9]+}}+#0) = setbit(#7)
138 define void @f11() #0 {
140 %v0 = load i8, ptr @g0, align 1, !tbaa !0
141 %v1 = zext i8 %v0 to i32
142 %v2 = or i32 %v1, 128
143 %v3 = trunc i32 %v2 to i8
144 store i8 %v3, ptr @g0, align 1, !tbaa !0
149 ; CHECK: memb(r{{[0-9]+}}+#0) += #1
150 define void @f12() #0 {
152 %v0 = load i8, ptr @g1, align 1, !tbaa !0
154 store i8 %v1, ptr @g1, align 1, !tbaa !0
159 ; CHECK: memb(r{{[0-9]+}}+#0) -= #1
160 define void @f13() #0 {
162 %v0 = load i8, ptr @g1, align 1, !tbaa !0
164 store i8 %v1, ptr @g1, align 1, !tbaa !0
169 ; CHECK: memb(r{{[0-9]+}}+#0) += #5
170 define void @f14() #0 {
172 %v0 = load i8, ptr @g1, align 1, !tbaa !0
173 %v1 = zext i8 %v0 to i32
174 %v2 = add nsw i32 %v1, 5
175 %v3 = trunc i32 %v2 to i8
176 store i8 %v3, ptr @g1, align 1, !tbaa !0
181 ; CHECK: memb(r{{[0-9]+}}+#0) -= #5
182 define void @f15() #0 {
184 %v0 = load i8, ptr @g1, align 1, !tbaa !0
185 %v1 = zext i8 %v0 to i32
186 %v2 = add nsw i32 %v1, 251
187 %v3 = trunc i32 %v2 to i8
188 store i8 %v3, ptr @g1, align 1, !tbaa !0
193 ; CHECK: memb(r{{[0-9]+}}+#0) -= #5
194 define void @f16() #0 {
196 %v0 = load i8, ptr @g1, align 1, !tbaa !0
197 %v1 = zext i8 %v0 to i32
198 %v2 = add nsw i32 %v1, 251
199 %v3 = trunc i32 %v2 to i8
200 store i8 %v3, ptr @g1, align 1, !tbaa !0
205 ; CHECK: memb(r{{[0-9]+}}+#0) += #5
206 define void @f17() #0 {
208 %v0 = load i8, ptr @g1, align 1, !tbaa !0
209 %v1 = zext i8 %v0 to i32
210 %v2 = add nsw i32 %v1, 5
211 %v3 = trunc i32 %v2 to i8
212 store i8 %v3, ptr @g1, align 1, !tbaa !0
217 ; CHECK: memb(r{{[0-9]+}}+#0) += r{{[0-9]+}}
218 define void @f18(i8 signext %a0) #0 {
220 %v0 = zext i8 %a0 to i32
221 %v1 = load i8, ptr @g1, align 1, !tbaa !0
222 %v2 = zext i8 %v1 to i32
223 %v3 = add nsw i32 %v2, %v0
224 %v4 = trunc i32 %v3 to i8
225 store i8 %v4, ptr @g1, align 1, !tbaa !0
230 ; CHECK: memb(r{{[0-9]+}}+#0) -= r{{[0-9]+}}
231 define void @f19(i8 signext %a0) #0 {
233 %v0 = zext i8 %a0 to i32
234 %v1 = load i8, ptr @g1, align 1, !tbaa !0
235 %v2 = zext i8 %v1 to i32
236 %v3 = sub nsw i32 %v2, %v0
237 %v4 = trunc i32 %v3 to i8
238 store i8 %v4, ptr @g1, align 1, !tbaa !0
243 ; CHECK: memb(r{{[0-9]+}}+#0) |= r{{[0-9]+}}
244 define void @f20(i8 signext %a0) #0 {
246 %v0 = load i8, ptr @g1, align 1, !tbaa !0
248 store i8 %v1, ptr @g1, align 1, !tbaa !0
253 ; CHECK: memb(r{{[0-9]+}}+#0) &= r{{[0-9]+}}
254 define void @f21(i8 signext %a0) #0 {
256 %v0 = load i8, ptr @g1, align 1, !tbaa !0
257 %v1 = and i8 %v0, %a0
258 store i8 %v1, ptr @g1, align 1, !tbaa !0
263 ; CHECK: memb(r{{[0-9]+}}+#0) = clrbit(#5)
264 define void @f22() #0 {
266 %v0 = load i8, ptr @g1, align 1, !tbaa !0
267 %v1 = zext i8 %v0 to i32
268 %v2 = and i32 %v1, 223
269 %v3 = trunc i32 %v2 to i8
270 store i8 %v3, ptr @g1, align 1, !tbaa !0
275 ; CHECK: memb(r{{[0-9]+}}+#0) = setbit(#7)
276 define void @f23() #0 {
278 %v0 = load i8, ptr @g1, align 1, !tbaa !0
279 %v1 = zext i8 %v0 to i32
280 %v2 = or i32 %v1, 128
281 %v3 = trunc i32 %v2 to i8
282 store i8 %v3, ptr @g1, align 1, !tbaa !0
287 ; CHECK: memh(r{{[0-9]+}}+#0) += #1
288 define void @f24() #0 {
290 %v0 = load i16, ptr @g2, align 2, !tbaa !3
292 store i16 %v1, ptr @g2, align 2, !tbaa !3
297 ; CHECK: memh(r{{[0-9]+}}+#0) -= #1
298 define void @f25() #0 {
300 %v0 = load i16, ptr @g2, align 2, !tbaa !3
301 %v1 = add i16 %v0, -1
302 store i16 %v1, ptr @g2, align 2, !tbaa !3
307 ; CHECK: memh(r{{[0-9]+}}+#0) += #5
308 define void @f26() #0 {
310 %v0 = load i16, ptr @g2, align 2, !tbaa !3
311 %v1 = zext i16 %v0 to i32
312 %v2 = add nsw i32 %v1, 5
313 %v3 = trunc i32 %v2 to i16
314 store i16 %v3, ptr @g2, align 2, !tbaa !3
319 ; CHECK: memh(r{{[0-9]+}}+#0) -= #5
320 define void @f27() #0 {
322 %v0 = load i16, ptr @g2, align 2, !tbaa !3
323 %v1 = zext i16 %v0 to i32
324 %v2 = add nsw i32 %v1, 65531
325 %v3 = trunc i32 %v2 to i16
326 store i16 %v3, ptr @g2, align 2, !tbaa !3
331 ; CHECK: memh(r{{[0-9]+}}+#0) -= #5
332 define void @f28() #0 {
334 %v0 = load i16, ptr @g2, align 2, !tbaa !3
335 %v1 = zext i16 %v0 to i32
336 %v2 = add nsw i32 %v1, 65531
337 %v3 = trunc i32 %v2 to i16
338 store i16 %v3, ptr @g2, align 2, !tbaa !3
343 ; CHECK: memh(r{{[0-9]+}}+#0) += #5
344 define void @f29() #0 {
346 %v0 = load i16, ptr @g2, align 2, !tbaa !3
347 %v1 = zext i16 %v0 to i32
348 %v2 = add nsw i32 %v1, 5
349 %v3 = trunc i32 %v2 to i16
350 store i16 %v3, ptr @g2, align 2, !tbaa !3
355 ; CHECK: memh(r{{[0-9]+}}+#0) += r{{[0-9]+}}
356 define void @f30(i16 zeroext %a0) #0 {
358 %v0 = zext i16 %a0 to i32
359 %v1 = load i16, ptr @g2, align 2, !tbaa !3
360 %v2 = zext i16 %v1 to i32
361 %v3 = add nsw i32 %v2, %v0
362 %v4 = trunc i32 %v3 to i16
363 store i16 %v4, ptr @g2, align 2, !tbaa !3
368 ; CHECK: memh(r{{[0-9]+}}+#0) -= r{{[0-9]+}}
369 define void @f31(i16 zeroext %a0) #0 {
371 %v0 = zext i16 %a0 to i32
372 %v1 = load i16, ptr @g2, align 2, !tbaa !3
373 %v2 = zext i16 %v1 to i32
374 %v3 = sub nsw i32 %v2, %v0
375 %v4 = trunc i32 %v3 to i16
376 store i16 %v4, ptr @g2, align 2, !tbaa !3
381 ; CHECK: memh(r{{[0-9]+}}+#0) |= r{{[0-9]+}}
382 define void @f32(i16 zeroext %a0) #0 {
384 %v0 = load i16, ptr @g2, align 2, !tbaa !3
385 %v1 = or i16 %v0, %a0
386 store i16 %v1, ptr @g2, align 2, !tbaa !3
391 ; CHECK: memh(r{{[0-9]+}}+#0) &= r{{[0-9]+}}
392 define void @f33(i16 zeroext %a0) #0 {
394 %v0 = load i16, ptr @g2, align 2, !tbaa !3
395 %v1 = and i16 %v0, %a0
396 store i16 %v1, ptr @g2, align 2, !tbaa !3
401 ; CHECK: memh(r{{[0-9]+}}+#0) = clrbit(#5)
402 define void @f34() #0 {
404 %v0 = load i16, ptr @g2, align 2, !tbaa !3
405 %v1 = zext i16 %v0 to i32
406 %v2 = and i32 %v1, 65503
407 %v3 = trunc i32 %v2 to i16
408 store i16 %v3, ptr @g2, align 2, !tbaa !3
413 ; CHECK: memh(r{{[0-9]+}}+#0) = setbit(#7)
414 define void @f35() #0 {
416 %v0 = load i16, ptr @g2, align 2, !tbaa !3
417 %v1 = zext i16 %v0 to i32
418 %v2 = or i32 %v1, 128
419 %v3 = trunc i32 %v2 to i16
420 store i16 %v3, ptr @g2, align 2, !tbaa !3
425 ; CHECK: memh(r{{[0-9]+}}+#0) += #1
426 define void @f36() #0 {
428 %v0 = load i16, ptr @g3, align 2, !tbaa !3
430 store i16 %v1, ptr @g3, align 2, !tbaa !3
435 ; CHECK: memh(r{{[0-9]+}}+#0) -= #1
436 define void @f37() #0 {
438 %v0 = load i16, ptr @g3, align 2, !tbaa !3
439 %v1 = add i16 %v0, -1
440 store i16 %v1, ptr @g3, align 2, !tbaa !3
445 ; CHECK: memh(r{{[0-9]+}}+#0) += #5
446 define void @f38() #0 {
448 %v0 = load i16, ptr @g3, align 2, !tbaa !3
449 %v1 = zext i16 %v0 to i32
450 %v2 = add nsw i32 %v1, 5
451 %v3 = trunc i32 %v2 to i16
452 store i16 %v3, ptr @g3, align 2, !tbaa !3
457 ; CHECK: memh(r{{[0-9]+}}+#0) -= #5
458 define void @f39() #0 {
460 %v0 = load i16, ptr @g3, align 2, !tbaa !3
461 %v1 = zext i16 %v0 to i32
462 %v2 = add nsw i32 %v1, 65531
463 %v3 = trunc i32 %v2 to i16
464 store i16 %v3, ptr @g3, align 2, !tbaa !3
469 ; CHECK: memh(r{{[0-9]+}}+#0) -= #5
470 define void @f40() #0 {
472 %v0 = load i16, ptr @g3, align 2, !tbaa !3
473 %v1 = zext i16 %v0 to i32
474 %v2 = add nsw i32 %v1, 65531
475 %v3 = trunc i32 %v2 to i16
476 store i16 %v3, ptr @g3, align 2, !tbaa !3
481 ; CHECK: memh(r{{[0-9]+}}+#0) += #5
482 define void @f41() #0 {
484 %v0 = load i16, ptr @g3, align 2, !tbaa !3
485 %v1 = zext i16 %v0 to i32
486 %v2 = add nsw i32 %v1, 5
487 %v3 = trunc i32 %v2 to i16
488 store i16 %v3, ptr @g3, align 2, !tbaa !3
493 ; CHECK: memh(r{{[0-9]+}}+#0) += r{{[0-9]+}}
494 define void @f42(i16 signext %a0) #0 {
496 %v0 = zext i16 %a0 to i32
497 %v1 = load i16, ptr @g3, align 2, !tbaa !3
498 %v2 = zext i16 %v1 to i32
499 %v3 = add nsw i32 %v2, %v0
500 %v4 = trunc i32 %v3 to i16
501 store i16 %v4, ptr @g3, align 2, !tbaa !3
506 ; CHECK: memh(r{{[0-9]+}}+#0) -= r{{[0-9]+}}
507 define void @f43(i16 signext %a0) #0 {
509 %v0 = zext i16 %a0 to i32
510 %v1 = load i16, ptr @g3, align 2, !tbaa !3
511 %v2 = zext i16 %v1 to i32
512 %v3 = sub nsw i32 %v2, %v0
513 %v4 = trunc i32 %v3 to i16
514 store i16 %v4, ptr @g3, align 2, !tbaa !3
519 ; CHECK: memh(r{{[0-9]+}}+#0) |= r{{[0-9]+}}
520 define void @f44(i16 signext %a0) #0 {
522 %v0 = load i16, ptr @g3, align 2, !tbaa !3
523 %v1 = or i16 %v0, %a0
524 store i16 %v1, ptr @g3, align 2, !tbaa !3
529 ; CHECK: memh(r{{[0-9]+}}+#0) &= r{{[0-9]+}}
530 define void @f45(i16 signext %a0) #0 {
532 %v0 = load i16, ptr @g3, align 2, !tbaa !3
533 %v1 = and i16 %v0, %a0
534 store i16 %v1, ptr @g3, align 2, !tbaa !3
539 ; CHECK: memh(r{{[0-9]+}}+#0) = clrbit(#5)
540 define void @f46() #0 {
542 %v0 = load i16, ptr @g3, align 2, !tbaa !3
543 %v1 = zext i16 %v0 to i32
544 %v2 = and i32 %v1, 65503
545 %v3 = trunc i32 %v2 to i16
546 store i16 %v3, ptr @g3, align 2, !tbaa !3
551 ; CHECK: memh(r{{[0-9]+}}+#0) = setbit(#7)
552 define void @f47() #0 {
554 %v0 = load i16, ptr @g3, align 2, !tbaa !3
555 %v1 = zext i16 %v0 to i32
556 %v2 = or i32 %v1, 128
557 %v3 = trunc i32 %v2 to i16
558 store i16 %v3, ptr @g3, align 2, !tbaa !3
563 ; CHECK: memw(r{{[0-9]+}}+#0) += #1
564 define void @f48() #0 {
566 %v0 = load i32, ptr @g4, align 4, !tbaa !5
567 %v1 = add nsw i32 %v0, 1
568 store i32 %v1, ptr @g4, align 4, !tbaa !5
573 ; CHECK: memw(r{{[0-9]+}}+#0) -= #1
574 define void @f49() #0 {
576 %v0 = load i32, ptr @g4, align 4, !tbaa !5
577 %v1 = add nsw i32 %v0, -1
578 store i32 %v1, ptr @g4, align 4, !tbaa !5
583 ; CHECK: memw(r{{[0-9]+}}+#0) += #5
584 define void @f50() #0 {
586 %v0 = load i32, ptr @g4, align 4, !tbaa !5
587 %v1 = add nsw i32 %v0, 5
588 store i32 %v1, ptr @g4, align 4, !tbaa !5
593 ; CHECK: memw(r{{[0-9]+}}+#0) -= #5
594 define void @f51() #0 {
596 %v0 = load i32, ptr @g4, align 4, !tbaa !5
597 %v1 = add nsw i32 %v0, -5
598 store i32 %v1, ptr @g4, align 4, !tbaa !5
603 ; CHECK: memw(r{{[0-9]+}}+#0) -= #5
604 define void @f52() #0 {
606 %v0 = load i32, ptr @g4, align 4, !tbaa !5
607 %v1 = add nsw i32 %v0, -5
608 store i32 %v1, ptr @g4, align 4, !tbaa !5
613 ; CHECK: memw(r{{[0-9]+}}+#0) += #5
614 define void @f53() #0 {
616 %v0 = load i32, ptr @g4, align 4, !tbaa !5
617 %v1 = add nsw i32 %v0, 5
618 store i32 %v1, ptr @g4, align 4, !tbaa !5
623 ; CHECK: memw(r{{[0-9]+}}+#0) += r{{[0-9]+}}
624 define void @f54(i32 %a0) #0 {
626 %v0 = load i32, ptr @g4, align 4, !tbaa !5
627 %v1 = add i32 %v0, %a0
628 store i32 %v1, ptr @g4, align 4, !tbaa !5
633 ; CHECK: memw(r{{[0-9]+}}+#0) -= r{{[0-9]+}}
634 define void @f55(i32 %a0) #0 {
636 %v0 = load i32, ptr @g4, align 4, !tbaa !5
637 %v1 = sub i32 %v0, %a0
638 store i32 %v1, ptr @g4, align 4, !tbaa !5
643 ; CHECK: memw(r{{[0-9]+}}+#0) |= r{{[0-9]+}}
644 define void @f56(i32 %a0) #0 {
646 %v0 = load i32, ptr @g4, align 4, !tbaa !5
647 %v1 = or i32 %v0, %a0
648 store i32 %v1, ptr @g4, align 4, !tbaa !5
653 ; CHECK: memw(r{{[0-9]+}}+#0) &= r{{[0-9]+}}
654 define void @f57(i32 %a0) #0 {
656 %v0 = load i32, ptr @g4, align 4, !tbaa !5
657 %v1 = and i32 %v0, %a0
658 store i32 %v1, ptr @g4, align 4, !tbaa !5
663 ; CHECK: memw(r{{[0-9]+}}+#0) = clrbit(#5)
664 define void @f58() #0 {
666 %v0 = load i32, ptr @g4, align 4, !tbaa !5
667 %v1 = and i32 %v0, -33
668 store i32 %v1, ptr @g4, align 4, !tbaa !5
673 ; CHECK: memw(r{{[0-9]+}}+#0) = setbit(#7)
674 define void @f59() #0 {
676 %v0 = load i32, ptr @g4, align 4, !tbaa !5
677 %v1 = or i32 %v0, 128
678 store i32 %v1, ptr @g4, align 4, !tbaa !5
683 ; CHECK: memw(r{{[0-9]+}}+#0) += #1
684 define void @f60() #0 {
686 %v0 = load i32, ptr @g5, align 4, !tbaa !5
688 store i32 %v1, ptr @g5, align 4, !tbaa !5
693 ; CHECK: memw(r{{[0-9]+}}+#0) -= #1
694 define void @f61() #0 {
696 %v0 = load i32, ptr @g5, align 4, !tbaa !5
697 %v1 = add i32 %v0, -1
698 store i32 %v1, ptr @g5, align 4, !tbaa !5
703 ; CHECK: memw(r{{[0-9]+}}+#0) += #5
704 define void @f62() #0 {
706 %v0 = load i32, ptr @g5, align 4, !tbaa !5
708 store i32 %v1, ptr @g5, align 4, !tbaa !5
713 ; CHECK: memw(r{{[0-9]+}}+#0) -= #5
714 define void @f63() #0 {
716 %v0 = load i32, ptr @g5, align 4, !tbaa !5
717 %v1 = add i32 %v0, -5
718 store i32 %v1, ptr @g5, align 4, !tbaa !5
723 ; CHECK: memw(r{{[0-9]+}}+#0) -= #5
724 define void @f64() #0 {
726 %v0 = load i32, ptr @g5, align 4, !tbaa !5
727 %v1 = add i32 %v0, -5
728 store i32 %v1, ptr @g5, align 4, !tbaa !5
733 ; CHECK: memw(r{{[0-9]+}}+#0) += #5
734 define void @f65() #0 {
736 %v0 = load i32, ptr @g5, align 4, !tbaa !5
738 store i32 %v1, ptr @g5, align 4, !tbaa !5
743 ; CHECK: memw(r{{[0-9]+}}+#0) += r{{[0-9]+}}
744 define void @f66(i32 %a0) #0 {
746 %v0 = load i32, ptr @g5, align 4, !tbaa !5
747 %v1 = add i32 %v0, %a0
748 store i32 %v1, ptr @g5, align 4, !tbaa !5
753 ; CHECK: memw(r{{[0-9]+}}+#0) -= r{{[0-9]+}}
754 define void @f67(i32 %a0) #0 {
756 %v0 = load i32, ptr @g5, align 4, !tbaa !5
757 %v1 = sub i32 %v0, %a0
758 store i32 %v1, ptr @g5, align 4, !tbaa !5
763 ; CHECK: memw(r{{[0-9]+}}+#0) |= r{{[0-9]+}}
764 define void @f68(i32 %a0) #0 {
766 %v0 = load i32, ptr @g5, align 4, !tbaa !5
767 %v1 = or i32 %v0, %a0
768 store i32 %v1, ptr @g5, align 4, !tbaa !5
773 ; CHECK: memw(r{{[0-9]+}}+#0) &= r{{[0-9]+}}
774 define void @f69(i32 %a0) #0 {
776 %v0 = load i32, ptr @g5, align 4, !tbaa !5
777 %v1 = and i32 %v0, %a0
778 store i32 %v1, ptr @g5, align 4, !tbaa !5
783 ; CHECK: memw(r{{[0-9]+}}+#0) = clrbit(#5)
784 define void @f70() #0 {
786 %v0 = load i32, ptr @g5, align 4, !tbaa !5
787 %v1 = and i32 %v0, -33
788 store i32 %v1, ptr @g5, align 4, !tbaa !5
793 ; CHECK: memw(r{{[0-9]+}}+#0) = setbit(#7)
794 define void @f71() #0 {
796 %v0 = load i32, ptr @g5, align 4, !tbaa !5
797 %v1 = or i32 %v0, 128
798 store i32 %v1, ptr @g5, align 4, !tbaa !5
802 attributes #0 = { nounwind }
804 !0 = !{!1, !1, i64 0}
805 !1 = !{!"omnipotent char", !2}
806 !2 = !{!"Simple C/C++ TBAA"}
807 !3 = !{!4, !4, i64 0}
809 !5 = !{!6, !6, i64 0}