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
64 lines
1.8 KiB
Objective-C
64 lines
1.8 KiB
Objective-C
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-runtime-has-weak -fblocks -fobjc-arc -o - %s | FileCheck %s
|
|
|
|
// A test to ensure that we generate fused calls at -O0.
|
|
|
|
@class Test0;
|
|
Test0 *test0(void) {
|
|
extern Test0 *test0_helper;
|
|
return test0_helper;
|
|
|
|
// CHECK: [[LD:%.*]] = load ptr, ptr @test0_helper
|
|
// CHECK-NEXT: [[T1:%.*]] = tail call ptr @llvm.objc.retainAutoreleaseReturnValue(ptr [[LD]])
|
|
// CHECK-NEXT: ret ptr [[T1]]
|
|
}
|
|
|
|
id test1(void) {
|
|
extern id test1_helper;
|
|
return test1_helper;
|
|
|
|
// CHECK: [[LD:%.*]] = load ptr, ptr @test1_helper
|
|
// CHECK-NEXT: [[T0:%.*]] = tail call ptr @llvm.objc.retainAutoreleaseReturnValue(ptr [[LD]])
|
|
// CHECK-NEXT: ret ptr [[T0]]
|
|
}
|
|
|
|
void test2(void) {
|
|
// CHECK: [[X:%.*]] = alloca ptr
|
|
// CHECK-NEXT: store ptr null, ptr [[X]]
|
|
// CHECK-NEXT: call void @llvm.objc.destroyWeak(ptr [[X]])
|
|
// CHECK-NEXT: ret void
|
|
__weak id x;
|
|
}
|
|
|
|
id test3(void) {
|
|
extern id test3_helper(void);
|
|
// CHECK: [[T0:%.*]] = call ptr @test3_helper()
|
|
// CHECK-NEXT: ret ptr [[T0]]
|
|
return test3_helper();
|
|
}
|
|
|
|
@interface Test4 { id x; } @end
|
|
@interface Test4_sub : Test4 { id y; } @end
|
|
Test4 *test4(void) {
|
|
extern Test4_sub *test4_helper(void);
|
|
// CHECK: [[T0:%.*]] = call ptr @test4_helper()
|
|
// CHECK-NEXT: ret ptr [[T0]]
|
|
return test4_helper();
|
|
}
|
|
|
|
@class Test5;
|
|
void test5(void) {
|
|
Test5 *x, *y;
|
|
if ((x = y))
|
|
y = 0;
|
|
|
|
// CHECK-LABEL: define{{.*}} void @test5()
|
|
// CHECK: [[X:%.*]] = alloca ptr,
|
|
// CHECK-NEXT: [[Y:%.*]] = alloca ptr,
|
|
// CHECK-NEXT: store ptr null, ptr [[X]],
|
|
// CHECK-NEXT: store ptr null, ptr [[Y]],
|
|
// CHECK-NEXT: [[T0:%.*]] = load ptr, ptr [[Y]],
|
|
// CHECK-NEXT: call void @llvm.objc.storeStrong(ptr [[X]], ptr [[T0]])
|
|
// CHECK-NEXT: [[T3:%.*]] = icmp ne ptr [[T0]], null
|
|
// CHECK-NEXT: br i1 [[T3]],
|
|
}
|