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
34 lines
1.3 KiB
C++
34 lines
1.3 KiB
C++
// RUN: %clang_cc1 -triple aarch64-linux -fexperimental-pointer-field-protection-abi -fexperimental-pointer-field-protection-tagged -emit-llvm -o - %s | FileCheck %s
|
|
|
|
struct S {
|
|
int* ptr;
|
|
private:
|
|
int private_data;
|
|
}; // Not Standard-layout, mixed access
|
|
|
|
// CHECK-LABEL: load_pointers
|
|
int* load_pointers(S *t) {
|
|
// CHECK: %t.addr = alloca ptr, align 8
|
|
// CHECK: store ptr %t, ptr %t.addr, align 8
|
|
// CHECK: %0 = load ptr, ptr %t.addr, align 8
|
|
// CHECK: %ptr = getelementptr inbounds nuw %struct.S, ptr %0, i32 0, i32 0
|
|
// CHECK: %1 = call ptr @llvm.protected.field.ptr.p0(ptr %ptr, i64 63261, i1 true) [ "deactivation-symbol"(ptr @__pfp_ds__ZTS1S.ptr) ]
|
|
// CHECK: %2 = load ptr, ptr %1, align 8
|
|
// CHECK: ret ptr %2
|
|
return t->ptr;
|
|
}
|
|
|
|
// CHECK-LABEL: store_pointers
|
|
void store_pointers(S* t, int* p) {
|
|
// CHECK: %t.addr = alloca ptr, align 8
|
|
// CHECK: %p.addr = alloca ptr, align 8
|
|
// CHECK: store ptr %t, ptr %t.addr, align 8
|
|
// CHECK: store ptr %p, ptr %p.addr, align 8
|
|
// CHECK: %0 = load ptr, ptr %p.addr, align 8
|
|
// CHECK: %1 = load ptr, ptr %t.addr, align 8
|
|
// CHECK: %ptr = getelementptr inbounds nuw %struct.S, ptr %1, i32 0, i32 0
|
|
// CHECK: %2 = call ptr @llvm.protected.field.ptr.p0(ptr %ptr, i64 63261, i1 true) [ "deactivation-symbol"(ptr @__pfp_ds__ZTS1S.ptr) ]
|
|
// CHECK: store ptr %0, ptr %2, align 8
|
|
t->ptr = p;
|
|
}
|