1# RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s 2 3--- | 4 define void @cbz_s32() { ret void } 5 define void @cbz_s64() { ret void } 6 define void @cbnz_s32() { ret void } 7 define void @cbnz_s64() { ret void } 8... 9 10--- 11# CHECK-LABEL: name: cbz_s32 12name: cbz_s32 13legalized: true 14regBankSelected: true 15 16# CHECK: body: 17# CHECK: bb.0: 18# CHECK: %0:gpr32 = COPY $w0 19# CHECK: CBZW %0, %bb.1 20# CHECK: B %bb.0 21body: | 22 bb.0: 23 liveins: $w0 24 successors: %bb.0, %bb.1 25 26 %0:gpr(s32) = COPY $w0 27 %1:gpr(s32) = G_CONSTANT i32 0 28 %2:gpr(s32) = G_ICMP intpred(eq), %0, %1 29 %3:gpr(s1) = G_TRUNC %2(s32) 30 G_BRCOND %3(s1), %bb.1 31 G_BR %bb.0 32 33 bb.1: 34... 35 36--- 37# CHECK-LABEL: name: cbz_s64 38name: cbz_s64 39legalized: true 40regBankSelected: true 41 42# CHECK: body: 43# CHECK: bb.0: 44# CHECK: %0:gpr64 = COPY $x0 45# CHECK: CBZX %0, %bb.1 46# CHECK: B %bb.0 47body: | 48 bb.0: 49 liveins: $x0 50 successors: %bb.0, %bb.1 51 52 %0:gpr(s64) = COPY $x0 53 %1:gpr(s64) = G_CONSTANT i64 0 54 %2:gpr(s32) = G_ICMP intpred(eq), %0, %1 55 %3:gpr(s1) = G_TRUNC %2(s32) 56 G_BRCOND %3(s1), %bb.1 57 G_BR %bb.0 58 59 bb.1: 60... 61 62--- 63# CHECK-LABEL: name: cbnz_s32 64name: cbnz_s32 65legalized: true 66regBankSelected: true 67 68# CHECK: body: 69# CHECK: bb.0: 70# CHECK: %0:gpr32 = COPY $w0 71# CHECK: CBNZW %0, %bb.1 72# CHECK: B %bb.0 73body: | 74 bb.0: 75 liveins: $w0 76 successors: %bb.0, %bb.1 77 78 %0:gpr(s32) = COPY $w0 79 %1:gpr(s32) = G_CONSTANT i32 0 80 %2:gpr(s32) = G_ICMP intpred(ne), %0, %1 81 %3:gpr(s1) = G_TRUNC %2(s32) 82 G_BRCOND %3(s1), %bb.1 83 G_BR %bb.0 84 85 bb.1: 86... 87 88--- 89# CHECK-LABEL: name: cbnz_s64 90name: cbnz_s64 91legalized: true 92regBankSelected: true 93 94# CHECK: body: 95# CHECK: bb.0: 96# CHECK: %0:gpr64 = COPY $x0 97# CHECK: CBNZX %0, %bb.1 98# CHECK: B %bb.0 99body: | 100 bb.0: 101 liveins: $x0 102 successors: %bb.0, %bb.1 103 104 %0:gpr(s64) = COPY $x0 105 %1:gpr(s64) = G_CONSTANT i64 0 106 %2:gpr(s32) = G_ICMP intpred(ne), %0, %1 107 %3:gpr(s1) = G_TRUNC %2(s32) 108 G_BRCOND %3(s1), %bb.1 109 G_BR %bb.0 110 111 bb.1: 112... 113