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
65 lines
2.3 KiB
C++
65 lines
2.3 KiB
C++
// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions %s -gno-column-info -debug-info-kind=line-tables-only -emit-llvm -o - \
|
|
// RUN: | FileCheck %s
|
|
// REQUIRES: goodKeys
|
|
|
|
// XFAIL: *
|
|
|
|
// XFAIL: *
|
|
|
|
// g::h and i can be memcpy'd, check the assignment gets Key Instructions metadata.
|
|
|
|
struct e {
|
|
e(e &);
|
|
e& operator=(const e&);
|
|
};
|
|
|
|
struct g {
|
|
e f;
|
|
int h;
|
|
int i;
|
|
};
|
|
|
|
// Copy assignment operator.
|
|
// CHECK: define{{.*}}ptr @_ZN1gaSERKS_
|
|
// CHECK-NEXT: entry:
|
|
// CHECK-NEXT: %this.addr = alloca ptr, align 8
|
|
// CHECK-NEXT: %.addr = alloca ptr, align 8
|
|
// CHECK-NEXT: store ptr %this, ptr %this.addr, align 8
|
|
// CHECK-NEXT: store ptr %0, ptr %.addr, align 8
|
|
// CHECK-NEXT: %this1 = load ptr, ptr %this.addr, align 8
|
|
// CHECK-NEXT: %1 = load ptr, ptr %.addr, align 8
|
|
// CHECK-NEXT: %call = call {{.*}}ptr @_ZN1eaSERKS_(ptr {{.*}}%this1, ptr {{.*}}%1)
|
|
// CHECK-NEXT: %h = getelementptr inbounds nuw %struct.g, ptr %this1, i32 0, i32 1
|
|
// CHECK-NEXT: %2 = load ptr, ptr %.addr, align 8
|
|
// CHECK-NEXT: %h2 = getelementptr inbounds nuw %struct.g, ptr %2, i32 0, i32 1
|
|
// CHECK-NEXT: call void @llvm.memcpy{{.*}}(ptr align 4 %h, ptr align 4 %h2, i64 8, i1 false), !dbg [[S1_G1R1:!.*]]
|
|
// CHECK-NEXT: ret ptr %this1, !dbg
|
|
|
|
// Copy ctor.
|
|
// CHECK: define{{.*}}void @_ZN1gC2ERS_
|
|
// CHECK-NEXT: entry:
|
|
// CHECK-NEXT: %this.addr = alloca ptr, align 8
|
|
// CHECK-NEXT: %.addr = alloca ptr, align 8
|
|
// CHECK-NEXT: store ptr %this, ptr %this.addr, align 8
|
|
// CHECK-NEXT: store ptr %0, ptr %.addr, align 8
|
|
// CHECK-NEXT: %this1 = load ptr, ptr %this.addr, align 8
|
|
// CHECK-NEXT: %1 = load ptr, ptr %.addr, align 8
|
|
// CHECK-NEXT: call void @_ZN1eC1ERS_
|
|
// CHECK-NEXT: %h = getelementptr inbounds nuw %struct.g, ptr %this1, i32 0, i32 1
|
|
// CHECK-NEXT: %2 = load ptr, ptr %.addr, align 8
|
|
// CHECK-NEXT: %h2 = getelementptr inbounds nuw %struct.g, ptr %2, i32 0, i32 1
|
|
// CHECK-NEXT: call void @llvm.memcpy{{.*}}(ptr align 4 %h, ptr align 4 %h2, i64 8, i1 false), !dbg [[S2_G1R1:!.*]]
|
|
// CHECK-NEXT: ret void, !dbg
|
|
|
|
// CHECK: [[S1:!.*]] = distinct !DISubprogram(name: "operator=",
|
|
// CHECK: [[S1_G1R1]] = !DILocation(line: 11, scope: [[S1]], atomGroup: 1, atomRank: 1)
|
|
|
|
// CHECK: [[S2:!.*]] = distinct !DISubprogram(name: "g",
|
|
// CHECK: [[S2_G1R1]] = !DILocation(line: 11, scope: [[S2]], atomGroup: 1, atomRank: 1)
|
|
|
|
[[gnu::nodebug]]
|
|
void fun(g *x) {
|
|
g y = g(*x);
|
|
y = *x;
|
|
}
|