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 3 4--- | 5 6 define arm_aapcs_vfpcc <4 x i32> @vpnot(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) { 7 entry: 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 15 ret <4 x i32> %s 16 } 17 18 define arm_aapcs_vfpcc <4 x i32> @vpnot_end(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) { 19 entry: 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> 25 br label %bb2 26 bb2: 27 %o = and <4 x i1> %c3, %o2 28 %s = select <4 x i1> %o, <4 x i32> %a, <4 x i32> %b 29 ret <4 x i32> %s 30 } 31 32 define arm_aapcs_vfpcc <4 x i32> @vpnot_two(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) { 33 entry: 34 unreachable 35 } 36 define arm_aapcs_vfpcc <4 x i32> @vpnot_lots(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) { 37 entry: 38 unreachable 39 } 40 define arm_aapcs_vfpcc <4 x i32> @vpnot_first(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) { 41 entry: 42 unreachable 43 } 44 define arm_aapcs_vfpcc <4 x i32> @vpnot_many(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) { 45 entry: 46 unreachable 47 } 48 49... 50--- 51name: vpnot 52alignment: 4 53tracksRegLiveness: true 54liveins: 55 - { reg: '$q0', virtual-reg: '' } 56 - { reg: '$q1', virtual-reg: '' } 57 - { reg: '$q2', virtual-reg: '' } 58body: | 59 bb.0.entry: 60 liveins: $q0, $q1, $q2 61 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 67 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 2, internal killed renamable $vpr 68 ; CHECK: } 69 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 70 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0 71 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg 72 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr 73 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 74 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr 75 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 76 tBX_RET 14, $noreg, implicit $q0 77 78... 79--- 80name: vpnot_end 81alignment: 4 82tracksRegLiveness: true 83liveins: 84 - { reg: '$q0', virtual-reg: '' } 85 - { reg: '$q1', virtual-reg: '' } 86 - { reg: '$q2', virtual-reg: '' } 87body: | 88 ; CHECK-LABEL: name: vpnot_end 89 ; CHECK: bb.0.entry: 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 95 ; CHECK: } 96 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 97 ; CHECK: bb.1.bb2: 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 102 ; CHECK: } 103 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 104 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0 105 bb.0.entry: 106 liveins: $q0, $q1, $q2 107 108 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg 109 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr 110 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 111 112 bb.1.bb2: 113 liveins: $q0, $q1, $q2, $vpr 114 115 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr 116 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 117 tBX_RET 14, $noreg, implicit $q0 118 119... 120--- 121name: vpnot_two 122alignment: 4 123tracksRegLiveness: true 124liveins: 125 - { reg: '$q0', virtual-reg: '' } 126 - { reg: '$q1', virtual-reg: '' } 127 - { reg: '$q2', virtual-reg: '' } 128body: | 129 bb.0.entry: 130 liveins: $q0, $q1, $q2 131 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 137 ; CHECK: } 138 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 139 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $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 143 ; CHECK: } 144 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 145 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0 146 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg 147 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr 148 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 149 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 150 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr 151 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 152 tBX_RET 14, $noreg, implicit $q0 153 154... 155--- 156name: vpnot_lots 157alignment: 4 158tracksRegLiveness: true 159liveins: 160 - { reg: '$q0', virtual-reg: '' } 161 - { reg: '$q1', virtual-reg: '' } 162 - { reg: '$q2', virtual-reg: '' } 163body: | 164 bb.0.entry: 165 liveins: $q0, $q1, $q2 166 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 172 ; CHECK: } 173 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 174 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 175 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 176 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 177 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $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 181 ; CHECK: } 182 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 183 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0 184 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg 185 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr 186 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 187 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 188 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 189 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 190 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 191 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr 192 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 193 tBX_RET 14, $noreg, implicit $q0 194 195... 196--- 197name: vpnot_first 198alignment: 4 199tracksRegLiveness: true 200liveins: 201 - { reg: '$q0', virtual-reg: '' } 202 - { reg: '$q1', virtual-reg: '' } 203 - { reg: '$q2', virtual-reg: '' } 204body: | 205 bb.0.entry: 206 liveins: $q0, $q1, $q2 207 208 ; CHECK-LABEL: name: vpnot_first 209 ; CHECK: liveins: $q0, $q1, $q2 210 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg 211 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $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 215 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, internal killed renamable $vpr 216 ; CHECK: } 217 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 218 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0 219 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg 220 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 221 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr 222 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr 223 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 224 tBX_RET 14, $noreg, implicit $q0 225 226... 227--- 228name: vpnot_many 229alignment: 4 230tracksRegLiveness: true 231liveins: 232 - { reg: '$q0', virtual-reg: '' } 233 - { reg: '$q1', virtual-reg: '' } 234 - { reg: '$q2', virtual-reg: '' } 235body: | 236 bb.0.entry: 237 liveins: $q0, $q1, $q2 238 239 ; CHECK-LABEL: name: vpnot_many 240 ; CHECK: liveins: $q0, $q1, $q2 241 ; CHECK: renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg 242 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $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 246 ; CHECK: renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 2, internal killed renamable $vpr 247 ; CHECK: } 248 ; CHECK: renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 249 ; CHECK: renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 250 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit $q0 251 renamable $vpr = MVE_VCMPs32r renamable $q0, $zr, 11, 0, $noreg 252 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 253 renamable $vpr = MVE_VCMPs32r renamable $q1, $zr, 12, 1, killed renamable $vpr 254 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 255 renamable $vpr = MVE_VCMPi32r killed renamable $q2, $zr, 0, 1, killed renamable $vpr 256 renamable $vpr = MVE_VPNOT killed renamable $vpr, 0, $noreg 257 renamable $q0 = MVE_VPSEL killed renamable $q0, killed renamable $q1, 0, killed renamable $vpr 258 tBX_RET 14, $noreg, implicit $q0 259 260... 261