[PowerPC] Recommit r314244 with refactoring and off by default
[llvm-core.git] / test / CodeGen / AArch64 / GlobalISel / select-bswap.mir
blob17394fe86d2c1f36cc194efad8302075d2855caa
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs -global-isel %s -o - | FileCheck %s
4 --- |
5   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
7   define void @bswap_s32() { ret void }
8   define void @bswap_s64() { ret void }
9 ...
11 ---
12 name:            bswap_s32
13 legalized:       true
14 regBankSelected: true
16 registers:
17   - { id: 0, class: gpr }
18   - { id: 1, class: gpr }
20 body:             |
21   bb.0:
22     liveins: %w0
24     ; CHECK-LABEL: name: bswap_s32
25     ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY %w0
26     ; CHECK: [[REVWr:%[0-9]+]]:gpr32 = REVWr [[COPY]]
27     ; CHECK: %w0 = COPY [[REVWr]]
28     %0(s32) = COPY %w0
29     %1(s32) = G_BSWAP %0
30     %w0 = COPY %1
31 ...
33 ---
34 name:            bswap_s64
35 legalized:       true
36 regBankSelected: true
38 registers:
39   - { id: 0, class: gpr }
40   - { id: 1, class: gpr }
42 body:             |
43   bb.0:
44     liveins: %x0
46     ; CHECK-LABEL: name: bswap_s64
47     ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY %x0
48     ; CHECK: [[REVXr:%[0-9]+]]:gpr64 = REVXr [[COPY]]
49     ; CHECK: %x0 = COPY [[REVXr]]
50     %0(s64) = COPY %x0
51     %1(s64) = G_BSWAP %0
52     %x0 = COPY %1
53 ...