@@ -70,6 +70,73 @@ define dso_local void @rv_marker_3() personality ptr @__gxx_personality_v0 {
70
70
; CHECK-NEXT: mov x29, x29
71
71
; CHECK-NEXT: bl _objc_retainAutoreleasedReturnValue
72
72
;
73
+ ; GISEL-LABEL: rv_marker_3:
74
+ ; GISEL: Lfunc_begin0:
75
+ ; GISEL-NEXT: .cfi_startproc
76
+ ; GISEL-NEXT: .cfi_personality 155, ___gxx_personality_v0
77
+ ; GISEL-NEXT: .cfi_lsda 16, Lexception0
78
+ ; GISEL-NEXT: ; %bb.0: ; %entry
79
+ ; GISEL-NEXT: stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
80
+ ; GISEL-NEXT: stp x29, x30, [sp, #16] ; 16-byte Folded Spill
81
+ ; GISEL-NEXT: .cfi_def_cfa_offset 32
82
+ ; GISEL-NEXT: .cfi_offset w30, -8
83
+ ; GISEL-NEXT: .cfi_offset w29, -16
84
+ ; GISEL-NEXT: .cfi_offset w19, -24
85
+ ; GISEL-NEXT: .cfi_offset w20, -32
86
+ ; GISEL-NEXT: bl _foo1
87
+ ; GISEL-NEXT: mov x29, x29
88
+ ; GISEL-NEXT: bl _objc_retainAutoreleasedReturnValue
89
+ ; GISEL-NEXT: mov x19, x0
90
+ ; GISEL-NEXT: Ltmp0:
91
+ ; GISEL-NEXT: bl _objc_object
92
+ ; GISEL-NEXT: Ltmp1:
93
+ ; GISEL-NEXT: ; %bb.1: ; %invoke.cont
94
+ ; GISEL-NEXT: Lloh0:
95
+ ; GISEL-NEXT: adrp x1, _objc_release@GOTPAGE
96
+ ; GISEL-NEXT: mov x0, x19
97
+ ; GISEL-NEXT: Lloh1:
98
+ ; GISEL-NEXT: ldr x1, [x1, _objc_release@GOTPAGEOFF]
99
+ ; GISEL-NEXT: ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
100
+ ; GISEL-NEXT: ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
101
+ ; GISEL-NEXT: br x1
102
+ ; GISEL-NEXT: LBB3_2: ; %lpad
103
+ ; GISEL-NEXT: Ltmp2:
104
+ ; GISEL-NEXT: Lloh2:
105
+ ; GISEL-NEXT: adrp x8, _objc_release@GOTPAGE
106
+ ; GISEL-NEXT: mov x20, x0
107
+ ; GISEL-NEXT: mov x0, x19
108
+ ; GISEL-NEXT: Lloh3:
109
+ ; GISEL-NEXT: ldr x8, [x8, _objc_release@GOTPAGEOFF]
110
+ ; GISEL-NEXT: blr x8
111
+ ; GISEL-NEXT: mov x0, x20
112
+ ; GISEL-NEXT: bl __Unwind_Resume
113
+ ; GISEL-NEXT: .loh AdrpLdrGot Lloh0, Lloh1
114
+ ; GISEL-NEXT: .loh AdrpLdrGot Lloh2, Lloh3
115
+ ; GISEL-NEXT: Lfunc_end0:
116
+ ; GISEL-NEXT: .cfi_endproc
117
+ ; GISEL-NEXT: .section __TEXT,__gcc_except_tab
118
+ ; GISEL-NEXT: .p2align 2, 0x0
119
+ ; GISEL-NEXT: GCC_except_table3:
120
+ ; GISEL-NEXT: Lexception0:
121
+ ; GISEL-NEXT: .byte 255 ; @LPStart Encoding = omit
122
+ ; GISEL-NEXT: .byte 255 ; @TType Encoding = omit
123
+ ; GISEL-NEXT: .byte 1 ; Call site Encoding = uleb128
124
+ ; GISEL-NEXT: .uleb128 Lcst_end0-Lcst_begin0
125
+ ; GISEL-NEXT: Lcst_begin0:
126
+ ; GISEL-NEXT: .uleb128 Lfunc_begin0-Lfunc_begin0 ; >> Call Site 1 <<
127
+ ; GISEL-NEXT: .uleb128 Ltmp0-Lfunc_begin0 ; Call between Lfunc_begin0 and Ltmp0
128
+ ; GISEL-NEXT: .byte 0 ; has no landing pad
129
+ ; GISEL-NEXT: .byte 0 ; On action: cleanup
130
+ ; GISEL-NEXT: .uleb128 Ltmp0-Lfunc_begin0 ; >> Call Site 2 <<
131
+ ; GISEL-NEXT: .uleb128 Ltmp1-Ltmp0 ; Call between Ltmp0 and Ltmp1
132
+ ; GISEL-NEXT: .uleb128 Ltmp2-Lfunc_begin0 ; jumps to Ltmp2
133
+ ; GISEL-NEXT: .byte 0 ; On action: cleanup
134
+ ; GISEL-NEXT: .uleb128 Ltmp1-Lfunc_begin0 ; >> Call Site 3 <<
135
+ ; GISEL-NEXT: .uleb128 Lfunc_end0-Ltmp1 ; Call between Ltmp1 and Lfunc_end0
136
+ ; GISEL-NEXT: .byte 0 ; has no landing pad
137
+ ; GISEL-NEXT: .byte 0 ; On action: cleanup
138
+ ; GISEL-NEXT: Lcst_end0:
139
+ ; GISEL-NEXT: .p2align 2, 0x0
73
140
entry:
74
141
%call = call ptr @foo1 () [ "clang.arc.attachedcall" (ptr @objc_retainAutoreleasedReturnValue ) ]
75
142
invoke void @objc_object (ptr %call ) #5
@@ -94,6 +161,88 @@ define dso_local void @rv_marker_4() personality ptr @__gxx_personality_v0 {
94
161
; CHECK-NEXT: bl _objc_retainAutoreleasedReturnValue
95
162
; CHECK-NEXT: Ltmp4:
96
163
;
164
+ ; GISEL-LABEL: rv_marker_4:
165
+ ; GISEL: Lfunc_begin1:
166
+ ; GISEL-NEXT: .cfi_startproc
167
+ ; GISEL-NEXT: .cfi_personality 155, ___gxx_personality_v0
168
+ ; GISEL-NEXT: .cfi_lsda 16, Lexception1
169
+ ; GISEL-NEXT: ; %bb.0: ; %entry
170
+ ; GISEL-NEXT: sub sp, sp, #48
171
+ ; GISEL-NEXT: stp x20, x19, [sp, #16] ; 16-byte Folded Spill
172
+ ; GISEL-NEXT: stp x29, x30, [sp, #32] ; 16-byte Folded Spill
173
+ ; GISEL-NEXT: .cfi_def_cfa_offset 48
174
+ ; GISEL-NEXT: .cfi_offset w30, -8
175
+ ; GISEL-NEXT: .cfi_offset w29, -16
176
+ ; GISEL-NEXT: .cfi_offset w19, -24
177
+ ; GISEL-NEXT: .cfi_offset w20, -32
178
+ ; GISEL-NEXT: Ltmp3:
179
+ ; GISEL-NEXT: bl _foo1
180
+ ; GISEL-NEXT: mov x29, x29
181
+ ; GISEL-NEXT: bl _objc_retainAutoreleasedReturnValue
182
+ ; GISEL-NEXT: Ltmp4:
183
+ ; GISEL-NEXT: ; %bb.1: ; %invoke.cont
184
+ ; GISEL-NEXT: Ltmp6:
185
+ ; GISEL-NEXT: mov x19, x0
186
+ ; GISEL-NEXT: bl _objc_object
187
+ ; GISEL-NEXT: Ltmp7:
188
+ ; GISEL-NEXT: ; %bb.2: ; %invoke.cont2
189
+ ; GISEL-NEXT: Lloh4:
190
+ ; GISEL-NEXT: adrp x8, _objc_release@GOTPAGE
191
+ ; GISEL-NEXT: mov x0, x19
192
+ ; GISEL-NEXT: Lloh5:
193
+ ; GISEL-NEXT: ldr x8, [x8, _objc_release@GOTPAGEOFF]
194
+ ; GISEL-NEXT: blr x8
195
+ ; GISEL-NEXT: add x0, sp, #15
196
+ ; GISEL-NEXT: bl __ZN1SD1Ev
197
+ ; GISEL-NEXT: ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
198
+ ; GISEL-NEXT: ldp x20, x19, [sp, #16] ; 16-byte Folded Reload
199
+ ; GISEL-NEXT: add sp, sp, #48
200
+ ; GISEL-NEXT: ret
201
+ ; GISEL-NEXT: LBB4_3: ; %lpad1
202
+ ; GISEL-NEXT: Ltmp8:
203
+ ; GISEL-NEXT: Lloh6:
204
+ ; GISEL-NEXT: adrp x8, _objc_release@GOTPAGE
205
+ ; GISEL-NEXT: mov x20, x0
206
+ ; GISEL-NEXT: mov x0, x19
207
+ ; GISEL-NEXT: Lloh7:
208
+ ; GISEL-NEXT: ldr x8, [x8, _objc_release@GOTPAGEOFF]
209
+ ; GISEL-NEXT: blr x8
210
+ ; GISEL-NEXT: b LBB4_5
211
+ ; GISEL-NEXT: LBB4_4: ; %lpad
212
+ ; GISEL-NEXT: Ltmp5:
213
+ ; GISEL-NEXT: mov x20, x0
214
+ ; GISEL-NEXT: LBB4_5: ; %ehcleanup
215
+ ; GISEL-NEXT: add x0, sp, #15
216
+ ; GISEL-NEXT: bl __ZN1SD1Ev
217
+ ; GISEL-NEXT: mov x0, x20
218
+ ; GISEL-NEXT: bl __Unwind_Resume
219
+ ; GISEL-NEXT: .loh AdrpLdrGot Lloh4, Lloh5
220
+ ; GISEL-NEXT: .loh AdrpLdrGot Lloh6, Lloh7
221
+ ; GISEL-NEXT: Lfunc_end1:
222
+ ; GISEL-NEXT: .cfi_endproc
223
+ ; GISEL-NEXT: .section __TEXT,__gcc_except_tab
224
+ ; GISEL-NEXT: .p2align 2, 0x0
225
+ ; GISEL-NEXT: GCC_except_table4:
226
+ ; GISEL-NEXT: Lexception1:
227
+ ; GISEL-NEXT: .byte 255 ; @LPStart Encoding = omit
228
+ ; GISEL-NEXT: .byte 255 ; @TType Encoding = omit
229
+ ; GISEL-NEXT: .byte 1 ; Call site Encoding = uleb128
230
+ ; GISEL-NEXT: .uleb128 Lcst_end1-Lcst_begin1
231
+ ; GISEL-NEXT: Lcst_begin1:
232
+ ; GISEL-NEXT: .uleb128 Ltmp3-Lfunc_begin1 ; >> Call Site 1 <<
233
+ ; GISEL-NEXT: .uleb128 Ltmp4-Ltmp3 ; Call between Ltmp3 and Ltmp4
234
+ ; GISEL-NEXT: .uleb128 Ltmp5-Lfunc_begin1 ; jumps to Ltmp5
235
+ ; GISEL-NEXT: .byte 0 ; On action: cleanup
236
+ ; GISEL-NEXT: .uleb128 Ltmp6-Lfunc_begin1 ; >> Call Site 2 <<
237
+ ; GISEL-NEXT: .uleb128 Ltmp7-Ltmp6 ; Call between Ltmp6 and Ltmp7
238
+ ; GISEL-NEXT: .uleb128 Ltmp8-Lfunc_begin1 ; jumps to Ltmp8
239
+ ; GISEL-NEXT: .byte 0 ; On action: cleanup
240
+ ; GISEL-NEXT: .uleb128 Ltmp7-Lfunc_begin1 ; >> Call Site 3 <<
241
+ ; GISEL-NEXT: .uleb128 Lfunc_end1-Ltmp7 ; Call between Ltmp7 and Lfunc_end1
242
+ ; GISEL-NEXT: .byte 0 ; has no landing pad
243
+ ; GISEL-NEXT: .byte 0 ; On action: cleanup
244
+ ; GISEL-NEXT: Lcst_end1:
245
+ ; GISEL-NEXT: .p2align 2, 0x0
97
246
entry:
98
247
%s = alloca %struct.S , align 1
99
248
call void @llvm.lifetime.start.p0 (i64 1 , ptr nonnull %s ) #2
@@ -129,11 +278,53 @@ ehcleanup: ; preds = %lpad1, %lpad
129
278
}
130
279
131
280
define dso_local ptr @rv_marker_5_indirect_call () {
132
- ; CHECK-LABEL: _rv_marker_5_indirect_call:
133
- ; CHECK: ldr [[ADDR:x[0-9]+]], [
134
- ; CHECK-NEXT: blr [[ADDR]]
135
- ; CHECK-NEXT: mov x29, x29
136
- ; CHECK-NEXT: bl _objc_retainAutoreleasedReturnValue
281
+ ; SELDAG-LABEL: rv_marker_5_indirect_call:
282
+ ; SELDAG: ; %bb.0: ; %entry
283
+ ; SELDAG-NEXT: stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
284
+ ; SELDAG-NEXT: stp x29, x30, [sp, #16] ; 16-byte Folded Spill
285
+ ; SELDAG-NEXT: .cfi_def_cfa_offset 32
286
+ ; SELDAG-NEXT: .cfi_offset w30, -8
287
+ ; SELDAG-NEXT: .cfi_offset w29, -16
288
+ ; SELDAG-NEXT: .cfi_offset w19, -24
289
+ ; SELDAG-NEXT: .cfi_offset w20, -32
290
+ ; SELDAG-NEXT: Lloh0:
291
+ ; SELDAG-NEXT: adrp x8, _fptr@PAGE
292
+ ; SELDAG-NEXT: Lloh1:
293
+ ; SELDAG-NEXT: ldr x8, [x8, _fptr@PAGEOFF]
294
+ ; SELDAG-NEXT: blr x8
295
+ ; SELDAG-NEXT: mov x29, x29
296
+ ; SELDAG-NEXT: bl _objc_retainAutoreleasedReturnValue
297
+ ; SELDAG-NEXT: mov x19, x0
298
+ ; SELDAG-NEXT: bl _foo2
299
+ ; SELDAG-NEXT: ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
300
+ ; SELDAG-NEXT: mov x0, x19
301
+ ; SELDAG-NEXT: ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
302
+ ; SELDAG-NEXT: ret
303
+ ; SELDAG-NEXT: .loh AdrpLdr Lloh0, Lloh1
304
+ ;
305
+ ; GISEL-LABEL: rv_marker_5_indirect_call:
306
+ ; GISEL: ; %bb.0: ; %entry
307
+ ; GISEL-NEXT: stp x20, x19, [sp, #-32]! ; 16-byte Folded Spill
308
+ ; GISEL-NEXT: stp x29, x30, [sp, #16] ; 16-byte Folded Spill
309
+ ; GISEL-NEXT: .cfi_def_cfa_offset 32
310
+ ; GISEL-NEXT: .cfi_offset w30, -8
311
+ ; GISEL-NEXT: .cfi_offset w29, -16
312
+ ; GISEL-NEXT: .cfi_offset w19, -24
313
+ ; GISEL-NEXT: .cfi_offset w20, -32
314
+ ; GISEL-NEXT: Lloh8:
315
+ ; GISEL-NEXT: adrp x8, _fptr@PAGE
316
+ ; GISEL-NEXT: Lloh9:
317
+ ; GISEL-NEXT: ldr x8, [x8, _fptr@PAGEOFF]
318
+ ; GISEL-NEXT: blr x8
319
+ ; GISEL-NEXT: mov x29, x29
320
+ ; GISEL-NEXT: bl _objc_retainAutoreleasedReturnValue
321
+ ; GISEL-NEXT: mov x19, x0
322
+ ; GISEL-NEXT: bl _foo2
323
+ ; GISEL-NEXT: ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
324
+ ; GISEL-NEXT: mov x0, x19
325
+ ; GISEL-NEXT: ldp x20, x19, [sp], #32 ; 16-byte Folded Reload
326
+ ; GISEL-NEXT: ret
327
+ ; GISEL-NEXT: .loh AdrpLdr Lloh8, Lloh9
137
328
entry:
138
329
%0 = load ptr , ptr @fptr , align 8
139
330
%call = call ptr %0 () [ "clang.arc.attachedcall" (ptr @objc_retainAutoreleasedReturnValue ) ]
0 commit comments