• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=bpfel | FileCheck %s
2
3define void @test() #0 {
4entry:
5; CHECK: test:
6
7; CHECK: call f_i16
8; CHECK: sth 0(r1), r0
9  %0 = call i16 @f_i16()
10  store volatile i16 %0, i16* @g_i16
11
12; CHECK: call f_i32
13; CHECK: stw 0(r1), r0
14  %1 = call i32 @f_i32()
15  store volatile i32 %1, i32* @g_i32
16
17; CHECK: call f_i64
18; CHECK: std 0(r1), r0
19  %2 = call i64 @f_i64()
20  store volatile i64 %2, i64* @g_i64
21
22  ret void
23}
24
25@g_i16 = common global i16 0, align 2
26@g_i32 = common global i32 0, align 2
27@g_i64 = common global i64 0, align 2
28
29define i16 @f_i16() #0 {
30; CHECK: f_i16:
31; CHECK: mov r0, 1
32; CHECK: ret
33  ret i16 1
34}
35
36define i32 @f_i32() #0 {
37; CHECK: f_i32:
38; CHECK: mov r0, 16909060
39; CHECK: ret
40  ret i32 16909060
41}
42
43define i64 @f_i64() #0 {
44; CHECK: f_i64:
45; CHECK: ld_64 r0, 72623859790382856
46; CHECK: ret
47  ret i64 72623859790382856
48}
49