1 ; RUN: opt -objc-arc-contract -S < %s | FileCheck %s
2 ; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s
4 ; CHECK-LABEL: define void @test0() {
5 ; CHECK: %[[CALL:.*]] = notail call i8* @foo() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ]
9 %call1 = call i8* @foo() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ]
13 ; CHECK-LABEL: define void @test1() {
14 ; CHECK: %[[CALL:.*]] = notail call i8* @foo() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.unsafeClaimAutoreleasedReturnValue) ]
15 ; CHECK-NEXT: ret void
17 define void @test1() {
18 %call1 = call i8* @foo() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.unsafeClaimAutoreleasedReturnValue) ]
23 declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)
24 declare i8* @llvm.objc.unsafeClaimAutoreleasedReturnValue(i8*)