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
88 lines
2.6 KiB
C
88 lines
2.6 KiB
C
// RUN: %clang_cc1 -triple i386-pc-win32 -fms-extensions -emit-llvm -fms-volatile -o - < %s | FileCheck %s
|
|
struct foo {
|
|
volatile int x;
|
|
};
|
|
struct bar {
|
|
int x;
|
|
};
|
|
typedef _Complex float __declspec(align(8)) baz;
|
|
|
|
#pragma pack(push)
|
|
#pragma pack(1)
|
|
struct qux {
|
|
volatile int f;
|
|
};
|
|
#pragma pack(pop)
|
|
|
|
void test1(struct foo *p, struct foo *q) {
|
|
*p = *q;
|
|
// CHECK-LABEL: @test1
|
|
// CHECK: load atomic volatile {{.*}} acquire, align 4
|
|
// CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
|
|
}
|
|
void test2(volatile int *p, volatile int *q) {
|
|
*p = *q;
|
|
// CHECK-LABEL: @test2
|
|
// CHECK: load atomic volatile {{.*}} acquire, align 4
|
|
// CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
|
|
}
|
|
void test3(struct foo *p, struct foo *q) {
|
|
p->x = q->x;
|
|
// CHECK-LABEL: @test3
|
|
// CHECK: load atomic volatile {{.*}} acquire, align 4
|
|
// CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
|
|
}
|
|
void test4(volatile struct foo *p, volatile struct foo *q) {
|
|
p->x = q->x;
|
|
// CHECK-LABEL: @test4
|
|
// CHECK: load atomic volatile {{.*}} acquire, align 4
|
|
// CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
|
|
}
|
|
void test5(volatile struct foo *p, volatile struct foo *q) {
|
|
*p = *q;
|
|
// CHECK-LABEL: @test5
|
|
// CHECK: load atomic volatile {{.*}} acquire, align 4
|
|
// CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
|
|
}
|
|
void test6(struct bar *p, struct bar *q) {
|
|
*p = *q;
|
|
// CHECK-LABEL: @test6
|
|
// CHECK-NOT: load atomic volatile {{.*}}
|
|
// CHECK-NOT: store atomic volatile {{.*}}, {{.*}}
|
|
}
|
|
void test7(volatile struct bar *p, volatile struct bar *q) {
|
|
*p = *q;
|
|
// CHECK-LABEL: @test7
|
|
// CHECK: load atomic volatile {{.*}} acquire, align 4
|
|
// CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
|
|
}
|
|
void test8(volatile double *p, volatile double *q) {
|
|
*p = *q;
|
|
// CHECK-LABEL: @test8
|
|
// CHECK: load volatile {{.*}}, align 8
|
|
// CHECK: store volatile {{.*}}, {{.*}}, align 8
|
|
}
|
|
void test9(volatile baz *p, baz *q) {
|
|
*p = *q;
|
|
// CHECK-LABEL: @test9
|
|
// CHECK: store volatile {{.*}}, {{.*}}, align 8
|
|
// CHECK: store volatile {{.*}}, {{.*}}, align 4
|
|
}
|
|
void test10(volatile long long *p, volatile long long *q) {
|
|
*p = *q;
|
|
// CHECK-LABEL: @test10
|
|
// CHECK: load volatile {{.*}}, align 8
|
|
// CHECK: store volatile {{.*}}, {{.*}}, align 8
|
|
}
|
|
void test11(volatile float *p, volatile float *q) {
|
|
*p = *q;
|
|
// CHECK-LABEL: @test11
|
|
// CHECK: load atomic volatile {{.*}} acquire, align 4
|
|
// CHECK: store atomic volatile {{.*}}, {{.*}} release, align 4
|
|
}
|
|
int test12(struct qux *p) {
|
|
return p->f;
|
|
// CHECK-LABEL: @test12
|
|
// CHECK: load volatile {{.*}}, align 1
|
|
}
|