Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/ObjCARC/pr138961-regression.ll
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

43 lines
1.8 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
; RUN: opt -S -passes=objc-arc < %s | FileCheck %s
target triple = "x86_64-apple-macosx11.0.0"
declare ptr @llvm.objc.retain(ptr returned) #0
declare void @llvm.objc.release(ptr) #0
declare ptr @foo(ptr)
define i1 @_ZN8GrMtlGpu20readOrTransferPixelsEP9GrSurface7SkIRect11GrColorTypePU19objcproto9MTLBuffer11objc_objectmmm(ptr %this) #1 {
; CHECK-LABEL: define i1 @_ZN8GrMtlGpu20readOrTransferPixelsEP9GrSurface7SkIRect11GrColorTypePU19objcproto9MTLBuffer11objc_objectmmm(
; CHECK-SAME: ptr [[THIS:%.*]]) #[[ATTR1:[0-9]+]] {
; CHECK-NEXT: [[ENTRY:.*]]:
; CHECK-NEXT: [[RETAIN:%.*]] = tail call ptr @llvm.objc.retain(ptr [[THIS]]) #[[ATTR0:[0-9]+]]
; CHECK-NEXT: br i1 false, label %[[CLEANUP66:.*]], label %[[IF_END30:.*]]
; CHECK: [[IF_END30]]:
; CHECK-NEXT: [[LD_PTR:%.*]] = load ptr, ptr [[THIS]], align 8
; CHECK-NEXT: call void @foo(ptr [[LD_PTR]])
; CHECK-NEXT: br label %[[CLEANUP66]]
; CHECK: [[CLEANUP66]]:
; CHECK-NEXT: [[MTLTEXTURE_1103:%.*]] = phi ptr [ null, %[[ENTRY]] ], [ [[THIS]], %[[IF_END30]] ]
; CHECK-NEXT: tail call void @llvm.objc.release(ptr [[MTLTEXTURE_1103]]) #[[ATTR0]]
; CHECK-NEXT: ret i1 false
;
entry:
%retain = tail call ptr @llvm.objc.retain(ptr %this)
br i1 false, label %cleanup66, label %if.end30
if.end30: ; preds = %entry
%ld.ptr = load ptr, ptr %this, align 8
call void @foo(ptr %ld.ptr)
br label %cleanup66
cleanup66: ; preds = %if.end30, %entry
%mtlTexture.1103 = phi ptr [ null, %entry ], [ %this, %if.end30 ]
tail call void @llvm.objc.release(ptr %mtlTexture.1103)
ret i1 false
}
attributes #0 = { nounwind }
attributes #1 = { null_pointer_is_valid }