1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=CHECK
4 define i1 @trunc_i32toi1(i32 %a) {
5 ; CHECK-LABEL: trunc_i32toi1:
7 ; CHECK-NEXT: movl %edi, %eax
8 ; CHECK-NEXT: # kill: def $al killed $al killed $eax
10 %r = trunc i32 %a to i1
14 define i8 @trunc_i32toi8(i32 %a) {
15 ; CHECK-LABEL: trunc_i32toi8:
17 ; CHECK-NEXT: movl %edi, %eax
18 ; CHECK-NEXT: # kill: def $al killed $al killed $eax
20 %r = trunc i32 %a to i8
24 define i16 @trunc_i32toi16(i32 %a) {
25 ; CHECK-LABEL: trunc_i32toi16:
27 ; CHECK-NEXT: movl %edi, %eax
28 ; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
30 %r = trunc i32 %a to i16
34 define i8 @trunc_i64toi8(i64 %a) {
35 ; CHECK-LABEL: trunc_i64toi8:
37 ; CHECK-NEXT: movq %rdi, %rax
38 ; CHECK-NEXT: # kill: def $al killed $al killed $rax
40 %r = trunc i64 %a to i8
44 define i16 @trunc_i64toi16(i64 %a) {
45 ; CHECK-LABEL: trunc_i64toi16:
47 ; CHECK-NEXT: movq %rdi, %rax
48 ; CHECK-NEXT: # kill: def $ax killed $ax killed $rax
50 %r = trunc i64 %a to i16
54 define i32 @trunc_i64toi32(i64 %a) {
55 ; CHECK-LABEL: trunc_i64toi32:
57 ; CHECK-NEXT: movq %rdi, %rax
58 ; CHECK-NEXT: # kill: def $eax killed $eax killed $rax
60 %r = trunc i64 %a to i32