File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
llvm/test/Transforms/ObjCARC Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,22 @@ define void @test14(ptr %a, ptr %b) {
234
234
ret void
235
235
}
236
236
237
+ define void @test15 (ptr %x ) {
238
+ ; CHECK-LABEL: define void @test15(
239
+ ; CHECK-SAME: ptr [[X:%.*]]) {
240
+ ; CHECK-NEXT: [[Y:%.*]] = getelementptr inbounds ptr, ptr [[X]], i32 0
241
+ ; CHECK-NEXT: [[V0:%.*]] = call ptr @llvm.objc.retain(ptr [[Y]]) #[[ATTR0:[0-9]+]]
242
+ ; CHECK-NEXT: call void @use_pointer(ptr [[V0]])
243
+ ; CHECK-NEXT: call void @use_pointer(ptr [[V0]])
244
+ ; CHECK-NEXT: ret void
245
+ ;
246
+ %y = getelementptr inbounds ptr , ptr %x , i32 0
247
+ %v0 = call ptr @llvm.objc.retain (ptr %y ) nounwind
248
+ call void @use_pointer (ptr %x )
249
+ call void @use_pointer (ptr %y )
250
+ ret void
251
+ }
252
+
237
253
declare void @llvm.objc.clang.arc.use (...) nounwind
238
254
declare void @llvm.objc.clang.arc.noop.use (...) nounwind
239
255
You can’t perform that action at this time.
0 commit comments