20
20
#[ no_mangle]
21
21
#[ naked]
22
22
fn naked_empty ( ) {
23
- // CHECK: ret void
23
+ // CHECK-NEXT: {{.+}}:
24
+ // CHECK-NEXT: ret void
24
25
}
25
26
26
27
// CHECK: Function Attrs: naked uwtable
27
28
#[ no_mangle]
28
29
#[ naked]
29
30
// CHECK-NEXT: define internal void @naked_with_args(i{{[0-9]+}})
30
31
fn naked_with_args ( a : isize ) {
31
- // CHECK: %a = alloca i{{[0-9] +}}
32
- // CHECK: ret void
32
+ // CHECK-NEXT: {{. +}}:
33
+ // CHECK-NEXT: %a = alloca i{{[0-9]+}}
33
34
& a; // keep variable in an alloca
35
+ // CHECK: ret void
34
36
}
35
37
36
38
// CHECK: Function Attrs: naked uwtable
37
39
// CHECK-NEXT: define internal i{{[0-9]+}} @naked_with_return()
38
40
#[ no_mangle]
39
41
#[ naked]
40
42
fn naked_with_return ( ) -> isize {
41
- // CHECK: ret i{{[0-9]+}} 0
43
+ // CHECK-NEXT: {{.+}}:
44
+ // CHECK-NEXT: ret i{{[0-9]+}} 0
42
45
0
43
46
}
44
47
@@ -47,9 +50,10 @@ fn naked_with_return() -> isize {
47
50
#[ no_mangle]
48
51
#[ naked]
49
52
fn naked_with_args_and_return ( a : isize ) -> isize {
50
- // CHECK: %a = alloca i{{[0-9] +}}
51
- // CHECK: ret i{{[0-9]+}} % {{[0-9]+}}
53
+ // CHECK-NEXT: {{. +}}:
54
+ // CHECK-NEXT: %a = alloca i {{[0-9]+}}
52
55
& a; // keep variable in an alloca
56
+ // CHECK: ret i{{[0-9]+}} %{{[0-9]+}}
53
57
a
54
58
}
55
59
@@ -58,14 +62,37 @@ fn naked_with_args_and_return(a: isize) -> isize {
58
62
#[ no_mangle]
59
63
#[ naked]
60
64
fn naked_recursive ( ) {
61
- // CHECK: call void @naked_empty()
65
+ // CHECK-NEXT: {{.+}}:
66
+ // CHECK-NEXT: call void @naked_empty()
67
+
68
+ // FIXME(#39685) Avoid one block per call.
69
+ // CHECK-NEXT: br label %bb1
70
+ // CHECK: bb1:
71
+
62
72
naked_empty ( ) ;
63
- // CHECK: %{{[0-9]+}} = call i{{[0-9]+}} @naked_with_return()
73
+
74
+ // CHECK-NEXT: %{{[0-9]+}} = call i{{[0-9]+}} @naked_with_return()
75
+
76
+ // FIXME(#39685) Avoid one block per call.
77
+ // CHECK-NEXT: br label %bb2
78
+ // CHECK: bb2:
79
+
80
+ // CHECK-NEXT: %{{[0-9]+}} = call i{{[0-9]+}} @naked_with_args_and_return(i{{[0-9]+}} %{{[0-9]+}})
81
+
82
+ // FIXME(#39685) Avoid one block per call.
83
+ // CHECK-NEXT: br label %bb3
84
+ // CHECK: bb3:
85
+
86
+ // CHECK-NEXT: call void @naked_with_args(i{{[0-9]+}} %{{[0-9]+}})
87
+
88
+ // FIXME(#39685) Avoid one block per call.
89
+ // CHECK-NEXT: br label %bb4
90
+ // CHECK: bb4:
91
+
64
92
naked_with_args (
65
- // CHECK: %{{[0-9]+}} = call i{{[0-9]+}} @naked_with_args_and_return(i{{[0-9]+}} %{{[0-9]+}})
66
93
naked_with_args_and_return (
67
- // CHECK: call void @naked_with_args(i{{[0-9]+}} %{{[0-9]+}})
68
94
naked_with_return ( )
69
95
)
70
96
) ;
97
+ // CHECK-NEXT: ret void
71
98
}
0 commit comments