1 ; RUN: llc -march=bpfel -filetype=obj -o - %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK %s
2 ; RUN: llc -march=bpfeb -filetype=obj -o - %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK %s
5 ; static volatile long a = 2;
6 ; static volatile int b = 3;
7 ; int test() { return a + b; }
8 @a = internal global i64 2, align 8
9 @b = internal global i32 3, align 4
11 ; Function Attrs: norecurse nounwind
12 define dso_local i32 @test() local_unnamed_addr #0 {
13 %1 = load volatile i64, ptr @a, align 8, !tbaa !2
15 ; CHECK: r1 = *(u64 *)(r1 + 0)
16 %2 = load volatile i32, ptr @b, align 4, !tbaa !6
18 ; CHECK: r0 = *(u32 *)(r2 + 0)
19 %3 = trunc i64 %1 to i32
26 attributes #0 = { norecurse nounwind }
28 !llvm.module.flags = !{!0}
31 !0 = !{i32 1, !"wchar_size", i32 4}
32 !1 = !{!"clang version 8.0.20181009 "}
34 !3 = !{!"long", !4, i64 0}
35 !4 = !{!"omnipotent char", !5, i64 0}
36 !5 = !{!"Simple C/C++ TBAA"}
38 !7 = !{!"int", !4, i64 0}