1 ; RUN: opt -S -objc-arc-contract < %s | FileCheck %s
3 ; CHECK: define void @foo() {
4 ; CHECK: %call = tail call i32* @qux()
5 ; CHECK-NEXT: %tcall = bitcast i32* %call to i8*
6 ; CHECK-NEXT: call void asm sideeffect "mov\09r7, r7\09\09@ marker for objc_retainAutoreleaseReturnValue", ""()
7 ; CHECK-NEXT: %0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %tcall) [[NUW:#[0-9]+]]
12 %call = tail call i32* @qux()
13 %tcall = bitcast i32* %call to i8*
14 %0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %tcall) nounwind
15 tail call void @bar(i8* %0)
20 declare i8* @objc_retainAutoreleasedReturnValue(i8*)
21 declare void @bar(i8*)
23 !clang.arc.retainAutoreleasedReturnValueMarker = !{!0}
25 !0 = !{!"mov\09r7, r7\09\09@ marker for objc_retainAutoreleaseReturnValue"}
27 ; CHECK: attributes [[NUW]] = { nounwind }