CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
58 lines
1.8 KiB
LLVM
58 lines
1.8 KiB
LLVM
; RUN: opt -S -passes=objc-arc < %s | FileCheck %s
|
|
; rdar://10210274
|
|
|
|
%0 = type opaque
|
|
|
|
declare ptr @llvm.objc.retain(ptr)
|
|
|
|
declare void @llvm.objc.release(ptr)
|
|
|
|
declare ptr @llvm.objc.autoreleaseReturnValue(ptr)
|
|
|
|
; Don't delete the autorelease.
|
|
|
|
; CHECK-LABEL: define ptr @test0(
|
|
; CHECK: @llvm.objc.retain
|
|
; CHECK: .lr.ph:
|
|
; CHECK-NOT: @llvm.objc.r
|
|
; CHECK: @llvm.objc.autoreleaseReturnValue
|
|
; CHECK-NOT: @llvm.objc.
|
|
; CHECK: }
|
|
define ptr @test0(ptr %buffer, i1 %arg) nounwind {
|
|
%1 = tail call ptr @llvm.objc.retain(ptr %buffer) nounwind
|
|
br i1 %arg, label %.lr.ph, label %._crit_edge
|
|
|
|
.lr.ph: ; preds = %.lr.ph, %0
|
|
br i1 false, label %.lr.ph, label %._crit_edge
|
|
|
|
._crit_edge: ; preds = %.lr.ph, %0
|
|
%2 = tail call ptr @llvm.objc.retain(ptr %buffer) nounwind
|
|
tail call void @llvm.objc.release(ptr %buffer) nounwind, !clang.imprecise_release !0
|
|
%3 = tail call ptr @llvm.objc.autoreleaseReturnValue(ptr %buffer) nounwind
|
|
ret ptr %buffer
|
|
}
|
|
|
|
; Do delete the autorelease, even with the retain in a different block.
|
|
|
|
; CHECK-LABEL: define ptr @test1(
|
|
; CHECK-NOT: @objc
|
|
; CHECK: }
|
|
define ptr @test1(i1 %arg) nounwind {
|
|
%buffer = call ptr @foo()
|
|
%1 = tail call ptr @llvm.objc.retain(ptr %buffer) nounwind
|
|
br i1 %arg, label %.lr.ph, label %._crit_edge
|
|
|
|
.lr.ph: ; preds = %.lr.ph, %0
|
|
br i1 false, label %.lr.ph, label %._crit_edge
|
|
|
|
._crit_edge: ; preds = %.lr.ph, %0
|
|
%2 = tail call ptr @llvm.objc.retain(ptr %buffer) nounwind
|
|
tail call void @llvm.objc.release(ptr %buffer) nounwind, !clang.imprecise_release !0
|
|
%3 = tail call ptr @llvm.objc.autoreleaseReturnValue(ptr %buffer) nounwind
|
|
ret ptr %buffer
|
|
}
|
|
|
|
declare ptr @foo()
|
|
|
|
!0 = !{}
|