forked from OSchip/llvm-project
113 lines
2.2 KiB
YAML
113 lines
2.2 KiB
YAML
# RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
|
|
|
|
--- |
|
|
define void @cbz_s32() { ret void }
|
|
define void @cbz_s64() { ret void }
|
|
define void @cbnz_s32() { ret void }
|
|
define void @cbnz_s64() { ret void }
|
|
...
|
|
|
|
---
|
|
# CHECK-LABEL: name: cbz_s32
|
|
name: cbz_s32
|
|
legalized: true
|
|
regBankSelected: true
|
|
|
|
# CHECK: body:
|
|
# CHECK: bb.0:
|
|
# CHECK: %0:gpr32 = COPY $w0
|
|
# CHECK: CBZW %0, %bb.1
|
|
# CHECK: B %bb.0
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0
|
|
successors: %bb.0, %bb.1
|
|
|
|
%0:gpr(s32) = COPY $w0
|
|
%1:gpr(s32) = G_CONSTANT i32 0
|
|
%2:gpr(s32) = G_ICMP intpred(eq), %0, %1
|
|
%3:gpr(s1) = G_TRUNC %2(s32)
|
|
G_BRCOND %3(s1), %bb.1
|
|
G_BR %bb.0
|
|
|
|
bb.1:
|
|
...
|
|
|
|
---
|
|
# CHECK-LABEL: name: cbz_s64
|
|
name: cbz_s64
|
|
legalized: true
|
|
regBankSelected: true
|
|
|
|
# CHECK: body:
|
|
# CHECK: bb.0:
|
|
# CHECK: %0:gpr64 = COPY $x0
|
|
# CHECK: CBZX %0, %bb.1
|
|
# CHECK: B %bb.0
|
|
body: |
|
|
bb.0:
|
|
liveins: $x0
|
|
successors: %bb.0, %bb.1
|
|
|
|
%0:gpr(s64) = COPY $x0
|
|
%1:gpr(s64) = G_CONSTANT i64 0
|
|
%2:gpr(s32) = G_ICMP intpred(eq), %0, %1
|
|
%3:gpr(s1) = G_TRUNC %2(s32)
|
|
G_BRCOND %3(s1), %bb.1
|
|
G_BR %bb.0
|
|
|
|
bb.1:
|
|
...
|
|
|
|
---
|
|
# CHECK-LABEL: name: cbnz_s32
|
|
name: cbnz_s32
|
|
legalized: true
|
|
regBankSelected: true
|
|
|
|
# CHECK: body:
|
|
# CHECK: bb.0:
|
|
# CHECK: %0:gpr32 = COPY $w0
|
|
# CHECK: CBNZW %0, %bb.1
|
|
# CHECK: B %bb.0
|
|
body: |
|
|
bb.0:
|
|
liveins: $w0
|
|
successors: %bb.0, %bb.1
|
|
|
|
%0:gpr(s32) = COPY $w0
|
|
%1:gpr(s32) = G_CONSTANT i32 0
|
|
%2:gpr(s32) = G_ICMP intpred(ne), %0, %1
|
|
%3:gpr(s1) = G_TRUNC %2(s32)
|
|
G_BRCOND %3(s1), %bb.1
|
|
G_BR %bb.0
|
|
|
|
bb.1:
|
|
...
|
|
|
|
---
|
|
# CHECK-LABEL: name: cbnz_s64
|
|
name: cbnz_s64
|
|
legalized: true
|
|
regBankSelected: true
|
|
|
|
# CHECK: body:
|
|
# CHECK: bb.0:
|
|
# CHECK: %0:gpr64 = COPY $x0
|
|
# CHECK: CBNZX %0, %bb.1
|
|
# CHECK: B %bb.0
|
|
body: |
|
|
bb.0:
|
|
liveins: $x0
|
|
successors: %bb.0, %bb.1
|
|
|
|
%0:gpr(s64) = COPY $x0
|
|
%1:gpr(s64) = G_CONSTANT i64 0
|
|
%2:gpr(s32) = G_ICMP intpred(ne), %0, %1
|
|
%3:gpr(s1) = G_TRUNC %2(s32)
|
|
G_BRCOND %3(s1), %bb.1
|
|
G_BR %bb.0
|
|
|
|
bb.1:
|
|
...
|