Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 82a9ff0

Browse files
committed
FileCheck inline_compatibility
1 parent 149b882 commit 82a9ff0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/mir-opt/inline/inline_compatibility.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// skip-filecheck
21
// Checks that only functions with compatible attributes are inlined.
32
//
43
// only-x86_64
@@ -12,22 +11,30 @@
1211
// EMIT_MIR inline_compatibility.inlined_target_feature.Inline.diff
1312
#[target_feature(enable = "sse2")]
1413
pub unsafe fn inlined_target_feature() {
14+
// CHECK-LABEL: fn inlined_target_feature(
15+
// CHECK: (inlined target_feature)
1516
target_feature();
1617
}
1718

1819
// EMIT_MIR inline_compatibility.not_inlined_target_feature.Inline.diff
1920
pub unsafe fn not_inlined_target_feature() {
21+
// CHECK-LABEL: fn not_inlined_target_feature(
22+
// CHECK-NOT: (inlined target_feature)
2023
target_feature();
2124
}
2225

2326
// EMIT_MIR inline_compatibility.inlined_no_sanitize.Inline.diff
2427
#[no_sanitize(address)]
2528
pub unsafe fn inlined_no_sanitize() {
29+
// CHECK-LABEL: fn inlined_no_sanitize(
30+
// CHECK: (inlined no_sanitize)
2631
no_sanitize();
2732
}
2833

2934
// EMIT_MIR inline_compatibility.not_inlined_no_sanitize.Inline.diff
3035
pub unsafe fn not_inlined_no_sanitize() {
36+
// CHECK-LABEL: fn not_inlined_no_sanitize(
37+
// CHECK-NOT: (inlined no_sanitize)
3138
no_sanitize();
3239
}
3340

@@ -41,6 +48,8 @@ pub unsafe fn no_sanitize() {}
4148

4249
// EMIT_MIR inline_compatibility.not_inlined_c_variadic.Inline.diff
4350
pub unsafe fn not_inlined_c_variadic() {
51+
// CHECK-LABEL: fn not_inlined_c_variadic(
52+
// CHECK-NOT: (inlined sum)
4453
let s = sum(4u32, 4u32, 30u32, 200u32, 1000u32);
4554
}
4655

0 commit comments

Comments
 (0)