541 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 52# RUN: llc -mtriple=aarch64--linux-gnu -mattr=+sve -run-pass=peephole-opt -verify-machineinstrs %s -o - | FileCheck %s3 4# Test instruction sequences where PTEST is redundant and thus gets removed.5---6name: whilele_b8_s327alignment: 28tracksRegLiveness: true9registers:10 - { id: 0, class: gpr32 }11 - { id: 1, class: gpr32 }12 - { id: 2, class: ppr }13 - { id: 3, class: ppr }14 - { id: 4, class: gpr32 }15 - { id: 5, class: gpr32 }16liveins:17 - { reg: '$w0', virtual-reg: '%0' }18 - { reg: '$w1', virtual-reg: '%1' }19frameInfo:20 maxCallFrameSize: 021body: |22 bb.0.entry:23 liveins: $w0, $w124 25 ; CHECK-LABEL: name: whilele_b8_s3226 ; CHECK: liveins: $w0, $w127 ; CHECK-NEXT: {{ $}}28 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w129 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w030 ; CHECK-NEXT: [[PTRUE_B:%[0-9]+]]:ppr = PTRUE_B 31, implicit $vg31 ; CHECK-NEXT: [[WHILELE_PWW_B:%[0-9]+]]:ppr = WHILELE_PWW_B [[COPY1]], [[COPY]], implicit-def $nzcv32 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr33 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv34 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]35 ; CHECK-NEXT: RET_ReallyLR implicit $w036 %1:gpr32 = COPY $w137 %0:gpr32 = COPY $w038 %2:ppr = PTRUE_B 31, implicit $vg39 %3:ppr = WHILELE_PWW_B %0, %1, implicit-def dead $nzcv40 PTEST_PP killed %2, killed %3, implicit-def $nzcv41 %4:gpr32 = COPY $wzr42 %5:gpr32 = CSINCWr %4, $wzr, 0, implicit $nzcv43 $w0 = COPY %544 RET_ReallyLR implicit $w045 46...47---48name: whilele_b8_s6449alignment: 250tracksRegLiveness: true51registers:52 - { id: 0, class: gpr64 }53 - { id: 1, class: gpr64 }54 - { id: 2, class: ppr }55 - { id: 3, class: ppr }56 - { id: 4, class: gpr32 }57 - { id: 5, class: gpr32 }58liveins:59 - { reg: '$x0', virtual-reg: '%0' }60 - { reg: '$x1', virtual-reg: '%1' }61frameInfo:62 maxCallFrameSize: 063body: |64 bb.0.entry:65 liveins: $x0, $x166 67 ; CHECK-LABEL: name: whilele_b8_s6468 ; CHECK: liveins: $x0, $x169 ; CHECK-NEXT: {{ $}}70 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x171 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x072 ; CHECK-NEXT: [[PTRUE_B:%[0-9]+]]:ppr = PTRUE_B 31, implicit $vg73 ; CHECK-NEXT: [[WHILELE_PXX_B:%[0-9]+]]:ppr = WHILELE_PXX_B [[COPY1]], [[COPY]], implicit-def $nzcv74 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr75 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv76 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]77 ; CHECK-NEXT: RET_ReallyLR implicit $w078 %1:gpr64 = COPY $x179 %0:gpr64 = COPY $x080 %2:ppr = PTRUE_B 31, implicit $vg81 %3:ppr = WHILELE_PXX_B %0, %1, implicit-def dead $nzcv82 PTEST_PP killed %2, killed %3, implicit-def $nzcv83 %4:gpr32 = COPY $wzr84 %5:gpr32 = CSINCWr %4, $wzr, 0, implicit $nzcv85 $w0 = COPY %586 RET_ReallyLR implicit $w087 88...89---90name: whilele_b16_s3291alignment: 292tracksRegLiveness: true93registers:94 - { id: 0, class: gpr32 }95 - { id: 1, class: gpr32 }96 - { id: 2, class: ppr }97 - { id: 3, class: ppr }98 - { id: 4, class: ppr }99 - { id: 5, class: ppr }100 - { id: 6, class: gpr32 }101 - { id: 7, class: gpr32 }102liveins:103 - { reg: '$w0', virtual-reg: '%0' }104 - { reg: '$w1', virtual-reg: '%1' }105frameInfo:106 maxCallFrameSize: 0107body: |108 bb.0.entry:109 liveins: $w0, $w1110 111 ; CHECK-LABEL: name: whilele_b16_s32112 ; CHECK: liveins: $w0, $w1113 ; CHECK-NEXT: {{ $}}114 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w1115 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0116 ; CHECK-NEXT: [[PTRUE_H:%[0-9]+]]:ppr = PTRUE_H 31, implicit $vg117 ; CHECK-NEXT: [[WHILELE_PWW_H:%[0-9]+]]:ppr = WHILELE_PWW_H [[COPY1]], [[COPY]], implicit-def $nzcv118 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr119 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv120 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]121 ; CHECK-NEXT: RET_ReallyLR implicit $w0122 %1:gpr32 = COPY $w1123 %0:gpr32 = COPY $w0124 %2:ppr = PTRUE_H 31, implicit $vg125 %4:ppr = WHILELE_PWW_H %0, %1, implicit-def dead $nzcv126 PTEST_PP %2, %4, implicit-def $nzcv127 %6:gpr32 = COPY $wzr128 %7:gpr32 = CSINCWr %6, $wzr, 0, implicit $nzcv129 $w0 = COPY %7130 RET_ReallyLR implicit $w0131 132...133---134name: whilele_b16_s64135alignment: 2136tracksRegLiveness: true137registers:138 - { id: 0, class: gpr64 }139 - { id: 1, class: gpr64 }140 - { id: 2, class: ppr }141 - { id: 3, class: ppr }142 - { id: 4, class: ppr }143 - { id: 5, class: ppr }144 - { id: 6, class: gpr32 }145 - { id: 7, class: gpr32 }146liveins:147 - { reg: '$x0', virtual-reg: '%0' }148 - { reg: '$x1', virtual-reg: '%1' }149frameInfo:150 maxCallFrameSize: 0151body: |152 bb.0.entry:153 liveins: $x0, $x1154 155 ; CHECK-LABEL: name: whilele_b16_s64156 ; CHECK: liveins: $x0, $x1157 ; CHECK-NEXT: {{ $}}158 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x1159 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x0160 ; CHECK-NEXT: [[PTRUE_H:%[0-9]+]]:ppr = PTRUE_H 31, implicit $vg161 ; CHECK-NEXT: [[WHILELE_PXX_H:%[0-9]+]]:ppr = WHILELE_PXX_H [[COPY1]], [[COPY]], implicit-def $nzcv162 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr163 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv164 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]165 ; CHECK-NEXT: RET_ReallyLR implicit $w0166 %1:gpr64 = COPY $x1167 %0:gpr64 = COPY $x0168 %2:ppr = PTRUE_H 31, implicit $vg169 %4:ppr = WHILELE_PXX_H %0, %1, implicit-def dead $nzcv170 PTEST_PP %2, %4, implicit-def $nzcv171 %6:gpr32 = COPY $wzr172 %7:gpr32 = CSINCWr %6, $wzr, 0, implicit $nzcv173 $w0 = COPY %7174 RET_ReallyLR implicit $w0175 176...177---178name: whilele_b32_s32179alignment: 2180tracksRegLiveness: true181registers:182 - { id: 0, class: gpr32 }183 - { id: 1, class: gpr32 }184 - { id: 2, class: ppr }185 - { id: 3, class: ppr }186 - { id: 4, class: ppr }187 - { id: 5, class: ppr }188 - { id: 6, class: gpr32 }189 - { id: 7, class: gpr32 }190liveins:191 - { reg: '$w0', virtual-reg: '%0' }192 - { reg: '$w1', virtual-reg: '%1' }193frameInfo:194 maxCallFrameSize: 0195body: |196 bb.0.entry:197 liveins: $w0, $w1198 199 ; CHECK-LABEL: name: whilele_b32_s32200 ; CHECK: liveins: $w0, $w1201 ; CHECK-NEXT: {{ $}}202 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w1203 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0204 ; CHECK-NEXT: [[PTRUE_S:%[0-9]+]]:ppr = PTRUE_S 31, implicit $vg205 ; CHECK-NEXT: [[WHILELE_PWW_S:%[0-9]+]]:ppr = WHILELE_PWW_S [[COPY1]], [[COPY]], implicit-def $nzcv206 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr207 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv208 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]209 ; CHECK-NEXT: RET_ReallyLR implicit $w0210 %1:gpr32 = COPY $w1211 %0:gpr32 = COPY $w0212 %2:ppr = PTRUE_S 31, implicit $vg213 %4:ppr = WHILELE_PWW_S %0, %1, implicit-def dead $nzcv214 PTEST_PP %2, %4, implicit-def $nzcv215 %6:gpr32 = COPY $wzr216 %7:gpr32 = CSINCWr %6, $wzr, 0, implicit $nzcv217 $w0 = COPY %7218 RET_ReallyLR implicit $w0219 220...221---222name: whilele_b32_s64223alignment: 2224tracksRegLiveness: true225registers:226 - { id: 0, class: gpr64 }227 - { id: 1, class: gpr64 }228 - { id: 2, class: ppr }229 - { id: 3, class: ppr }230 - { id: 4, class: ppr }231 - { id: 5, class: ppr }232 - { id: 6, class: gpr32 }233 - { id: 7, class: gpr32 }234liveins:235 - { reg: '$x0', virtual-reg: '%0' }236 - { reg: '$x1', virtual-reg: '%1' }237frameInfo:238 maxCallFrameSize: 0239body: |240 bb.0.entry:241 liveins: $x0, $x1242 243 ; CHECK-LABEL: name: whilele_b32_s64244 ; CHECK: liveins: $x0, $x1245 ; CHECK-NEXT: {{ $}}246 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x1247 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x0248 ; CHECK-NEXT: [[PTRUE_S:%[0-9]+]]:ppr = PTRUE_S 31, implicit $vg249 ; CHECK-NEXT: [[WHILELE_PXX_S:%[0-9]+]]:ppr = WHILELE_PXX_S [[COPY1]], [[COPY]], implicit-def $nzcv250 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr251 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv252 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]253 ; CHECK-NEXT: RET_ReallyLR implicit $w0254 %1:gpr64 = COPY $x1255 %0:gpr64 = COPY $x0256 %2:ppr = PTRUE_S 31, implicit $vg257 %4:ppr = WHILELE_PXX_S %0, %1, implicit-def dead $nzcv258 PTEST_PP %2, %4, implicit-def $nzcv259 %6:gpr32 = COPY $wzr260 %7:gpr32 = CSINCWr %6, $wzr, 0, implicit $nzcv261 $w0 = COPY %7262 RET_ReallyLR implicit $w0263 264...265---266name: whilele_b64_s32267alignment: 2268tracksRegLiveness: true269registers:270 - { id: 0, class: gpr32 }271 - { id: 1, class: gpr32 }272 - { id: 2, class: ppr }273 - { id: 3, class: ppr }274 - { id: 4, class: ppr }275 - { id: 5, class: ppr }276 - { id: 6, class: gpr32 }277 - { id: 7, class: gpr32 }278liveins:279 - { reg: '$w0', virtual-reg: '%0' }280 - { reg: '$w1', virtual-reg: '%1' }281frameInfo:282 maxCallFrameSize: 0283body: |284 bb.0.entry:285 liveins: $w0, $w1286 287 ; CHECK-LABEL: name: whilele_b64_s32288 ; CHECK: liveins: $w0, $w1289 ; CHECK-NEXT: {{ $}}290 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w1291 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0292 ; CHECK-NEXT: [[PTRUE_D:%[0-9]+]]:ppr = PTRUE_D 31, implicit $vg293 ; CHECK-NEXT: [[WHILELE_PWW_D:%[0-9]+]]:ppr = WHILELE_PWW_D [[COPY1]], [[COPY]], implicit-def $nzcv294 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr295 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv296 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]297 ; CHECK-NEXT: RET_ReallyLR implicit $w0298 %1:gpr32 = COPY $w1299 %0:gpr32 = COPY $w0300 %2:ppr = PTRUE_D 31, implicit $vg301 %4:ppr = WHILELE_PWW_D %0, %1, implicit-def dead $nzcv302 PTEST_PP %2, %4, implicit-def $nzcv303 %6:gpr32 = COPY $wzr304 %7:gpr32 = CSINCWr %6, $wzr, 0, implicit $nzcv305 $w0 = COPY %7306 RET_ReallyLR implicit $w0307 308...309---310name: whilele_b64_s64311alignment: 2312tracksRegLiveness: true313registers:314 - { id: 0, class: gpr64 }315 - { id: 1, class: gpr64 }316 - { id: 2, class: ppr }317 - { id: 3, class: ppr }318 - { id: 4, class: ppr }319 - { id: 5, class: ppr }320 - { id: 6, class: gpr32 }321 - { id: 7, class: gpr32 }322liveins:323 - { reg: '$x0', virtual-reg: '%0' }324 - { reg: '$x1', virtual-reg: '%1' }325frameInfo:326 maxCallFrameSize: 0327body: |328 bb.0.entry:329 liveins: $x0, $x1330 331 ; CHECK-LABEL: name: whilele_b64_s64332 ; CHECK: liveins: $x0, $x1333 ; CHECK-NEXT: {{ $}}334 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x1335 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x0336 ; CHECK-NEXT: [[PTRUE_D:%[0-9]+]]:ppr = PTRUE_D 31, implicit $vg337 ; CHECK-NEXT: [[WHILELE_PXX_D:%[0-9]+]]:ppr = WHILELE_PXX_D [[COPY1]], [[COPY]], implicit-def $nzcv338 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr339 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv340 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]341 ; CHECK-NEXT: RET_ReallyLR implicit $w0342 %1:gpr64 = COPY $x1343 %0:gpr64 = COPY $x0344 %2:ppr = PTRUE_D 31, implicit $vg345 %4:ppr = WHILELE_PXX_D %0, %1, implicit-def dead $nzcv346 PTEST_PP %2, %4, implicit-def $nzcv347 %6:gpr32 = COPY $wzr348 %7:gpr32 = CSINCWr %6, $wzr, 0, implicit $nzcv349 $w0 = COPY %7350 RET_ReallyLR implicit $w0351 352...353 354# PTEST is not redundant when it's Pg operand is not an all active predicate355# of element size matching the WHILELE, which is the implicitly predicate356# used by WHILE when calculating the condition codes.357---358name: whilele_b8_s32_keep_ptest_not_all_active359alignment: 2360tracksRegLiveness: true361registers:362 - { id: 0, class: gpr32 }363 - { id: 1, class: gpr32 }364 - { id: 2, class: ppr }365 - { id: 3, class: ppr }366 - { id: 4, class: gpr32 }367 - { id: 5, class: gpr32 }368liveins:369 - { reg: '$w0', virtual-reg: '%0' }370 - { reg: '$w1', virtual-reg: '%1' }371frameInfo:372 maxCallFrameSize: 0373body: |374 bb.0.entry:375 liveins: $w0, $w1376 377 ; CHECK-LABEL: name: whilele_b8_s32_keep_ptest_not_all_active378 ; CHECK: liveins: $w0, $w1379 ; CHECK-NEXT: {{ $}}380 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w1381 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0382 ; CHECK-NEXT: [[PTRUE_B:%[0-9]+]]:ppr = PTRUE_B 7, implicit $vg383 ; CHECK-NEXT: [[WHILELE_PWW_B:%[0-9]+]]:ppr = WHILELE_PWW_B [[COPY1]], [[COPY]], implicit-def dead $nzcv384 ; CHECK-NEXT: PTEST_PP killed [[PTRUE_B]], killed [[WHILELE_PWW_B]], implicit-def $nzcv385 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr386 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv387 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]388 ; CHECK-NEXT: RET_ReallyLR implicit $w0389 %1:gpr32 = COPY $w1390 %0:gpr32 = COPY $w0391 %2:ppr = PTRUE_B 7, implicit $vg392 %3:ppr = WHILELE_PWW_B %0, %1, implicit-def dead $nzcv393 PTEST_PP killed %2, killed %3, implicit-def $nzcv394 %4:gpr32 = COPY $wzr395 %5:gpr32 = CSINCWr %4, $wzr, 0, implicit $nzcv396 $w0 = COPY %5397 RET_ReallyLR implicit $w0398 399...400 401# PTEST is not redundant when it's Pg operand is not an all active predicate402# of element size matching the WHILELE, which is the implicitly predicate403# used by WHILE when calculating the condition codes.404---405name: whilele_b8_s32_keep_ptest_of_halfs406alignment: 2407tracksRegLiveness: true408registers:409 - { id: 0, class: gpr32 }410 - { id: 1, class: gpr32 }411 - { id: 2, class: ppr }412 - { id: 3, class: ppr }413 - { id: 4, class: gpr32 }414 - { id: 5, class: gpr32 }415liveins:416 - { reg: '$w0', virtual-reg: '%0' }417 - { reg: '$w1', virtual-reg: '%1' }418frameInfo:419 maxCallFrameSize: 0420body: |421 bb.0.entry:422 liveins: $w0, $w1423 424 ; CHECK-LABEL: name: whilele_b8_s32_keep_ptest_of_halfs425 ; CHECK: liveins: $w0, $w1426 ; CHECK-NEXT: {{ $}}427 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w1428 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0429 ; CHECK-NEXT: [[PTRUE_H:%[0-9]+]]:ppr = PTRUE_H 31, implicit $vg430 ; CHECK-NEXT: [[WHILELE_PWW_B:%[0-9]+]]:ppr = WHILELE_PWW_B [[COPY1]], [[COPY]], implicit-def dead $nzcv431 ; CHECK-NEXT: PTEST_PP killed [[PTRUE_H]], killed [[WHILELE_PWW_B]], implicit-def $nzcv432 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr433 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv434 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]435 ; CHECK-NEXT: RET_ReallyLR implicit $w0436 %1:gpr32 = COPY $w1437 %0:gpr32 = COPY $w0438 %2:ppr = PTRUE_H 31, implicit $vg439 %3:ppr = WHILELE_PWW_B %0, %1, implicit-def dead $nzcv440 PTEST_PP killed %2, killed %3, implicit-def $nzcv441 %4:gpr32 = COPY $wzr442 %5:gpr32 = CSINCWr %4, $wzr, 0, implicit $nzcv443 $w0 = COPY %5444 RET_ReallyLR implicit $w0445 446...447 448# PTEST is not redundant when it's Pg operand is not an all active predicate449# of element size matching the WHILELE, which is the implicitly predicate450# used by WHILE when calculating the condition codes.451---452name: whilele_b8_s32_keep_ptest_of_words453alignment: 2454tracksRegLiveness: true455registers:456 - { id: 0, class: gpr32 }457 - { id: 1, class: gpr32 }458 - { id: 2, class: ppr }459 - { id: 3, class: ppr }460 - { id: 4, class: gpr32 }461 - { id: 5, class: gpr32 }462liveins:463 - { reg: '$w0', virtual-reg: '%0' }464 - { reg: '$w1', virtual-reg: '%1' }465frameInfo:466 maxCallFrameSize: 0467body: |468 bb.0.entry:469 liveins: $w0, $w1470 471 ; CHECK-LABEL: name: whilele_b8_s32_keep_ptest_of_words472 ; CHECK: liveins: $w0, $w1473 ; CHECK-NEXT: {{ $}}474 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w1475 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0476 ; CHECK-NEXT: [[PTRUE_S:%[0-9]+]]:ppr = PTRUE_S 31, implicit $vg477 ; CHECK-NEXT: [[WHILELE_PWW_B:%[0-9]+]]:ppr = WHILELE_PWW_B [[COPY1]], [[COPY]], implicit-def dead $nzcv478 ; CHECK-NEXT: PTEST_PP killed [[PTRUE_S]], killed [[WHILELE_PWW_B]], implicit-def $nzcv479 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr480 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv481 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]482 ; CHECK-NEXT: RET_ReallyLR implicit $w0483 %1:gpr32 = COPY $w1484 %0:gpr32 = COPY $w0485 %2:ppr = PTRUE_S 31, implicit $vg486 %3:ppr = WHILELE_PWW_B %0, %1, implicit-def dead $nzcv487 PTEST_PP killed %2, killed %3, implicit-def $nzcv488 %4:gpr32 = COPY $wzr489 %5:gpr32 = CSINCWr %4, $wzr, 0, implicit $nzcv490 $w0 = COPY %5491 RET_ReallyLR implicit $w0492 493...494 495# PTEST is not redundant when it's Pg operand is not an all active predicate496# of element size matching the WHILELE, which is the implicitly predicate497# used by WHILE when calculating the condition codes.498---499name: whilele_b8_s32_keep_ptest_of_doublewords500alignment: 2501tracksRegLiveness: true502registers:503 - { id: 0, class: gpr32 }504 - { id: 1, class: gpr32 }505 - { id: 2, class: ppr }506 - { id: 3, class: ppr }507 - { id: 4, class: gpr32 }508 - { id: 5, class: gpr32 }509liveins:510 - { reg: '$w0', virtual-reg: '%0' }511 - { reg: '$w1', virtual-reg: '%1' }512frameInfo:513 maxCallFrameSize: 0514body: |515 bb.0.entry:516 liveins: $w0, $w1517 518 ; CHECK-LABEL: name: whilele_b8_s32_keep_ptest_of_doublewords519 ; CHECK: liveins: $w0, $w1520 ; CHECK-NEXT: {{ $}}521 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w1522 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w0523 ; CHECK-NEXT: [[PTRUE_D:%[0-9]+]]:ppr = PTRUE_D 31, implicit $vg524 ; CHECK-NEXT: [[WHILELE_PWW_B:%[0-9]+]]:ppr = WHILELE_PWW_B [[COPY1]], [[COPY]], implicit-def dead $nzcv525 ; CHECK-NEXT: PTEST_PP killed [[PTRUE_D]], killed [[WHILELE_PWW_B]], implicit-def $nzcv526 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr527 ; CHECK-NEXT: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr [[COPY2]], $wzr, 0, implicit $nzcv528 ; CHECK-NEXT: $w0 = COPY [[CSINCWr]]529 ; CHECK-NEXT: RET_ReallyLR implicit $w0530 %1:gpr32 = COPY $w1531 %0:gpr32 = COPY $w0532 %2:ppr = PTRUE_D 31, implicit $vg533 %3:ppr = WHILELE_PWW_B %0, %1, implicit-def dead $nzcv534 PTEST_PP killed %2, killed %3, implicit-def $nzcv535 %4:gpr32 = COPY $wzr536 %5:gpr32 = CSINCWr %4, $wzr, 0, implicit $nzcv537 $w0 = COPY %5538 RET_ReallyLR implicit $w0539 540...541