1
- // skip-filecheck
2
1
// Checks that only functions with compatible attributes are inlined.
3
2
//
4
3
// only-x86_64
12
11
// EMIT_MIR inline_compatibility.inlined_target_feature.Inline.diff
13
12
#[ target_feature( enable = "sse2" ) ]
14
13
pub unsafe fn inlined_target_feature ( ) {
14
+ // CHECK-LABEL: fn inlined_target_feature(
15
+ // CHECK: (inlined target_feature)
15
16
target_feature ( ) ;
16
17
}
17
18
18
19
// EMIT_MIR inline_compatibility.not_inlined_target_feature.Inline.diff
19
20
pub unsafe fn not_inlined_target_feature ( ) {
21
+ // CHECK-LABEL: fn not_inlined_target_feature(
22
+ // CHECK-NOT: (inlined target_feature)
20
23
target_feature ( ) ;
21
24
}
22
25
23
26
// EMIT_MIR inline_compatibility.inlined_no_sanitize.Inline.diff
24
27
#[ no_sanitize( address) ]
25
28
pub unsafe fn inlined_no_sanitize ( ) {
29
+ // CHECK-LABEL: fn inlined_no_sanitize(
30
+ // CHECK: (inlined no_sanitize)
26
31
no_sanitize ( ) ;
27
32
}
28
33
29
34
// EMIT_MIR inline_compatibility.not_inlined_no_sanitize.Inline.diff
30
35
pub unsafe fn not_inlined_no_sanitize ( ) {
36
+ // CHECK-LABEL: fn not_inlined_no_sanitize(
37
+ // CHECK-NOT: (inlined no_sanitize)
31
38
no_sanitize ( ) ;
32
39
}
33
40
@@ -41,6 +48,8 @@ pub unsafe fn no_sanitize() {}
41
48
42
49
// EMIT_MIR inline_compatibility.not_inlined_c_variadic.Inline.diff
43
50
pub unsafe fn not_inlined_c_variadic ( ) {
51
+ // CHECK-LABEL: fn not_inlined_c_variadic(
52
+ // CHECK-NOT: (inlined sum)
44
53
let s = sum ( 4u32 , 4u32 , 30u32 , 200u32 , 1000u32 ) ;
45
54
}
46
55
0 commit comments