forked from OSchip/llvm-project
82 lines
1.8 KiB
YAML
82 lines
1.8 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 @trunc_s32_s64() { ret void }
|
|
define void @trunc_s8_s64() { ret void }
|
|
define void @trunc_s1_s32() { ret void }
|
|
...
|
|
|
|
---
|
|
# CHECK-LABEL: name: trunc_s32_s64
|
|
name: trunc_s32_s64
|
|
legalized: true
|
|
regBankSelected: true
|
|
|
|
# CHECK: registers:
|
|
# CHECK-NEXT: - { id: 0, class: gpr64sp, preferred-register: '' }
|
|
# CHECK-NEXT: - { id: 1, class: gpr32sp, preferred-register: '' }
|
|
registers:
|
|
- { id: 0, class: gpr }
|
|
- { id: 1, class: gpr }
|
|
|
|
# CHECK: body:
|
|
# CHECK: %1 = COPY %0.sub_32
|
|
body: |
|
|
bb.0:
|
|
liveins: %x0
|
|
|
|
%0(s64) = COPY %x0
|
|
%1(s32) = G_TRUNC %0
|
|
%w0 = COPY %1(s32)
|
|
...
|
|
|
|
---
|
|
# CHECK-LABEL: name: trunc_s8_s64
|
|
name: trunc_s8_s64
|
|
legalized: true
|
|
regBankSelected: true
|
|
|
|
# CHECK: registers:
|
|
# CHECK-NEXT: - { id: 0, class: gpr64, preferred-register: '' }
|
|
# CHECK-NEXT: - { id: 1, class: gpr32, preferred-register: '' }
|
|
registers:
|
|
- { id: 0, class: gpr }
|
|
- { id: 1, class: gpr }
|
|
|
|
# CHECK: body:
|
|
# CHECK: %1 = COPY %0.sub_32
|
|
body: |
|
|
bb.0:
|
|
liveins: %x0
|
|
|
|
%0(s64) = COPY %x0
|
|
%1(s8) = G_TRUNC %0
|
|
%w0 = COPY %1(s8)
|
|
...
|
|
|
|
---
|
|
# CHECK-LABEL: name: trunc_s1_s32
|
|
name: trunc_s1_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: %1 = COPY %0
|
|
body: |
|
|
bb.0:
|
|
liveins: %w0
|
|
|
|
%0(s32) = COPY %w0
|
|
%1(s1) = G_TRUNC %0
|
|
%w0 = COPY %1(s1)
|
|
...
|