1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -march=hexagon < %s | FileCheck %s
4 define void @f0(ptr %a0, ptr %a1, ptr %a2, ptr %a3) {
6 ; CHECK: .cfi_startproc
7 ; CHECK-NEXT: // %bb.0: // %b0
9 ; CHECK-NEXT: r0 = memub(r0+#0)
15 ; CHECK-NEXT: r0 = mux(p0,r1,r2)
18 ; CHECK-NEXT: r0 = memub(r0+#0)
24 ; CHECK-NEXT: r0 = mux(p0,#1,#0)
25 ; CHECK-NEXT: jumpr r31
26 ; CHECK-NEXT: memb(r3+#0) = r0.new
29 %v0 = load i1, ptr %a0
30 %v1 = load i1, ptr %a1
31 %v2 = load i1, ptr %a2
32 %v3 = select i1 %v0, i1 %v1, i1 %v2
37 define void @f1(ptr %a0, ptr %a1, ptr %a2, ptr %a3) {
39 ; CHECK: .cfi_startproc
40 ; CHECK-NEXT: // %bb.0: // %b0
42 ; CHECK-NEXT: r0 = memub(r0+#0)
48 ; CHECK-NEXT: r0 = mux(p0,r1,r2)
51 ; CHECK-NEXT: jumpr r31
52 ; CHECK-NEXT: r0 = memub(r0+#0)
53 ; CHECK-NEXT: memb(r3+#0) = r0.new
56 %v0 = load i1, ptr %a0
57 %v1 = load <2 x i1>, ptr %a1
58 %v2 = load <2 x i1>, ptr %a2
59 %v3 = select i1 %v0, <2 x i1> %v1, <2 x i1> %v2
60 store <2 x i1> %v3, ptr %a3
64 define void @f2(ptr %a0, ptr %a1, ptr %a2, ptr %a3) {
66 ; CHECK: .cfi_startproc
67 ; CHECK-NEXT: // %bb.0: // %b0
69 ; CHECK-NEXT: r0 = memub(r0+#0)
75 ; CHECK-NEXT: r0 = mux(p0,r1,r2)
78 ; CHECK-NEXT: jumpr r31
79 ; CHECK-NEXT: r0 = memub(r0+#0)
80 ; CHECK-NEXT: memb(r3+#0) = r0.new
83 %v0 = load i1, ptr %a0
84 %v1 = load <4 x i1>, ptr %a1
85 %v2 = load <4 x i1>, ptr %a2
86 %v3 = select i1 %v0, <4 x i1> %v1, <4 x i1> %v2
87 store <4 x i1> %v3, ptr %a3
91 define void @f3(ptr %a0, ptr %a1, ptr %a2, ptr %a3) {
93 ; CHECK: .cfi_startproc
94 ; CHECK-NEXT: // %bb.0: // %b0
96 ; CHECK-NEXT: r0 = memub(r0+#0)
102 ; CHECK-NEXT: r0 = mux(p0,r1,r2)
105 ; CHECK-NEXT: jumpr r31
106 ; CHECK-NEXT: r0 = memub(r0+#0)
107 ; CHECK-NEXT: memb(r3+#0) = r0.new
110 %v0 = load i1, ptr %a0
111 %v1 = load <8 x i1>, ptr %a1
112 %v2 = load <8 x i1>, ptr %a2
113 %v3 = select i1 %v0, <8 x i1> %v1, <8 x i1> %v2
114 store <8 x i1> %v3, ptr %a3
118 define void @f4(ptr %a0, ptr %a1, ptr %a2, ptr %a3) {
120 ; CHECK: .cfi_startproc
121 ; CHECK-NEXT: // %bb.0: // %b0
123 ; CHECK-NEXT: r1 = memub(r1+#0)
124 ; CHECK-NEXT: r0 = memub(r0+#0)
127 ; CHECK-NEXT: r2 = memub(r2+#0)
130 ; CHECK-NEXT: p0 = r0
131 ; CHECK-NEXT: p1 = r1
134 ; CHECK-NEXT: p2 = r2
135 ; CHECK-NEXT: p1 = and(p1,p0)
138 ; CHECK-NEXT: p0 = or(p1,and(p2,!p0))
141 ; CHECK-NEXT: r2 = p0
142 ; CHECK-NEXT: jumpr r31
143 ; CHECK-NEXT: memb(r3+#0) = r2.new
146 %v0 = load <2 x i1>, ptr %a0
147 %v1 = load <2 x i1>, ptr %a1
148 %v2 = load <2 x i1>, ptr %a2
149 %v3 = select <2 x i1> %v0, <2 x i1> %v1, <2 x i1> %v2
150 store <2 x i1> %v3, ptr %a3
154 define void @f5(ptr %a0, ptr %a1, ptr %a2, ptr %a3) {
156 ; CHECK: .cfi_startproc
157 ; CHECK-NEXT: // %bb.0: // %b0
159 ; CHECK-NEXT: r1 = memub(r1+#0)
160 ; CHECK-NEXT: r0 = memub(r0+#0)
163 ; CHECK-NEXT: r2 = memub(r2+#0)
166 ; CHECK-NEXT: p0 = r0
167 ; CHECK-NEXT: p1 = r1
170 ; CHECK-NEXT: p2 = r2
171 ; CHECK-NEXT: p1 = and(p1,p0)
174 ; CHECK-NEXT: p0 = or(p1,and(p2,!p0))
177 ; CHECK-NEXT: r2 = p0
178 ; CHECK-NEXT: jumpr r31
179 ; CHECK-NEXT: memb(r3+#0) = r2.new
182 %v0 = load <4 x i1>, ptr %a0
183 %v1 = load <4 x i1>, ptr %a1
184 %v2 = load <4 x i1>, ptr %a2
185 %v3 = select <4 x i1> %v0, <4 x i1> %v1, <4 x i1> %v2
186 store <4 x i1> %v3, ptr %a3
190 define void @f6(ptr %a0, ptr %a1, ptr %a2, ptr %a3) {
192 ; CHECK: .cfi_startproc
193 ; CHECK-NEXT: // %bb.0: // %b0
195 ; CHECK-NEXT: r1 = memub(r1+#0)
196 ; CHECK-NEXT: r0 = memub(r0+#0)
199 ; CHECK-NEXT: r2 = memub(r2+#0)
202 ; CHECK-NEXT: p0 = r0
203 ; CHECK-NEXT: p1 = r1
206 ; CHECK-NEXT: p2 = r2
207 ; CHECK-NEXT: p1 = and(p1,p0)
210 ; CHECK-NEXT: p0 = or(p1,and(p2,!p0))
213 ; CHECK-NEXT: r2 = p0
214 ; CHECK-NEXT: jumpr r31
215 ; CHECK-NEXT: memb(r3+#0) = r2.new
218 %v0 = load <8 x i1>, ptr %a0
219 %v1 = load <8 x i1>, ptr %a1
220 %v2 = load <8 x i1>, ptr %a2
221 %v3 = select <8 x i1> %v0, <8 x i1> %v1, <8 x i1> %v2
222 store <8 x i1> %v3, ptr %a3