Files
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

148 lines
3.9 KiB
C++

// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -emit-llvm -fsanitize=alignment %s -o - | FileCheck %s
struct alignas(32) S1 {
int x;
S1();
};
struct alignas(32) S2 {
int x;
};
struct alignas(32) S3 {
int x;
S3(int *p = new int[4]);
};
struct S4 : public S3 {
S4() : S3() {}
};
typedef __attribute__((ext_vector_type(8), aligned(32))) float float32x8_t;
struct S5 {
float32x8_t x;
};
void *operator new (unsigned long, void *p) { return p; }
void *operator new[] (unsigned long, void *p) { return p; }
S1 *func_01() {
// CHECK-LABEL: define {{.*}} @_Z7func_01v
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK: call void @_ZN2S1C1Ev(
// CHECK-NOT: and i64 %{{.*}}, 31
// CHECK: ret ptr
return new S1[20];
}
S2 *func_02() {
// CHECK-LABEL: define {{.*}} @_Z7func_02v
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK: ret ptr
return new S2;
}
S2 *func_03() {
// CHECK-LABEL: define {{.*}} @_Z7func_03v
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK-NOT: and i64 %{{.*}}, 31
// CHECK: ret ptr
return new S2[20];
}
float32x8_t *func_04() {
// CHECK-LABEL: define {{.*}} @_Z7func_04v
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK: ret ptr
return new float32x8_t;
}
float32x8_t *func_05() {
// CHECK-LABEL: define {{.*}} @_Z7func_05v
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK-NOT: and i64 %{{.*}}, 31
// CHECK: ret ptr
return new float32x8_t[20];
}
S3 *func_07() {
// CHECK-LABEL: define {{.*}} @_Z7func_07v
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK: and i64 %{{.*}}, 3, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK: ret ptr
return new S3;
}
S3 *func_08() {
// CHECK-LABEL: define {{.*}} @_Z7func_08v
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK: and i64 %{{.*}}, 3, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK: ret ptr
return new S3[10];
}
S2 *func_10(void *p) {
// CHECK-LABEL: define {{.*}} @_Z7func_10Pv
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK: ret ptr
return new(p) S2;
}
S2 *func_11(void *p) {
// CHECK-LABEL: define {{.*}} @_Z7func_11Pv
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK-NOT: and i64 %{{.*}}, 31, !nosanitize
// CHECK-NOT: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK: ret ptr
return new(p) S2[10];
}
float32x8_t *func_12() {
// CHECK-LABEL: define {{.*}} @_Z7func_12v
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK: ret ptr
return new float32x8_t;
}
float32x8_t *func_13() {
// CHECK-LABEL: define {{.*}} @_Z7func_13v
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK-NOT: and i64 %{{.*}}, 31
// CHECK: ret ptr
return new float32x8_t[20];
}
S4 *func_14() {
// CHECK-LABEL: define {{.*}} @_Z7func_14v
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK-NOT: and i64 %{{.*}}, 31
// CHECK: ret ptr
return new S4;
}
S5 *func_15() {
// CHECK-LABEL: define {{.*}} @_Z7func_15v
// CHECK: and i64 %{{.*}}, 31, !nosanitize
// CHECK: icmp eq i64 %{{.*}}, 0, !nosanitize
// CHECK-NOT: and i64
// CHECK: ret ptr
S5 local = {};
return new S5(local);
}