1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=thumbv8.1m.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, implicit killed $q2 {
65 ; CHECK: MVE_VPTv4s32r 12, renamable $q0, $zr, 11, implicit-def $vpr
66 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, internal killed renamable $vpr, $noreg
67 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 2, internal killed renamable $vpr, $noreg
69 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
70 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0
71 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg, $noreg
72 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr, $noreg
73 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
74 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr, $noreg
75 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
76 tBX_RET 14, $noreg, implicit $q0
82 tracksRegLiveness: true
84 - { reg: '$q0', virtual-reg: '' }
85 - { reg: '$q1', virtual-reg: '' }
86 - { reg: '$q2', virtual-reg: '' }
88 ; CHECK-LABEL: name: vpnot_end
90 ; CHECK: successors: %bb.1(0x80000000)
91 ; CHECK: liveins: $q0, $q1, $q2
92 ; CHECK: BUNDLE implicit-def $vpr, implicit $q0, implicit $zr, implicit $q1 {
93 ; CHECK: MVE_VPTv4s32r 8, renamable $q0, $zr, 11, implicit-def $vpr
94 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, internal killed renamable $vpr, $noreg
96 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
98 ; CHECK: liveins: $q0, $q1, $q2, $vpr
99 ; CHECK: BUNDLE implicit-def $vpr, implicit killed $vpr, implicit killed $q2, implicit $zr {
100 ; CHECK: MVE_VPST 8, implicit $vpr
101 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr, $noreg
103 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
104 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0
106 liveins: $q0, $q1, $q2
108 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg, $noreg
109 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr, $noreg
110 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
113 liveins: $q0, $q1, $q2, $vpr
115 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr, $noreg
116 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
117 tBX_RET 14, $noreg, implicit $q0
123 tracksRegLiveness: true
125 - { reg: '$q0', virtual-reg: '' }
126 - { reg: '$q1', virtual-reg: '' }
127 - { reg: '$q2', virtual-reg: '' }
130 liveins: $q0, $q1, $q2
132 ; CHECK-LABEL: name: vpnot_two
133 ; CHECK: liveins: $q0, $q1, $q2
134 ; CHECK: BUNDLE implicit-def $vpr, implicit $q0, implicit $zr, implicit $q1 {
135 ; CHECK: MVE_VPTv4s32r 8, renamable $q0, $zr, 11, implicit-def $vpr
136 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, internal killed renamable $vpr, $noreg
138 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
139 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
140 ; CHECK: BUNDLE implicit-def $vpr, implicit killed $vpr, implicit killed $q2, implicit $zr {
141 ; CHECK: MVE_VPST 8, implicit $vpr
142 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr, $noreg
144 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
145 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0
146 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg, $noreg
147 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr, $noreg
148 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
149 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
150 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr, $noreg
151 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
152 tBX_RET 14, $noreg, implicit $q0
158 tracksRegLiveness: true
160 - { reg: '$q0', virtual-reg: '' }
161 - { reg: '$q1', virtual-reg: '' }
162 - { reg: '$q2', virtual-reg: '' }
165 liveins: $q0, $q1, $q2
167 ; CHECK-LABEL: name: vpnot_lots
168 ; CHECK: liveins: $q0, $q1, $q2
169 ; CHECK: BUNDLE implicit-def $vpr, implicit $q0, implicit $zr, implicit $q1 {
170 ; CHECK: MVE_VPTv4s32r 8, renamable $q0, $zr, 11, implicit-def $vpr
171 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, internal killed renamable $vpr, $noreg
173 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
174 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
175 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
176 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
177 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
178 ; CHECK: BUNDLE implicit-def $vpr, implicit killed $vpr, implicit killed $q2, implicit $zr {
179 ; CHECK: MVE_VPST 8, implicit $vpr
180 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr, $noreg
182 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
183 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0
184 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg, $noreg
185 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr, $noreg
186 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
187 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
188 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
189 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
190 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
191 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr, $noreg
192 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
193 tBX_RET 14, $noreg, implicit $q0
199 tracksRegLiveness: true
201 - { reg: '$q0', virtual-reg: '' }
202 - { reg: '$q1', virtual-reg: '' }
203 - { reg: '$q2', virtual-reg: '' }
206 liveins: $q0, $q1, $q2
208 ; CHECK-LABEL: name: vpnot_first
209 ; CHECK: liveins: $q0, $q1, $q2
210 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg, $noreg
211 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
212 ; CHECK: BUNDLE implicit-def $vpr, implicit killed $vpr, implicit $q1, implicit $zr, implicit killed $q2 {
213 ; CHECK: MVE_VPST 4, implicit $vpr
214 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr, $noreg
215 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, internal killed renamable $vpr, $noreg
217 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
218 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0
219 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg, $noreg
220 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
221 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr, $noreg
222 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr, $noreg
223 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
224 tBX_RET 14, $noreg, implicit $q0
230 tracksRegLiveness: true
232 - { reg: '$q0', virtual-reg: '' }
233 - { reg: '$q1', virtual-reg: '' }
234 - { reg: '$q2', virtual-reg: '' }
237 liveins: $q0, $q1, $q2
239 ; CHECK-LABEL: name: vpnot_many
240 ; CHECK: liveins: $q0, $q1, $q2
241 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg, $noreg
242 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
243 ; CHECK: BUNDLE implicit-def $vpr, implicit killed $vpr, implicit $q1, implicit $zr, implicit killed $q2 {
244 ; CHECK: MVE_VPST 12, implicit $vpr
245 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr, $noreg
246 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 2, internal killed renamable $vpr, $noreg
248 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
249 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
250 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0
251 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg, $noreg
252 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
253 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr, $noreg
254 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
255 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr, $noreg
256 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg, $noreg
257 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr, $noreg
258 tBX_RET 14, $noreg, implicit $q0