• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:    retq
9  %r = trunc i32 %a to i1
10  ret i1 %r
11}
12
13define i8 @trunc_i32toi8(i32 %a) {
14; CHECK-LABEL: trunc_i32toi8:
15; CHECK:       # %bb.0:
16; CHECK-NEXT:    movl %edi, %eax
17; CHECK-NEXT:    retq
18  %r = trunc i32 %a to i8
19  ret i8 %r
20}
21
22define i16 @trunc_i32toi16(i32 %a) {
23; CHECK-LABEL: trunc_i32toi16:
24; CHECK:       # %bb.0:
25; CHECK-NEXT:    movl %edi, %eax
26; CHECK-NEXT:    retq
27  %r = trunc i32 %a to i16
28  ret i16 %r
29}
30
31define i8 @trunc_i64toi8(i64 %a) {
32; CHECK-LABEL: trunc_i64toi8:
33; CHECK:       # %bb.0:
34; CHECK-NEXT:    movl %edi, %eax
35; CHECK-NEXT:    retq
36  %r = trunc i64 %a to i8
37  ret i8 %r
38}
39
40define i16 @trunc_i64toi16(i64 %a) {
41; CHECK-LABEL: trunc_i64toi16:
42; CHECK:       # %bb.0:
43; CHECK-NEXT:    movl %edi, %eax
44; CHECK-NEXT:    retq
45  %r = trunc i64 %a to i16
46  ret i16 %r
47}
48
49define i32 @trunc_i64toi32(i64 %a) {
50; CHECK-LABEL: trunc_i64toi32:
51; CHECK:       # %bb.0:
52; CHECK-NEXT:    movl %edi, %eax
53; CHECK-NEXT:    retq
54  %r = trunc i64 %a to i32
55  ret i32 %r
56}
57
58