1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2 ; RUN: llc -mtriple=arm64-apple-macosx10.13.0 -mcpu=apple-m1 < %s | FileCheck %s
4 @.str = external constant [9 x i8]
6 define void @_ZN38SanitizerCommonInterceptors_Scanf_Test8TestBodyEv(ptr %.str.40, ptr %.str.41, ptr %.str.42, ptr %.str.43, ptr %.str.44, ptr %.str.45, ptr nocapture writeonly %.str.47) nounwind {
7 ; CHECK-LABEL: _ZN38SanitizerCommonInterceptors_Scanf_Test8TestBodyEv:
8 ; CHECK: ; %bb.0: ; %entry
9 ; CHECK-NEXT: sub sp, sp, #128
10 ; CHECK-NEXT: stp x28, x27, [sp, #32] ; 16-byte Folded Spill
11 ; CHECK-NEXT: stp x26, x25, [sp, #48] ; 16-byte Folded Spill
12 ; CHECK-NEXT: stp x24, x23, [sp, #64] ; 16-byte Folded Spill
13 ; CHECK-NEXT: stp x22, x21, [sp, #80] ; 16-byte Folded Spill
14 ; CHECK-NEXT: stp x20, x19, [sp, #96] ; 16-byte Folded Spill
15 ; CHECK-NEXT: stp x29, x30, [sp, #112] ; 16-byte Folded Spill
16 ; CHECK-NEXT: mov x24, x6
17 ; CHECK-NEXT: mov x19, x5
18 ; CHECK-NEXT: mov x20, x4
19 ; CHECK-NEXT: mov x21, x3
20 ; CHECK-NEXT: mov x22, x2
21 ; CHECK-NEXT: mov x23, x1
22 ; CHECK-NEXT: mov x25, x0
23 ; CHECK-NEXT: str xzr, [sp]
24 ; CHECK-NEXT: mov x0, #0 ; =0x0
25 ; CHECK-NEXT: mov w1, #1 ; =0x1
26 ; CHECK-NEXT: bl __ZL9testScanfPKcjz
27 ; CHECK-NEXT: mov w28, #4 ; =0x4
28 ; CHECK-NEXT: stp x28, x28, [sp, #8]
29 ; CHECK-NEXT: str x28, [sp]
30 ; CHECK-NEXT: mov x0, #0 ; =0x0
31 ; CHECK-NEXT: mov w1, #0 ; =0x0
32 ; CHECK-NEXT: bl __ZL9testScanfPKcjz
33 ; CHECK-NEXT: stp x28, xzr, [sp]
34 ; CHECK-NEXT: mov x0, #0 ; =0x0
35 ; CHECK-NEXT: mov w1, #0 ; =0x0
36 ; CHECK-NEXT: bl __ZL9testScanfPKcjz
37 ; CHECK-NEXT: mov w27, #8 ; =0x8
38 ; CHECK-NEXT: str x27, [sp]
39 ; CHECK-NEXT: mov x0, #0 ; =0x0
40 ; CHECK-NEXT: mov w1, #0 ; =0x0
41 ; CHECK-NEXT: bl __ZL9testScanfPKcjz
42 ; CHECK-NEXT: mov w26, #1 ; =0x1
43 ; CHECK-NEXT: stp xzr, x26, [sp]
44 ; CHECK-NEXT: mov x0, #0 ; =0x0
45 ; CHECK-NEXT: mov w1, #0 ; =0x0
46 ; CHECK-NEXT: bl __ZL9testScanfPKcjz
47 ; CHECK-NEXT: str x26, [sp]
48 ; CHECK-NEXT: mov x0, #0 ; =0x0
49 ; CHECK-NEXT: mov w1, #0 ; =0x0
50 ; CHECK-NEXT: bl __ZL9testScanfPKcjz
51 ; CHECK-NEXT: str x28, [sp]
53 ; CHECK-NEXT: adrp x26, _.str@GOTPAGE
55 ; CHECK-NEXT: ldr x26, [x26, _.str@GOTPAGEOFF]
56 ; CHECK-NEXT: mov x0, x26
57 ; CHECK-NEXT: mov w1, #0 ; =0x0
58 ; CHECK-NEXT: bl __ZL9testScanfPKcjz
59 ; CHECK-NEXT: str wzr, [x24]
60 ; CHECK-NEXT: str x27, [sp]
61 ; CHECK-NEXT: mov x0, x25
62 ; CHECK-NEXT: mov w1, #0 ; =0x0
63 ; CHECK-NEXT: bl __ZL20testScanfNoGnuMallocPKcjz
64 ; CHECK-NEXT: str x28, [sp]
65 ; CHECK-NEXT: mov x0, x23
66 ; CHECK-NEXT: mov w1, #0 ; =0x0
67 ; CHECK-NEXT: bl __ZL20testScanfNoGnuMallocPKcjz
68 ; CHECK-NEXT: str x28, [sp]
69 ; CHECK-NEXT: mov x0, x22
70 ; CHECK-NEXT: mov w1, #0 ; =0x0
71 ; CHECK-NEXT: bl __ZL20testScanfNoGnuMallocPKcjz
72 ; CHECK-NEXT: str x28, [sp]
73 ; CHECK-NEXT: mov x0, x21
74 ; CHECK-NEXT: mov w1, #0 ; =0x0
75 ; CHECK-NEXT: bl __ZL20testScanfNoGnuMallocPKcjz
76 ; CHECK-NEXT: str x28, [sp]
77 ; CHECK-NEXT: mov x0, x20
78 ; CHECK-NEXT: mov w1, #0 ; =0x0
79 ; CHECK-NEXT: bl __ZL20testScanfNoGnuMallocPKcjz
80 ; CHECK-NEXT: str xzr, [sp]
81 ; CHECK-NEXT: mov x0, x19
82 ; CHECK-NEXT: mov w1, #0 ; =0x0
83 ; CHECK-NEXT: bl __ZL20testScanfNoGnuMallocPKcjz
84 ; CHECK-NEXT: str xzr, [sp]
85 ; CHECK-NEXT: mov x0, x26
86 ; CHECK-NEXT: mov w1, #0 ; =0x0
87 ; CHECK-NEXT: bl __ZL20testScanfNoGnuMallocPKcjz
88 ; CHECK-NEXT: mov w8, #1 ; =0x1
89 ; CHECK-NEXT: stp x8, xzr, [sp, #8]
90 ; CHECK-NEXT: str xzr, [sp]
91 ; CHECK-NEXT: mov x0, #0 ; =0x0
92 ; CHECK-NEXT: mov w1, #0 ; =0x0
93 ; CHECK-NEXT: bl __ZL20testScanfNoGnuMallocPKcjz
94 ; CHECK-NEXT: ldp x29, x30, [sp, #112] ; 16-byte Folded Reload
95 ; CHECK-NEXT: ldp x20, x19, [sp, #96] ; 16-byte Folded Reload
96 ; CHECK-NEXT: ldp x22, x21, [sp, #80] ; 16-byte Folded Reload
97 ; CHECK-NEXT: ldp x24, x23, [sp, #64] ; 16-byte Folded Reload
98 ; CHECK-NEXT: ldp x26, x25, [sp, #48] ; 16-byte Folded Reload
99 ; CHECK-NEXT: ldp x28, x27, [sp, #32] ; 16-byte Folded Reload
100 ; CHECK-NEXT: add sp, sp, #128
102 ; CHECK-NEXT: .loh AdrpLdrGot Lloh0, Lloh1
104 tail call void (ptr, i32, ...) @_ZL9testScanfPKcjz(ptr null, i32 1, i32 0)
105 tail call void (ptr, i32, ...) @_ZL9testScanfPKcjz(ptr null, i32 0, i32 4, i32 4, i32 4)
106 tail call void (ptr, i32, ...) @_ZL9testScanfPKcjz(ptr null, i32 0, i32 4, i32 0)
107 tail call void (ptr, i32, ...) @_ZL9testScanfPKcjz(ptr null, i32 0, i32 8)
108 tail call void (ptr, i32, ...) @_ZL9testScanfPKcjz(ptr null, i32 0, i32 0, i32 1)
109 tail call void (ptr, i32, ...) @_ZL9testScanfPKcjz(ptr null, i32 0, i32 1)
110 tail call void (ptr, i32, ...) @_ZL9testScanfPKcjz(ptr nonnull @.str, i32 0, i32 4)
111 store i32 0, ptr %.str.47, align 4
112 tail call void (ptr, i32, ...) @_ZL20testScanfNoGnuMallocPKcjz(ptr %.str.40, i32 0, i32 8)
113 tail call void (ptr, i32, ...) @_ZL20testScanfNoGnuMallocPKcjz(ptr %.str.41, i32 0, i32 4)
114 tail call void (ptr, i32, ...) @_ZL20testScanfNoGnuMallocPKcjz(ptr %.str.42, i32 0, i32 4)
115 tail call void (ptr, i32, ...) @_ZL20testScanfNoGnuMallocPKcjz(ptr %.str.43, i32 0, i32 4)
116 tail call void (ptr, i32, ...) @_ZL20testScanfNoGnuMallocPKcjz(ptr %.str.44, i32 0, i32 4)
117 tail call void (ptr, i32, ...) @_ZL20testScanfNoGnuMallocPKcjz(ptr %.str.45, i32 0, i32 0)
118 tail call void (ptr, i32, ...) @_ZL20testScanfNoGnuMallocPKcjz(ptr nonnull @.str, i32 0, i32 0)
119 tail call void (ptr, i32, ...) @_ZL20testScanfNoGnuMallocPKcjz(ptr null, i32 0, i32 0, i32 1, i32 0)
123 declare void @_ZL9testScanfPKcjz(ptr, i32, ...) local_unnamed_addr
125 declare void @_ZL20testScanfNoGnuMallocPKcjz(ptr, i32, ...) local_unnamed_addr