1 ; RUN: llc -march=bpfel -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s
2 ; RUN: llc -march=bpfeb -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s
5 ; int g __attribute__((section("maps"))) = 5;
6 ; int test() { return g; }
8 ; clang -target bpf -O2 -S -emit-llvm t.c
10 @g = dso_local local_unnamed_addr global i32 5, section "maps", align 4
12 ; Function Attrs: norecurse nounwind readonly
13 define dso_local i32 @test() local_unnamed_addr #0 {
14 %1 = load i32, i32* @g, align 4, !tbaa !2
18 ; CHECK-NOT: .section .BTF
19 ; CHECK-NOT: .section .BTF.ext
21 attributes #0 = { norecurse nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
23 !llvm.module.flags = !{!0}
26 !0 = !{i32 1, !"wchar_size", i32 4}
27 !1 = !{!"clang version 8.0.20181009 "}
29 !3 = !{!"int", !4, i64 0}
30 !4 = !{!"omnipotent char", !5, i64 0}
31 !5 = !{!"Simple C/C++ TBAA"}