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: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
65 ; CHECK: BUNDLE implicit-def $p0, implicit-def $vpr, implicit $q1, implicit $zr, implicit killed $vpr {
66 ; CHECK: MVE_VPST 8, implicit-def $p0
67 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
68 ; CHECK: renamable $vpr = MVE_VPNOT internal killed renamable $vpr, 0, $noreg
70 ; CHECK: BUNDLE implicit-def $p0, implicit-def dead $vpr, implicit-def $q0, implicit-def $d0, implicit-def $s0, implicit-def $s1, implicit-def $d1, implicit-def $s2, implicit-def $s3, implicit killed $q2, implicit $zr, implicit killed $vpr, implicit killed $q0, implicit killed $q1 {
71 ; CHECK: MVE_VPST 8, implicit-def $p0
72 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
73 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, internal killed renamable $vpr
75 ; CHECK: tBX_RET 14, $noreg, implicit $q0
76 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
77 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
78 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
79 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
80 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
81 tBX_RET 14, $noreg, implicit $q0
87 tracksRegLiveness: true
89 - { reg: '$q0', virtual-reg: '' }
90 - { reg: '$q1', virtual-reg: '' }
91 - { reg: '$q2', virtual-reg: '' }
93 ; CHECK-LABEL: name: vpnot_end
95 ; CHECK: successors: %bb.1(0x80000000)
96 ; CHECK: liveins: $q0, $q1, $q2
97 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
98 ; CHECK: BUNDLE implicit-def $p0, implicit-def $vpr, implicit $q1, implicit $zr, implicit killed $vpr {
99 ; CHECK: MVE_VPST 8, implicit-def $p0
100 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
101 ; CHECK: renamable $vpr = MVE_VPNOT internal killed renamable $vpr, 0, $noreg
104 ; CHECK: liveins: $q0, $q1, $q2, $vpr
105 ; CHECK: BUNDLE implicit-def $p0, implicit-def dead $vpr, implicit-def $q0, implicit-def $d0, implicit-def $s0, implicit-def $s1, implicit-def $d1, implicit-def $s2, implicit-def $s3, implicit killed $q2, implicit $zr, implicit killed $vpr, implicit killed $q0, implicit killed $q1 {
106 ; CHECK: MVE_VPST 8, implicit-def $p0
107 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
108 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, internal killed renamable $vpr
110 ; CHECK: tBX_RET 14, $noreg, implicit $q0
112 liveins: $q0, $q1, $q2
114 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
115 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
116 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
119 liveins: $q0, $q1, $q2, $vpr
121 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
122 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
123 tBX_RET 14, $noreg, implicit $q0
129 tracksRegLiveness: true
131 - { reg: '$q0', virtual-reg: '' }
132 - { reg: '$q1', virtual-reg: '' }
133 - { reg: '$q2', virtual-reg: '' }
136 liveins: $q0, $q1, $q2
138 ; CHECK-LABEL: name: vpnot_two
139 ; CHECK: liveins: $q0, $q1, $q2
140 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
141 ; CHECK: BUNDLE implicit-def $p0, implicit-def $vpr, implicit $q1, implicit $zr, implicit killed $vpr {
142 ; CHECK: MVE_VPST 8, implicit-def $p0
143 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
144 ; CHECK: renamable $vpr = MVE_VPNOT internal killed renamable $vpr, 0, $noreg
146 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
147 ; CHECK: BUNDLE implicit-def $p0, implicit-def dead $vpr, implicit-def $q0, implicit-def $d0, implicit-def $s0, implicit-def $s1, implicit-def $d1, implicit-def $s2, implicit-def $s3, implicit killed $q2, implicit $zr, implicit killed $vpr, implicit killed $q0, implicit killed $q1 {
148 ; CHECK: MVE_VPST 8, implicit-def $p0
149 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
150 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, internal killed renamable $vpr
152 ; CHECK: tBX_RET 14, $noreg, implicit $q0
153 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
154 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
155 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
156 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
157 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
158 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
159 tBX_RET 14, $noreg, implicit $q0
165 tracksRegLiveness: true
167 - { reg: '$q0', virtual-reg: '' }
168 - { reg: '$q1', virtual-reg: '' }
169 - { reg: '$q2', virtual-reg: '' }
172 liveins: $q0, $q1, $q2
174 ; CHECK-LABEL: name: vpnot_lots
175 ; CHECK: liveins: $q0, $q1, $q2
176 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
177 ; CHECK: BUNDLE implicit-def $p0, implicit-def $vpr, implicit $q1, implicit $zr, implicit killed $vpr {
178 ; CHECK: MVE_VPST 8, implicit-def $p0
179 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
180 ; CHECK: renamable $vpr = MVE_VPNOT internal killed renamable $vpr, 0, $noreg
182 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
183 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
184 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
185 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
186 ; CHECK: BUNDLE implicit-def $p0, implicit-def dead $vpr, implicit-def $q0, implicit-def $d0, implicit-def $s0, implicit-def $s1, implicit-def $d1, implicit-def $s2, implicit-def $s3, implicit killed $q2, implicit $zr, implicit killed $vpr, implicit killed $q0, implicit killed $q1 {
187 ; CHECK: MVE_VPST 8, implicit-def $p0
188 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
189 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, internal killed renamable $vpr
191 ; CHECK: tBX_RET 14, $noreg, implicit $q0
192 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
193 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
194 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
195 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
196 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
197 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
198 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
199 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
200 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
201 tBX_RET 14, $noreg, implicit $q0
207 tracksRegLiveness: true
209 - { reg: '$q0', virtual-reg: '' }
210 - { reg: '$q1', virtual-reg: '' }
211 - { reg: '$q2', virtual-reg: '' }
214 liveins: $q0, $q1, $q2
216 ; CHECK-LABEL: name: vpnot_first
217 ; CHECK: liveins: $q0, $q1, $q2
218 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
219 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
220 ; CHECK: BUNDLE implicit-def $p0, implicit-def dead $vpr, implicit-def $q0, implicit-def $d0, implicit-def $s0, implicit-def $s1, implicit-def $d1, implicit-def $s2, implicit-def $s3, implicit killed $q1, implicit $zr, implicit killed $vpr, implicit killed $q2, implicit killed $q0 {
221 ; CHECK: MVE_VPST 4, implicit-def $p0
222 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
223 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, internal killed renamable $vpr
224 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, internal killed renamable $vpr
226 ; CHECK: tBX_RET 14, $noreg, implicit $q0
227 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
228 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
229 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
230 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
231 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
232 tBX_RET 14, $noreg, implicit $q0
238 tracksRegLiveness: true
240 - { reg: '$q0', virtual-reg: '' }
241 - { reg: '$q1', virtual-reg: '' }
242 - { reg: '$q2', virtual-reg: '' }
245 liveins: $q0, $q1, $q2
247 ; CHECK-LABEL: name: vpnot_many
248 ; CHECK: liveins: $q0, $q1, $q2
249 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
250 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
251 ; CHECK: BUNDLE implicit-def $p0, implicit-def $vpr, implicit $q1, implicit $zr, implicit killed $vpr {
252 ; CHECK: MVE_VPST 8, implicit-def $p0
253 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
254 ; CHECK: renamable $vpr = MVE_VPNOT internal killed renamable $vpr, 0, $noreg
256 ; CHECK: BUNDLE implicit-def $p0, implicit-def $vpr, implicit killed $q2, implicit $zr, implicit killed $vpr {
257 ; CHECK: MVE_VPST 8, implicit-def $p0
258 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
259 ; CHECK: renamable $vpr = MVE_VPNOT internal killed renamable $vpr, 0, $noreg
261 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
262 ; CHECK: tBX_RET 14, $noreg, implicit $q0
263 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg
264 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
265 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr
266 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
267 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr
268 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg
269 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr
270 tBX_RET 14, $noreg, implicit $q0