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
40 lines
1.9 KiB
C++
40 lines
1.9 KiB
C++
// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu %s -fclangir -emit-cir -o %t.cir
|
|
// RUN: FileCheck --input-file=%t.cir -check-prefix=CIR %s
|
|
// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu %s -fclangir -emit-llvm -o %t-cir.ll
|
|
// RUN: FileCheck --input-file=%t-cir.ll -check-prefix=LLVM %s
|
|
// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu %s -emit-llvm -o %t.ll
|
|
// RUN: FileCheck --input-file=%t.ll -check-prefix=OGCG %s
|
|
|
|
typedef __typeof__(sizeof(0)) size_t;
|
|
|
|
// Declare the reserved placement operators.
|
|
void *operator new(size_t, void*) throw();
|
|
|
|
struct A { A(); ~A(); };
|
|
|
|
void test_reserved_placement_new(void *p) {
|
|
new (p) A();
|
|
}
|
|
|
|
// CIR-LABEL: cir.func {{.*}} @_Z27test_reserved_placement_newPv(
|
|
// CIR-SAME: %[[ARG0:.*]]: !cir.ptr<!void>
|
|
// CIR: %[[P:.*]] = cir.alloca !cir.ptr<!void>, !cir.ptr<!cir.ptr<!void>>, ["p", init]
|
|
// CIR: cir.store %[[ARG0]], %[[P]] : !cir.ptr<!void>, !cir.ptr<!cir.ptr<!void>>
|
|
// CIR: %[[PTR:.*]] = cir.load{{.*}} %[[P]] : !cir.ptr<!cir.ptr<!void>>, !cir.ptr<!void>
|
|
// CIR: %[[PTR_A:.*]] = cir.cast bitcast %[[PTR]] : !cir.ptr<!void> -> !cir.ptr<!rec_A>
|
|
// CIR: cir.call @_ZN1AC1Ev(%[[PTR_A]]) : (!cir.ptr<!rec_A>{{.*}}) -> ()
|
|
|
|
// LLVM-LABEL: define dso_local void @_Z27test_reserved_placement_newPv(
|
|
// LLVM-SAME: ptr {{.*}} %[[ARG0:.*]]
|
|
// LLVM: %[[P:.*]] = alloca ptr
|
|
// LLVM: store ptr %[[ARG0:.*]], ptr %[[P]]
|
|
// LLVM: %[[PTR:.*]] = load ptr, ptr %[[P]]
|
|
// LLVM: call void @_ZN1AC1Ev(ptr {{.*}} %[[PTR]])
|
|
|
|
// OGCG-LABEL: define dso_local void @_Z27test_reserved_placement_newPv(
|
|
// OGCG-SAME: ptr {{.*}} %[[ARG0:.*]]
|
|
// OGCG: %[[P:.*]] = alloca ptr
|
|
// OGCG: store ptr %[[ARG0:.*]], ptr %[[P]]
|
|
// OGCG: %[[PTR:.*]] = load ptr, ptr %[[P]]
|
|
// OGCG: call void @_ZN1AC1Ev(ptr {{.*}} %[[PTR]])
|