1
- ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 5
1
+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check- globals all --version 5
2
2
; This test checks in the second run, function is not instrumented again.
3
3
; RUN: opt < %s -passes=asan,asan -S | FileCheck %s
4
4
@@ -8,13 +8,12 @@ target triple = "x86_64-unknown-linux-gnu"
8
8
; Function with sanitize_address is instrumented.
9
9
; Function Attrs: nounwind uwtable
10
10
;.
11
- ; CHECK: @llvm.used = appending global [1 x ptr] [ptr @asan.module_ctor], section "llvm.metadata"
12
11
; CHECK: @___asan_globals_registered = common hidden global i64 0
13
12
; CHECK: @__start_asan_globals = extern_weak hidden global i64
14
13
; CHECK: @__stop_asan_globals = extern_weak hidden global i64
15
- ; CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 1, ptr @asan.module_ctor, ptr @asan.module_ctor }]
16
14
;.
17
15
define void @instr_sa (ptr %a ) sanitize_address {
16
+ ; CHECK: Function Attrs: sanitize_address
18
17
; CHECK-LABEL: define void @instr_sa(
19
18
; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR0:[0-9]+]] {
20
19
; CHECK-NEXT: [[ENTRY:.*:]]
@@ -24,15 +23,15 @@ define void @instr_sa(ptr %a) sanitize_address {
24
23
; CHECK-NEXT: [[TMP3:%.*]] = inttoptr i64 [[TMP2]] to ptr
25
24
; CHECK-NEXT: [[TMP4:%.*]] = load i8, ptr [[TMP3]], align 1
26
25
; CHECK-NEXT: [[TMP5:%.*]] = icmp ne i8 [[TMP4]], 0
27
- ; CHECK-NEXT: br i1 [[TMP5]], label %[[BB6:.*]], label %[[BB12:.*]], !prof [[PROF0 :![0-9]+]]
26
+ ; CHECK-NEXT: br i1 [[TMP5]], label %[[BB6:.*]], label %[[BB12:.*]], !prof [[PROF1 :![0-9]+]]
28
27
; CHECK: [[BB6]]:
29
28
; CHECK-NEXT: [[TMP7:%.*]] = and i64 [[TMP0]], 7
30
29
; CHECK-NEXT: [[TMP8:%.*]] = add i64 [[TMP7]], 3
31
30
; CHECK-NEXT: [[TMP9:%.*]] = trunc i64 [[TMP8]] to i8
32
31
; CHECK-NEXT: [[TMP10:%.*]] = icmp sge i8 [[TMP9]], [[TMP4]]
33
32
; CHECK-NEXT: br i1 [[TMP10]], label %[[BB11:.*]], label %[[BB12]]
34
33
; CHECK: [[BB11]]:
35
- ; CHECK-NEXT: call void @__asan_report_load4(i64 [[TMP0]]) #[[ATTR3 :[0-9]+]]
34
+ ; CHECK-NEXT: call void @__asan_report_load4(i64 [[TMP0]]) #[[ATTR2 :[0-9]+]]
36
35
; CHECK-NEXT: unreachable
37
36
; CHECK: [[BB12]]:
38
37
; CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[A]], align 4
49
48
;.
50
49
; CHECK: attributes #[[ATTR0]] = { sanitize_address }
51
50
; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
52
- ; CHECK: attributes #[[ATTR2:[0-9]+]] = { nounwind }
53
- ; CHECK: attributes #[[ATTR3]] = { nomerge }
51
+ ; CHECK: attributes #[[ATTR2]] = { nomerge }
54
52
;.
55
- ; CHECK: [[PROF0]] = !{!"branch_weights", i32 1, i32 1048575}
53
+ ; CHECK: [[META0:![0-9]+]] = !{i32 4, !"nosanitize", i32 1}
54
+ ; CHECK: [[PROF1]] = !{!"branch_weights", i32 1, i32 1048575}
56
55
;.
0 commit comments