1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/CodeGen/AArch64/GlobalISel/select-bswap.mir
2017-09-19 14:25:15 +00:00

61 lines
1.3 KiB
YAML

# RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s
--- |
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
define void @bswap_s32() { ret void }
define void @bswap_s64() { ret void }
...
---
# CHECK-LABEL: name: bswap_s32
name: bswap_s32
legalized: true
regBankSelected: true
# CHECK: registers:
# CHECK-NEXT: - { id: 0, class: gpr32, preferred-register: '' }
# CHECK-NEXT: - { id: 1, class: gpr32, preferred-register: '' }
registers:
- { id: 0, class: gpr }
- { id: 1, class: gpr }
# CHECK: body:
# CHECK: %0 = COPY %w0
# CHECK: %1 = REVWr %0
# CHECK: %w0 = COPY %1
body: |
bb.0:
liveins: %w0
%0(s32) = COPY %w0
%1(s32) = G_BSWAP %0
%w0 = COPY %1
...
---
# CHECK-LABEL: name: bswap_s64
name: bswap_s64
legalized: true
regBankSelected: true
# CHECK: registers:
# CHECK-NEXT: - { id: 0, class: gpr64, preferred-register: '' }
# CHECK-NEXT: - { id: 1, class: gpr64, preferred-register: '' }
registers:
- { id: 0, class: gpr }
- { id: 1, class: gpr }
# CHECK: body:
# CHECK: %0 = COPY %x0
# CHECK: %1 = REVXr %0
# CHECK: %x0 = COPY %1
body: |
bb.0:
liveins: %x0
%0(s64) = COPY %x0
%1(s64) = G_BSWAP %0
%x0 = COPY %1
...