mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 08:23:21 +01:00
db672f1bc8
Listing all of the attributes for the callee of a call/invoke instruction is way too much and makes the IR unreadable. Use references to attributes instead. llvm-svn: 175877
26 lines
867 B
LLVM
26 lines
867 B
LLVM
; RUN: opt -S -objc-arc-contract < %s | FileCheck %s
|
|
|
|
; CHECK: %call = tail call i32* @qux()
|
|
; CHECK-NEXT: %tcall = bitcast i32* %call to i8*
|
|
; CHECK-NEXT: call void asm sideeffect "mov\09r7, r7\09\09@ marker for objc_retainAutoreleaseReturnValue", ""()
|
|
; CHECK-NEXT: %0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %tcall) [[NUW:#[0-9]+]]
|
|
|
|
define void @foo() {
|
|
entry:
|
|
%call = tail call i32* @qux()
|
|
%tcall = bitcast i32* %call to i8*
|
|
%0 = tail call i8* @objc_retainAutoreleasedReturnValue(i8* %tcall) nounwind
|
|
tail call void @bar(i8* %0)
|
|
ret void
|
|
}
|
|
|
|
declare i32* @qux()
|
|
declare i8* @objc_retainAutoreleasedReturnValue(i8*)
|
|
declare void @bar(i8*)
|
|
|
|
!clang.arc.retainAutoreleasedReturnValueMarker = !{!0}
|
|
|
|
!0 = metadata !{metadata !"mov\09r7, r7\09\09@ marker for objc_retainAutoreleaseReturnValue"}
|
|
|
|
; CHECK: attributes [[NUW]] = { nounwind }
|