Home | History | Annotate | Download | only in ObjCARC
      1 ; RUN: opt -S -objc-arc-contract < %s | FileCheck %s
      2 
      3 ; CHECK:      %call = tail call i32* @qux()
      4 ; CHECK-NEXT: %tcall = bitcast i32* %call to i8*
      5 ; CHECK-NEXT: call void asm sideeffect "mov\09r7, r7\09\09@ marker for objc_retainAutoreleaseReturnValue", ""()
      6 ; CHECK-NEXT: %0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %tcall) nounwind
      7 
      8 define void @foo() {
      9 entry:
     10   %call = tail call i32* @qux()
     11   %tcall = bitcast i32* %call to i8*
     12   %0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %tcall) nounwind
     13   tail call void @bar(i8* %0)
     14   ret void
     15 }
     16 
     17 declare i32* @qux()
     18 declare i8* @objc_retainAutoreleasedReturnValue(i8*)
     19 declare void @bar(i8*)
     20 
     21 !clang.arc.retainAutoreleasedReturnValueMarker = !{!0}
     22 
     23 !0 = metadata !{metadata !"mov\09r7, r7\09\09@ marker for objc_retainAutoreleaseReturnValue"}
     24