29
29
// CHECK: [[HANDLER_DIVREM_OVERFLOW]]:
30
30
// CHECK-NEXT: [[TMP10:%.*]] = zext i32 [[X]] to i64, !nosanitize [[META2]]
31
31
// CHECK-NEXT: [[TMP11:%.*]] = zext i32 [[Y]] to i64, !nosanitize [[META2]]
32
- // CHECK-NEXT: tail call void @__ubsan_handle_divrem_overflow_abort(ptr nonnull @[[GLOB1:[0-9]+]], i64 [[TMP10]], i64 [[TMP11]]) #[[ATTR6 :[0-9]+]], !nosanitize [[META2]]
32
+ // CHECK-NEXT: tail call void @__ubsan_handle_divrem_overflow_abort(ptr nonnull @[[GLOB1:[0-9]+]], i64 [[TMP10]], i64 [[TMP11]]) #[[ATTR8 :[0-9]+]], !nosanitize [[META2]]
33
33
// CHECK-NEXT: unreachable, !nosanitize [[META2]]
34
34
// CHECK: [[CONT]]:
35
35
// CHECK-NEXT: [[DIV:%.*]] = sdiv i32 [[X]], [[Y]]
75
75
// REC: [[HANDLER_DIVREM_OVERFLOW]]:
76
76
// REC-NEXT: [[TMP10:%.*]] = zext i32 [[X]] to i64, !nosanitize [[META2]]
77
77
// REC-NEXT: [[TMP11:%.*]] = zext i32 [[Y]] to i64, !nosanitize [[META2]]
78
- // REC-NEXT: tail call void @__ubsan_handle_divrem_overflow(ptr nonnull @[[GLOB1:[0-9]+]], i64 [[TMP10]], i64 [[TMP11]]) #[[ATTR6 :[0-9]+]], !nosanitize [[META2]]
78
+ // REC-NEXT: tail call void @__ubsan_handle_divrem_overflow(ptr nonnull @[[GLOB1:[0-9]+]], i64 [[TMP10]], i64 [[TMP11]]) #[[ATTR8 :[0-9]+]], !nosanitize [[META2]]
79
79
// REC-NEXT: br label %[[CONT]], !nosanitize [[META2]]
80
80
// REC: [[CONT]]:
81
81
// REC-NEXT: [[DIV:%.*]] = sdiv i32 [[X]], [[Y]]
@@ -86,7 +86,7 @@ int div(int x, int y) {
86
86
}
87
87
88
88
// CHECK-LABEL: define dso_local i32 @null(
89
- // CHECK-SAME: ptr noundef readonly captures(address_is_null) [[X:%.*]]) local_unnamed_addr #[[ATTR0 ]] {
89
+ // CHECK-SAME: ptr noundef readonly captures(address_is_null) [[X:%.*]]) local_unnamed_addr #[[ATTR3:[0-9]+ ]] {
90
90
// CHECK-NEXT: [[ENTRY:.*:]]
91
91
// CHECK-NEXT: [[TMP0:%.*]] = icmp eq ptr [[X]], null, !nosanitize [[META2]]
92
92
//
@@ -95,7 +95,7 @@ int div(int x, int y) {
95
95
// CHECK-NEXT: [[DOTNOT1:%.*]] = and i1 [[TMP0]], [[TMP1]]
96
96
// CHECK-NEXT: br i1 [[DOTNOT1]], label %[[HANDLER_TYPE_MISMATCH:.*]], label %[[CONT:.*]], !prof [[PROF4:![0-9]+]], !nosanitize [[META2]]
97
97
// CHECK: [[HANDLER_TYPE_MISMATCH]]:
98
- // CHECK-NEXT: tail call void @__ubsan_handle_type_mismatch_v1_abort(ptr nonnull @[[GLOB2:[0-9]+]], i64 0) #[[ATTR6 ]], !nosanitize [[META2]]
98
+ // CHECK-NEXT: tail call void @__ubsan_handle_type_mismatch_v1_abort(ptr nonnull @[[GLOB2:[0-9]+]], i64 0) #[[ATTR8 ]], !nosanitize [[META2]]
99
99
// CHECK-NEXT: unreachable, !nosanitize [[META2]]
100
100
// CHECK: [[CONT]]:
101
101
// CHECK-NEXT: [[TMP2:%.*]] = load i32, ptr [[X]], align 4, !tbaa [[TBAA5:![0-9]+]]
@@ -116,14 +116,14 @@ int div(int x, int y) {
116
116
// TR-NEXT: ret i32 [[TMP2]]
117
117
//
118
118
// REC-LABEL: define dso_local i32 @null(
119
- // REC-SAME: ptr noundef readonly captures(address_is_null) [[X:%.*]]) local_unnamed_addr #[[ATTR0 ]] {
119
+ // REC-SAME: ptr noundef readonly captures(address_is_null) [[X:%.*]]) local_unnamed_addr #[[ATTR3:[0-9]+ ]] {
120
120
// REC-NEXT: [[ENTRY:.*:]]
121
121
// REC-NEXT: [[TMP0:%.*]] = icmp eq ptr [[X]], null, !nosanitize [[META2]]
122
122
// REC-NEXT: [[TMP1:%.*]] = tail call i1 @llvm.allow.ubsan.check(i8 29), !nosanitize [[META2]]
123
123
// REC-NEXT: [[DOTNOT1:%.*]] = and i1 [[TMP0]], [[TMP1]]
124
124
// REC-NEXT: br i1 [[DOTNOT1]], label %[[HANDLER_TYPE_MISMATCH:.*]], label %[[CONT:.*]], !prof [[PROF4:![0-9]+]], !nosanitize [[META2]]
125
125
// REC: [[HANDLER_TYPE_MISMATCH]]:
126
- // REC-NEXT: tail call void @__ubsan_handle_type_mismatch_v1(ptr nonnull @[[GLOB2:[0-9]+]], i64 0) #[[ATTR6 ]], !nosanitize [[META2]]
126
+ // REC-NEXT: tail call void @__ubsan_handle_type_mismatch_v1(ptr nonnull @[[GLOB2:[0-9]+]], i64 0) #[[ATTR8 ]], !nosanitize [[META2]]
127
127
// REC-NEXT: br label %[[CONT]], !nosanitize [[META2]]
128
128
// REC: [[CONT]]:
129
129
// REC-NEXT: [[TMP2:%.*]] = load i32, ptr [[X]], align 4, !tbaa [[TBAA5:![0-9]+]]
@@ -146,7 +146,7 @@ int null(int* x) {
146
146
// CHECK: [[HANDLER_ADD_OVERFLOW]]:
147
147
// CHECK-NEXT: [[TMP3:%.*]] = zext i32 [[X]] to i64, !nosanitize [[META2]]
148
148
// CHECK-NEXT: [[TMP4:%.*]] = zext i32 [[Y]] to i64, !nosanitize [[META2]]
149
- // CHECK-NEXT: tail call void @__ubsan_handle_add_overflow_abort(ptr nonnull @[[GLOB3:[0-9]+]], i64 [[TMP3]], i64 [[TMP4]]) #[[ATTR6 ]], !nosanitize [[META2]]
149
+ // CHECK-NEXT: tail call void @__ubsan_handle_add_overflow_abort(ptr nonnull @[[GLOB3:[0-9]+]], i64 [[TMP3]], i64 [[TMP4]]) #[[ATTR8 ]], !nosanitize [[META2]]
150
150
// CHECK-NEXT: unreachable, !nosanitize [[META2]]
151
151
// CHECK: [[CONT]]:
152
152
// CHECK-NEXT: [[TMP5:%.*]] = extractvalue { i32, i1 } [[TMP0]], 0, !nosanitize [[META2]]
@@ -178,7 +178,7 @@ int null(int* x) {
178
178
// REC: [[HANDLER_ADD_OVERFLOW]]:
179
179
// REC-NEXT: [[TMP3:%.*]] = zext i32 [[X]] to i64, !nosanitize [[META2]]
180
180
// REC-NEXT: [[TMP4:%.*]] = zext i32 [[Y]] to i64, !nosanitize [[META2]]
181
- // REC-NEXT: tail call void @__ubsan_handle_add_overflow(ptr nonnull @[[GLOB3:[0-9]+]], i64 [[TMP3]], i64 [[TMP4]]) #[[ATTR6 ]], !nosanitize [[META2]]
181
+ // REC-NEXT: tail call void @__ubsan_handle_add_overflow(ptr nonnull @[[GLOB3:[0-9]+]], i64 [[TMP3]], i64 [[TMP4]]) #[[ATTR8 ]], !nosanitize [[META2]]
182
182
// REC-NEXT: br label %[[CONT]], !nosanitize [[META2]]
183
183
// REC: [[CONT]]:
184
184
// REC-NEXT: [[TMP5:%.*]] = extractvalue { i32, i1 } [[TMP0]], 0, !nosanitize [[META2]]
@@ -191,11 +191,11 @@ int overflow(int x, int y) {
191
191
void use (double * );
192
192
193
193
// CHECK-LABEL: define dso_local double @lbounds(
194
- // CHECK-SAME: i32 noundef [[B:%.*]], i32 noundef [[I:%.*]]) local_unnamed_addr #[[ATTR0 ]] {
194
+ // CHECK-SAME: i32 noundef [[B:%.*]], i32 noundef [[I:%.*]]) local_unnamed_addr #[[ATTR5:[0-9]+ ]] {
195
195
// CHECK-NEXT: [[ENTRY:.*:]]
196
196
// CHECK-NEXT: [[TMP0:%.*]] = zext i32 [[B]] to i64
197
197
// CHECK-NEXT: [[VLA:%.*]] = alloca double, i64 [[TMP0]], align 16
198
- // CHECK-NEXT: call void @use(ptr noundef nonnull [[VLA]]) #[[ATTR7 :[0-9]+]]
198
+ // CHECK-NEXT: call void @use(ptr noundef nonnull [[VLA]]) #[[ATTR9 :[0-9]+]]
199
199
// CHECK-NEXT: [[IDXPROM:%.*]] = sext i32 [[I]] to i64
200
200
// CHECK-NEXT: [[TMP1:%.*]] = icmp ule i64 [[TMP0]], [[IDXPROM]]
201
201
//
@@ -208,7 +208,7 @@ void use(double*);
208
208
// CHECK-NEXT: [[TMP5:%.*]] = load double, ptr [[ARRAYIDX]], align 8, !tbaa [[TBAA9:![0-9]+]]
209
209
// CHECK-NEXT: ret double [[TMP5]]
210
210
// CHECK: [[TRAP]]:
211
- // CHECK-NEXT: call void @__ubsan_handle_local_out_of_bounds_abort() #[[ATTR6 ]], !nosanitize [[META2]]
211
+ // CHECK-NEXT: call void @__ubsan_handle_local_out_of_bounds_abort() #[[ATTR8 ]], !nosanitize [[META2]]
212
212
// CHECK-NEXT: unreachable, !nosanitize [[META2]]
213
213
//
214
214
// TR-LABEL: define dso_local double @lbounds(
@@ -231,11 +231,11 @@ void use(double*);
231
231
// TR-NEXT: unreachable, !nosanitize [[META2]]
232
232
//
233
233
// REC-LABEL: define dso_local double @lbounds(
234
- // REC-SAME: i32 noundef [[B:%.*]], i32 noundef [[I:%.*]]) local_unnamed_addr #[[ATTR0 ]] {
234
+ // REC-SAME: i32 noundef [[B:%.*]], i32 noundef [[I:%.*]]) local_unnamed_addr #[[ATTR5:[0-9]+ ]] {
235
235
// REC-NEXT: [[ENTRY:.*:]]
236
236
// REC-NEXT: [[TMP0:%.*]] = zext i32 [[B]] to i64
237
237
// REC-NEXT: [[VLA:%.*]] = alloca double, i64 [[TMP0]], align 16
238
- // REC-NEXT: call void @use(ptr noundef nonnull [[VLA]]) #[[ATTR5 :[0-9]+]]
238
+ // REC-NEXT: call void @use(ptr noundef nonnull [[VLA]]) #[[ATTR7 :[0-9]+]]
239
239
// REC-NEXT: [[IDXPROM:%.*]] = sext i32 [[I]] to i64
240
240
// REC-NEXT: [[TMP1:%.*]] = icmp ule i64 [[TMP0]], [[IDXPROM]]
241
241
// REC-NEXT: [[TMP2:%.*]] = call i1 @llvm.allow.ubsan.check(i8 71), !nosanitize [[META2]]
@@ -246,7 +246,7 @@ void use(double*);
246
246
// REC-NEXT: [[TMP5:%.*]] = load double, ptr [[ARRAYIDX]], align 8, !tbaa [[TBAA9:![0-9]+]]
247
247
// REC-NEXT: ret double [[TMP5]]
248
248
// REC: [[TRAP]]:
249
- // REC-NEXT: call void @__ubsan_handle_local_out_of_bounds() #[[ATTR6 ]], !nosanitize [[META2]]
249
+ // REC-NEXT: call void @__ubsan_handle_local_out_of_bounds() #[[ATTR8 ]], !nosanitize [[META2]]
250
250
// REC-NEXT: br label %[[BB4]], !nosanitize [[META2]]
251
251
//
252
252
double lbounds (int b , int i ) {
0 commit comments