1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -march=hexagon < %s | FileCheck %s
4 define void @f0(ptr %a0, i32 %a1, i32 %a2) #0 {
8 ; CHECK-NEXT: p0 = tstbit(r1,#0)
11 ; CHECK-NEXT: r2 = asl(r2,#2)
14 ; CHECK-NEXT: r4 = memub(r0+#0)
20 ; CHECK-NEXT: r1 = mux(p0,#-1,#0)
23 ; CHECK-NEXT: r4 = insert(r1,r3:2)
26 ; CHECK-NEXT: r1 = and(r4,#255)
29 ; CHECK-NEXT: memb(r0+#0) = r1
32 ; CHECK-NEXT: jumpr r31
34 %v0 = load <2 x i1>, ptr %a0
35 %v1 = trunc i32 %a1 to i1
36 %v2 = insertelement <2 x i1> %v0, i1 %v1, i32 %a2
37 store <2 x i1> %v2, ptr %a0
41 define void @f1(ptr %a0, i32 %a1, i32 %a2) #0 {
45 ; CHECK-NEXT: p0 = tstbit(r1,#0)
48 ; CHECK-NEXT: r2 = asl(r2,#1)
51 ; CHECK-NEXT: r4 = memub(r0+#0)
57 ; CHECK-NEXT: r1 = mux(p0,#-1,#0)
60 ; CHECK-NEXT: r4 = insert(r1,r3:2)
63 ; CHECK-NEXT: r1 = and(r4,#255)
66 ; CHECK-NEXT: memb(r0+#0) = r1
69 ; CHECK-NEXT: jumpr r31
71 %v0 = load <4 x i1>, ptr %a0
72 %v1 = trunc i32 %a1 to i1
73 %v2 = insertelement <4 x i1> %v0, i1 %v1, i32 %a2
74 store <4 x i1> %v2, ptr %a0
78 define void @f2(ptr %a0, i32 %a1, i32 %a2) #0 {
82 ; CHECK-NEXT: p0 = tstbit(r1,#0)
85 ; CHECK-NEXT: r6 = memub(r0+#0)
91 ; CHECK-NEXT: r4 = mux(p0,#-1,#0)
94 ; CHECK-NEXT: r6 = insert(r4,r3:2)
97 ; CHECK-NEXT: r1 = and(r6,#255)
100 ; CHECK-NEXT: memb(r0+#0) = r1
103 ; CHECK-NEXT: jumpr r31
105 %v0 = load <8 x i1>, ptr %a0
106 %v1 = trunc i32 %a1 to i1
107 %v2 = insertelement <8 x i1> %v0, i1 %v1, i32 %a2
108 store <8 x i1> %v2, ptr %a0
112 attributes #0 = { nounwind "target-features"="-packets" }