1 ; Test that nullary clang.arc.attachedcall operand bundles are "upgraded".
3 ; RUN: llvm-dis %s.bc -o - | FileCheck %s
4 ; RUN: verify-uselistorder %s.bc
6 define i8* @invalid() {
7 ; CHECK-LABEL: define ptr @invalid() {
8 ; CHECK-NEXT: %tmp0 = call ptr @foo(){{$}}
9 ; CHECK-NEXT: ret ptr %tmp0
10 %tmp0 = call i8* @foo() [ "clang.arc.attachedcall"() ]
15 ; CHECK-LABEL: define ptr @valid() {
16 ; CHECK-NEXT: %tmp0 = call ptr @foo() [ "clang.arc.attachedcall"(ptr @llvm.objc.retainAutoreleasedReturnValue) ]
17 ; CHECK-NEXT: ret ptr %tmp0
18 %tmp0 = call i8* @foo() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ]
23 declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*)