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 3 4define i1 @trunc_i32toi1(i32 %a) { 5; CHECK-LABEL: trunc_i32toi1: 6; CHECK: # %bb.0: 7; CHECK-NEXT: movl %edi, %eax 8; CHECK-NEXT: # kill: def $al killed $al killed $eax 9; CHECK-NEXT: retq 10 %r = trunc i32 %a to i1 11 ret i1 %r 12} 13 14define i8 @trunc_i32toi8(i32 %a) { 15; CHECK-LABEL: trunc_i32toi8: 16; CHECK: # %bb.0: 17; CHECK-NEXT: movl %edi, %eax 18; CHECK-NEXT: # kill: def $al killed $al killed $eax 19; CHECK-NEXT: retq 20 %r = trunc i32 %a to i8 21 ret i8 %r 22} 23 24define i16 @trunc_i32toi16(i32 %a) { 25; CHECK-LABEL: trunc_i32toi16: 26; CHECK: # %bb.0: 27; CHECK-NEXT: movl %edi, %eax 28; CHECK-NEXT: # kill: def $ax killed $ax killed $eax 29; CHECK-NEXT: retq 30 %r = trunc i32 %a to i16 31 ret i16 %r 32} 33 34define i8 @trunc_i64toi8(i64 %a) { 35; CHECK-LABEL: trunc_i64toi8: 36; CHECK: # %bb.0: 37; CHECK-NEXT: movq %rdi, %rax 38; CHECK-NEXT: # kill: def $al killed $al killed $rax 39; CHECK-NEXT: retq 40 %r = trunc i64 %a to i8 41 ret i8 %r 42} 43 44define i16 @trunc_i64toi16(i64 %a) { 45; CHECK-LABEL: trunc_i64toi16: 46; CHECK: # %bb.0: 47; CHECK-NEXT: movq %rdi, %rax 48; CHECK-NEXT: # kill: def $ax killed $ax killed $rax 49; CHECK-NEXT: retq 50 %r = trunc i64 %a to i16 51 ret i16 %r 52} 53 54define i32 @trunc_i64toi32(i64 %a) { 55; CHECK-LABEL: trunc_i64toi32: 56; CHECK: # %bb.0: 57; CHECK-NEXT: movq %rdi, %rax 58; CHECK-NEXT: # kill: def $eax killed $eax killed $rax 59; CHECK-NEXT: retq 60 %r = trunc i64 %a to i32 61 ret i32 %r 62} 63 64