1 ; RUN: llc -march=bpfel -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s
4 ; extern void foo(void) __attribute__((nomerge));
14 ; clang -target bpf -S -O2 -emit-llvm t.c -o t.ll
16 ; The goal of the test is to check that 'nomerge' attribute
17 ; preserves two calls to 'foo' from merging.
22 ; Function Attrs: nounwind
23 define dso_local void @bar(i64 noundef %i) local_unnamed_addr #0 {
25 %tobool.not = icmp eq i64 %i, 0
26 br i1 %tobool.not, label %if.else, label %if.then
28 if.then: ; preds = %entry
29 tail call void @foo() #2
32 if.else: ; preds = %entry
33 tail call void @foo() #2
36 if.end: ; preds = %if.else, %if.then
40 declare dso_local void @foo() local_unnamed_addr #1
42 attributes #0 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
43 attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
44 attributes #2 = { nomerge nounwind }
46 !llvm.module.flags = !{!0, !1}
49 !0 = !{i32 1, !"wchar_size", i32 4}
50 !1 = !{i32 7, !"frame-pointer", i32 2}
51 !2 = !{!"clang version 17.0.0 (/home/eddy/work/llvm-project/clang bd66f4b1da304af8e5a890b3205ce6f3d76667ee)"}