1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve -run-pass arm-mve-vpt %s -o - | FileCheck %s
6 define arm_aapcs_vfpcc <4 x i32> @vpnot(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
8 %0 = icmp slt <4 x i32> %a, zeroinitializer
9 %c2 = icmp sgt <4 x i32> %b, zeroinitializer
10 %c3 = icmp eq <4 x i32> %c, zeroinitializer
11 %o1 = and <4 x i1> %0, %c2
12 %o2 = xor <4 x i1> %o1, <i1 true, i1 true, i1 true, i1 true>
13 %o = and <4 x i1> %c3, %o2
14 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
18 define arm_aapcs_vfpcc <4 x i32> @vpnot_end(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
20 %0 = icmp slt <4 x i32> %a, zeroinitializer
21 %c2 = icmp sgt <4 x i32> %b, zeroinitializer
22 %c3 = icmp eq <4 x i32> %c, zeroinitializer
23 %o1 = and <4 x i1> %0, %c2
24 %o2 = xor <4 x i1> %o1, <i1 true, i1 true, i1 true, i1 true>
27 %o = and <4 x i1> %c3, %o2
28 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b
32 define arm_aapcs_vfpcc <4 x i32> @vpnot_two(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
36 define arm_aapcs_vfpcc <4 x i32> @vpnot_lots(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
40 define arm_aapcs_vfpcc <4 x i32> @vpnot_first(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
44 define arm_aapcs_vfpcc <4 x i32> @vpnot_many(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
53 tracksRegLiveness: true
55 - { reg: '$q0', virtual-reg: '' }
56 - { reg: '$q1', virtual-reg: '' }
57 - { reg: '$q2', virtual-reg: '' }
60 liveins: $q0, $q1, $q2
62 ; CHECK-LABEL: name: vpnot
63 ; CHECK: liveins: $q0, $q1, $q2
64 ; CHECK: BUNDLE implicit-def $vpr, implicit $q0, implicit $zr, implicit $q1 {
65 ; CHECK: MVE_VPTv4s32r 8, renamable $q0, $zr, 11, implicit-def $vpr
66 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, internal killed renamable $vpr
68 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
69 ; CHECK: BUNDLE implicit-def $vpr, implicit killed $q2, implicit $zr {
70 ; CHECK: MVE_VPST 8, implicit-def $vpr
71 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, internal killed renamable $vpr
73 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
74 ; CHECK: tBX_RET 14, $noreg, implicit $q0
75 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
76 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
77 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
78 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
79 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
80 tBX_RET 14, $noreg, implicit $q0
86 tracksRegLiveness: true
88 - { reg: '$q0', virtual-reg: '' }
89 - { reg: '$q1', virtual-reg: '' }
90 - { reg: '$q2', virtual-reg: '' }
92 ; CHECK-LABEL: name: vpnot_end
94 ; CHECK: successors: %bb.1(0x80000000)
95 ; CHECK: liveins: $q0, $q1, $q2
96 ; CHECK: BUNDLE implicit-def $vpr, implicit $q0, implicit $zr, implicit $q1 {
97 ; CHECK: MVE_VPTv4s32r 8, renamable $q0, $zr, 11, implicit-def $vpr
98 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, internal killed renamable $vpr
100 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
102 ; CHECK: liveins: $q0, $q1, $q2, $vpr
103 ; CHECK: BUNDLE implicit-def $vpr, implicit killed $q2, implicit $zr {
104 ; CHECK: MVE_VPST 8, implicit-def $vpr
105 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, internal killed renamable $vpr
107 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
108 ; CHECK: tBX_RET 14, $noreg, implicit $q0
110 liveins: $q0, $q1, $q2
112 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
113 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
114 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
117 liveins: $q0, $q1, $q2, $vpr
119 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
120 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
121 tBX_RET 14, $noreg, implicit $q0
127 tracksRegLiveness: true
129 - { reg: '$q0', virtual-reg: '' }
130 - { reg: '$q1', virtual-reg: '' }
131 - { reg: '$q2', virtual-reg: '' }
134 liveins: $q0, $q1, $q2
136 ; CHECK-LABEL: name: vpnot_two
137 ; CHECK: liveins: $q0, $q1, $q2
138 ; CHECK: BUNDLE implicit-def $vpr, implicit $q0, implicit $zr, implicit $q1 {
139 ; CHECK: MVE_VPTv4s32r 8, renamable $q0, $zr, 11, implicit-def $vpr
140 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, internal killed renamable $vpr
142 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
143 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
144 ; CHECK: BUNDLE implicit-def $vpr, implicit killed $q2, implicit $zr {
145 ; CHECK: MVE_VPST 8, implicit-def $vpr
146 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, internal killed renamable $vpr
148 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
149 ; CHECK: tBX_RET 14, $noreg, implicit $q0
150 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
151 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
152 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
153 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
154 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
155 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
156 tBX_RET 14, $noreg, implicit $q0
162 tracksRegLiveness: true
164 - { reg: '$q0', virtual-reg: '' }
165 - { reg: '$q1', virtual-reg: '' }
166 - { reg: '$q2', virtual-reg: '' }
169 liveins: $q0, $q1, $q2
171 ; CHECK-LABEL: name: vpnot_lots
172 ; CHECK: liveins: $q0, $q1, $q2
173 ; CHECK: BUNDLE implicit-def $vpr, implicit $q0, implicit $zr, implicit $q1 {
174 ; CHECK: MVE_VPTv4s32r 8, renamable $q0, $zr, 11, implicit-def $vpr
175 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, internal killed renamable $vpr
177 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
178 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
179 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
180 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
181 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
182 ; CHECK: BUNDLE implicit-def $vpr, implicit killed $q2, implicit $zr {
183 ; CHECK: MVE_VPST 8, implicit-def $vpr
184 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, internal killed renamable $vpr
186 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
187 ; CHECK: tBX_RET 14, $noreg, implicit $q0
188 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
189 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
190 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
191 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
192 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
193 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
194 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
195 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
196 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
197 tBX_RET 14, $noreg, implicit $q0
203 tracksRegLiveness: true
205 - { reg: '$q0', virtual-reg: '' }
206 - { reg: '$q1', virtual-reg: '' }
207 - { reg: '$q2', virtual-reg: '' }
210 liveins: $q0, $q1, $q2
212 ; CHECK-LABEL: name: vpnot_first
213 ; CHECK: liveins: $q0, $q1, $q2
214 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
215 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
216 ; CHECK: BUNDLE implicit-def $vpr, implicit $q1, implicit $zr, implicit killed $q2 {
217 ; CHECK: MVE_VPST 4, implicit-def $vpr
218 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, internal killed renamable $vpr
219 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, internal killed renamable $vpr
221 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
222 ; CHECK: tBX_RET 14, $noreg, implicit $q0
223 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
224 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
225 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
226 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
227 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
228 tBX_RET 14, $noreg, implicit $q0
234 tracksRegLiveness: true
236 - { reg: '$q0', virtual-reg: '' }
237 - { reg: '$q1', virtual-reg: '' }
238 - { reg: '$q2', virtual-reg: '' }
241 liveins: $q0, $q1, $q2
243 ; CHECK-LABEL: name: vpnot_many
244 ; CHECK: liveins: $q0, $q1, $q2
245 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
246 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
247 ; CHECK: BUNDLE implicit-def $vpr, implicit $q1, implicit $zr {
248 ; CHECK: MVE_VPST 8, implicit-def $vpr
249 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, internal killed renamable $vpr
251 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
252 ; CHECK: BUNDLE implicit-def $vpr, implicit killed $q2, implicit $zr {
253 ; CHECK: MVE_VPST 8, implicit-def $vpr
254 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, internal killed renamable $vpr
256 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
257 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
258 ; CHECK: tBX_RET 14, $noreg, implicit $q0
259 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
260 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
261 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
262 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
263 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
264 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
265 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
266 tBX_RET 14, $noreg, implicit $q0