• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=hexagon < %s | FileCheck %s
2
3declare i32 @ret_i32()
4
5define i8 @test_i8() {
6; CHECK-LABEL: test_i8:
7; CHECK: jump ret_i32
8  %res = tail call i32 @ret_i32()
9  %val = trunc i32 %res to i8
10  ret i8 %val
11}
12
13define i16 @test_i16() {
14; CHECK-LABEL: test_i16:
15; CHECK: jump ret_i32
16  %res = tail call i32 @ret_i32()
17  %val = trunc i32 %res to i16
18  ret i16 %val
19}
20
21declare i64 @ret_i64()
22define i32 @test_i32() {
23; CHECK-LABEL: test_i32:
24; CHECK: call ret_i64
25  %res = tail call i64 @ret_i64()
26  %val = trunc i64 %res to i32
27  ret i32 42
28}
29