1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=ipsccp -S | FileCheck %s
3 ; Return value can't be zapped if there is a call that has operand bundle
4 ; "clang.arc.attachedcall".
6 @g0 = global i8 zeroinitializer, align 1
8 define internal ptr @foo() {
10 ; CHECK-NEXT: ret ptr @g0
17 ; CHECK-NEXT: [[R:%.*]] = call ptr @foo() [ "clang.arc.attachedcall"(ptr @llvm.objc.unsafeClaimAutoreleasedReturnValue) ]
18 ; CHECK-NEXT: call void (...) @llvm.objc.clang.arc.noop.use(ptr [[R]])
19 ; CHECK-NEXT: ret void
21 %r = call ptr @foo() [ "clang.arc.attachedcall"(ptr @llvm.objc.unsafeClaimAutoreleasedReturnValue) ]
22 call void (...) @llvm.objc.clang.arc.noop.use(ptr %r)
26 declare ptr @llvm.objc.unsafeClaimAutoreleasedReturnValue(ptr)
27 declare void @llvm.objc.clang.arc.noop.use(...)