1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
| ; ModuleID = 'test.ll' source_filename = "test.c" target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx12.0.0"
@.str = private unnamed_addr constant [5 x i8] c"AAA\0A\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"BBB\0A\00", align 1 @__sancov_lowest_stack = external thread_local(initialexec) global i64 @__sancov_gen_ = private global [3 x i32] zeroinitializer, section "__DATA,__sancov_guards", align 4 @__sancov_gen_.1 = private global [1 x i32] zeroinitializer, section "__DATA,__sancov_guards", align 4 @"\01section$start$__DATA$__sancov_guards" = extern_weak hidden global i32 @"\01section$end$__DATA$__sancov_guards" = extern_weak hidden global i32 @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 2, ptr @sancov.module_ctor_trace_pc_guard, ptr null }] @llvm.used = appending global [3 x ptr] [ptr @sancov.module_ctor_trace_pc_guard, ptr @__sancov_gen_, ptr @__sancov_gen_.1], section "llvm.metadata"
; Function Attrs: noinline nounwind optnone ssp uwtable define void @func(i32 noundef %a) #0 { entry: %a.addr = alloca i32, align 4 call void @__sanitizer_cov_trace_pc_guard(ptr @__sancov_gen_) #3 store i32 %a, ptr %a.addr, align 4 %0 = load i32, ptr %a.addr, align 4 %cmp = icmp sgt i32 %0, 10 br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry call void @__sanitizer_cov_trace_pc_guard(ptr inttoptr (i64 add (i64 ptrtoint (ptr @__sancov_gen_ to i64), i64 4) to ptr)) #3 %call = call i32 (ptr, ...) @printf(ptr noundef @.str) br label %if.end
if.else: ; preds = %entry call void @__sanitizer_cov_trace_pc_guard(ptr inttoptr (i64 add (i64 ptrtoint (ptr @__sancov_gen_ to i64), i64 8) to ptr)) #3 %call1 = call i32 (ptr, ...) @printf(ptr noundef @.str.1) br label %if.end
if.end: ; preds = %if.else, %if.then ret void }
declare i32 @printf(ptr noundef, ...) #1
; Function Attrs: noinline nounwind optnone ssp uwtable define i32 @main() #0 { entry: %retval = alloca i32, align 4 %a = alloca i32, align 4 call void @__sanitizer_cov_trace_pc_guard(ptr @__sancov_gen_.1) #3 store i32 0, ptr %retval, align 4 store i32 100, ptr %a, align 4 %0 = load i32, ptr %a, align 4 call void @func(i32 noundef %0) ret i32 0 }
declare void @__sanitizer_cov_trace_pc_indir(i64)
declare void @__sanitizer_cov_trace_cmp1(i8 zeroext, i8 zeroext)
declare void @__sanitizer_cov_trace_cmp2(i16 zeroext, i16 zeroext)
declare void @__sanitizer_cov_trace_cmp4(i32 zeroext, i32 zeroext)
declare void @__sanitizer_cov_trace_cmp8(i64, i64)
declare void @__sanitizer_cov_trace_const_cmp1(i8 zeroext, i8 zeroext)
declare void @__sanitizer_cov_trace_const_cmp2(i16 zeroext, i16 zeroext)
declare void @__sanitizer_cov_trace_const_cmp4(i32 zeroext, i32 zeroext)
declare void @__sanitizer_cov_trace_const_cmp8(i64, i64)
declare void @__sanitizer_cov_load1(ptr)
declare void @__sanitizer_cov_load2(ptr)
declare void @__sanitizer_cov_load4(ptr)
declare void @__sanitizer_cov_load8(ptr)
declare void @__sanitizer_cov_load16(ptr)
declare void @__sanitizer_cov_store1(ptr)
declare void @__sanitizer_cov_store2(ptr)
declare void @__sanitizer_cov_store4(ptr)
declare void @__sanitizer_cov_store8(ptr)
declare void @__sanitizer_cov_store16(ptr)
declare void @__sanitizer_cov_trace_div4(i32 zeroext)
declare void @__sanitizer_cov_trace_div8(i64)
declare void @__sanitizer_cov_trace_gep(i64)
declare void @__sanitizer_cov_trace_switch(i64, ptr)
declare void @__sanitizer_cov_trace_pc()
declare void @__sanitizer_cov_trace_pc_guard(ptr)
declare void @__sanitizer_cov_trace_pc_guard_init(ptr, ptr)
; Function Attrs: nounwind uwtable define internal void @sancov.module_ctor_trace_pc_guard() #2 { call void @__sanitizer_cov_trace_pc_guard_init(ptr @"\01section$start$__DATA$__sancov_guards", ptr @"\01section$end$__DATA$__sancov_guards") ret void }
attributes #0 = { noinline nounwind optnone ssp uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "tune-cpu"="generic" } attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "tune-cpu"="generic" } attributes #2 = { nounwind uwtable "frame-pointer"="all" } attributes #3 = { nomerge }
!llvm.module.flags = !{!0, !1, !2, !3, !4} !llvm.ident = !{!5}
!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 12, i32 0]} !1 = !{i32 1, !"wchar_size", i32 4} !2 = !{i32 7, !"PIC Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{i32 7, !"frame-pointer", i32 2} !5 = !{!"clang version 15.0.3"}
|