1212//.
1313// CHECK: Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(write, argmem: none, inaccessiblemem: none)
1414// CHECK-LABEL: define dso_local void @escape
15- // CHECK-SAME: (ptr noundef [[P:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] !pcsections [[META2:![0-9]+]] {
15+ // CHECK-SAME: (ptr noundef [[P:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] !pcsections !2 {
1616// CHECK-NEXT: entry:
1717// CHECK-NEXT: ret void
1818//
@@ -23,13 +23,13 @@ __attribute__((noinline, not_tail_called)) void escape(const volatile void *p) {
2323
2424// CHECK: Function Attrs: mustprogress nofree norecurse nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none)
2525// CHECK-LABEL: define dso_local i32 @normal_function
26- // CHECK-SAME: (ptr noundef [[X:%.*]], ptr nocapture noundef readonly [[Y:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] !pcsections [[META4:![0-9]+]] {
26+ // CHECK-SAME: (ptr noundef [[X:%.*]], ptr nocapture noundef readonly [[Y:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] !pcsections !4 {
2727// CHECK-NEXT: entry:
2828// CHECK-NEXT: [[X_ADDR:%.*]] = alloca ptr, align 8
2929// CHECK-NEXT: store ptr [[X]], ptr [[X_ADDR]], align 8, !tbaa [[TBAA6:![0-9]+]]
30- // CHECK-NEXT: store atomic i32 1, ptr [[X]] monotonic, align 4, !pcsections [[META11:![0-9]+]]
30+ // CHECK-NEXT: store atomic i32 1, ptr [[X]] monotonic, align 4, !pcsections !10
3131// CHECK-NEXT: notail call void @escape(ptr noundef nonnull [[X_ADDR]])
32- // CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[Y]], align 4, !tbaa [[TBAA12 :![0-9]+]]
32+ // CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[Y]], align 4, !tbaa [[TBAA11 :![0-9]+]]
3333// CHECK-NEXT: ret i32 [[TMP0]]
3434//
3535int normal_function (int * x , int * y ) {
@@ -46,7 +46,7 @@ int normal_function(int *x, int *y) {
4646// CHECK-NEXT: store ptr [[X]], ptr [[X_ADDR]], align 8, !tbaa [[TBAA6]]
4747// CHECK-NEXT: store atomic i32 1, ptr [[X]] monotonic, align 4
4848// CHECK-NEXT: notail call void @escape(ptr noundef nonnull [[X_ADDR]])
49- // CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[Y]], align 4, !tbaa [[TBAA12 ]]
49+ // CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[Y]], align 4, !tbaa [[TBAA11 ]]
5050// CHECK-NEXT: ret i32 [[TMP0]]
5151//
5252__attribute__((disable_sanitizer_instrumentation )) int test_disable_sanitize_instrumentation (int * x , int * y ) {
@@ -57,13 +57,13 @@ __attribute__((disable_sanitizer_instrumentation)) int test_disable_sanitize_ins
5757
5858// CHECK: Function Attrs: mustprogress nofree norecurse nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none)
5959// CHECK-LABEL: define dso_local i32 @test_no_sanitize_thread
60- // CHECK-SAME: (ptr noundef [[X:%.*]], ptr nocapture noundef readonly [[Y:%.*]]) local_unnamed_addr #[[ATTR3:[0-9]+]] !pcsections [[META14:![0-9]+]] {
60+ // CHECK-SAME: (ptr noundef [[X:%.*]], ptr nocapture noundef readonly [[Y:%.*]]) local_unnamed_addr #[[ATTR3:[0-9]+]] !pcsections !13 {
6161// CHECK-NEXT: entry:
6262// CHECK-NEXT: [[X_ADDR:%.*]] = alloca ptr, align 8
6363// CHECK-NEXT: store ptr [[X]], ptr [[X_ADDR]], align 8, !tbaa [[TBAA6]]
64- // CHECK-NEXT: store atomic i32 1, ptr [[X]] monotonic, align 4, !pcsections [[META11]]
64+ // CHECK-NEXT: store atomic i32 1, ptr [[X]] monotonic, align 4, !pcsections !10
6565// CHECK-NEXT: notail call void @escape(ptr noundef nonnull [[X_ADDR]])
66- // CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[Y]], align 4, !tbaa [[TBAA12 ]]
66+ // CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[Y]], align 4, !tbaa [[TBAA11 ]]
6767// CHECK-NEXT: ret i32 [[TMP0]]
6868//
6969__attribute__((no_sanitize ("thread" ))) int test_no_sanitize_thread (int * x , int * y ) {
@@ -74,13 +74,13 @@ __attribute__((no_sanitize("thread"))) int test_no_sanitize_thread(int *x, int *
7474
7575// CHECK: Function Attrs: mustprogress nofree norecurse nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none)
7676// CHECK-LABEL: define dso_local i32 @test_no_sanitize_all
77- // CHECK-SAME: (ptr noundef [[X:%.*]], ptr nocapture noundef readonly [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] !pcsections [[META14]] {
77+ // CHECK-SAME: (ptr noundef [[X:%.*]], ptr nocapture noundef readonly [[Y:%.*]]) local_unnamed_addr #[[ATTR3]] !pcsections !13 {
7878// CHECK-NEXT: entry:
7979// CHECK-NEXT: [[X_ADDR:%.*]] = alloca ptr, align 8
8080// CHECK-NEXT: store ptr [[X]], ptr [[X_ADDR]], align 8, !tbaa [[TBAA6]]
81- // CHECK-NEXT: store atomic i32 1, ptr [[X]] monotonic, align 4, !pcsections [[META11]]
81+ // CHECK-NEXT: store atomic i32 1, ptr [[X]] monotonic, align 4, !pcsections !10
8282// CHECK-NEXT: notail call void @escape(ptr noundef nonnull [[X_ADDR]])
83- // CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[Y]], align 4, !tbaa [[TBAA12 ]]
83+ // CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[Y]], align 4, !tbaa [[TBAA11 ]]
8484// CHECK-NEXT: ret i32 [[TMP0]]
8585//
8686__attribute__((no_sanitize ("all" ))) int test_no_sanitize_all (int * x , int * y ) {
@@ -89,9 +89,23 @@ __attribute__((no_sanitize("all"))) int test_no_sanitize_all(int *x, int *y) {
8989 return * y ;
9090}
9191//.
92- // CHECK: attributes #[[ATTR0]] = { mustprogress nofree noinline norecurse nosync nounwind willreturn memory(write, argmem: none, inaccessiblemem: none) "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
93- // CHECK: attributes #[[ATTR1]] = { mustprogress nofree norecurse nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
94- // CHECK: attributes #[[ATTR2]] = { disable_sanitizer_instrumentation mustprogress nofree norecurse nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
95- // CHECK: attributes #[[ATTR3]] = { mustprogress nofree norecurse nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) "min-legal-vector-width"="0" "no-trapping-math"="true" "no_sanitize_thread" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
96- // CHECK: attributes #[[ATTR4:[0-9]+]] = { nounwind "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
92+ // CHECK: attributes #0 = { mustprogress nofree noinline norecurse nosync nounwind willreturn memory(write, argmem: none, inaccessiblemem: none) "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
93+ // CHECK: attributes #1 = { mustprogress nofree norecurse nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
94+ // CHECK: attributes #2 = { disable_sanitizer_instrumentation mustprogress nofree norecurse nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
95+ // CHECK: attributes #3 = { mustprogress nofree norecurse nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) "min-legal-vector-width"="0" "no-trapping-math"="true" "no_sanitize_thread" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
96+ // CHECK: attributes #4 = { nounwind "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
97+ //.
98+ // CHECK: !2 = !{!"sanmd_covered2!C", !3}
99+ // CHECK: !3 = !{i64 0}
100+ // CHECK: !4 = !{!"sanmd_covered2!C", !5}
101+ // CHECK: !5 = !{i64 3}
102+ // CHECK: !6 = !{!7, !7, i64 0}
103+ // CHECK: !7 = !{!"any pointer", !8, i64 0}
104+ // CHECK: !8 = !{!"omnipotent char", !9, i64 0}
105+ // CHECK: !9 = !{!"Simple C/C++ TBAA"}
106+ // CHECK: !10 = !{!"sanmd_atomics2!C"}
107+ // CHECK: !11 = !{!12, !12, i64 0}
108+ // CHECK: !12 = !{!"int", !8, i64 0}
109+ // CHECK: !13 = !{!"sanmd_covered2!C", !14}
110+ // CHECK: !14 = !{i64 2}
97111//.
0 commit comments