1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s 3 4--- | 5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" 6 7 define void @trunc_s32_s64() { ret void } 8 define void @trunc_s8_s64() { ret void } 9 define void @trunc_s1_s32() { ret void } 10... 11 12--- 13name: trunc_s32_s64 14legalized: true 15regBankSelected: true 16 17registers: 18 - { id: 0, class: gpr } 19 - { id: 1, class: gpr } 20 21body: | 22 bb.0: 23 liveins: $x0 24 25 ; CHECK-LABEL: name: trunc_s32_s64 26 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0 27 ; CHECK: [[COPY1:%[0-9]+]]:gpr32sp = COPY [[COPY]].sub_32 28 ; CHECK: $w0 = COPY [[COPY1]] 29 %0(s64) = COPY $x0 30 %1(s32) = G_TRUNC %0 31 $w0 = COPY %1(s32) 32... 33 34--- 35name: trunc_s8_s64 36legalized: true 37regBankSelected: true 38 39registers: 40 - { id: 0, class: gpr } 41 - { id: 1, class: gpr } 42 43body: | 44 bb.0: 45 liveins: $x0 46 47 ; CHECK-LABEL: name: trunc_s8_s64 48 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0 49 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]].sub_32 50 ; CHECK: [[COPY2:%[0-9]+]]:gpr32all = COPY [[COPY1]] 51 ; CHECK: $w0 = COPY [[COPY2]] 52 %0(s64) = COPY $x0 53 %1(s8) = G_TRUNC %0 54 %2:gpr(s32) = G_ANYEXT %1 55 $w0 = COPY %2(s32) 56... 57 58--- 59name: trunc_s1_s32 60legalized: true 61regBankSelected: true 62 63registers: 64 - { id: 0, class: gpr } 65 - { id: 1, class: gpr } 66 67body: | 68 bb.0: 69 liveins: $w0 70 71 ; CHECK-LABEL: name: trunc_s1_s32 72 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0 73 ; CHECK: [[COPY2:%[0-9]+]]:gpr32all = COPY [[COPY]] 74 ; CHECK: $w0 = COPY [[COPY2]] 75 %0(s32) = COPY $w0 76 %1(s1) = G_TRUNC %0 77 %2:gpr(s32) = G_ANYEXT %1 78 $w0 = COPY %2(s32) 79... 80