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
66 lines
3.0 KiB
C
66 lines
3.0 KiB
C
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
|
|
|
|
// Validate that volatile _Complex loads and stores are generated
|
|
// properly, including their alignment (even when overaligned).
|
|
//
|
|
// This test assumes that floats are 32-bit aligned and doubles are
|
|
// 64-bit aligned, and uses x86-64 as a target that should have this
|
|
// property.
|
|
|
|
volatile _Complex float cf;
|
|
volatile _Complex double cd;
|
|
volatile _Complex float cf32 __attribute__((aligned(32)));
|
|
volatile _Complex double cd32 __attribute__((aligned(32)));
|
|
|
|
// CHECK-LABEL: define{{.*}} void @test_cf()
|
|
void test_cf(void) {
|
|
// CHECK: load volatile float, ptr @cf, align 4
|
|
// CHECK-NEXT: load volatile float, ptr getelementptr inbounds nuw (i8, ptr @cf, i64 4), align 4
|
|
(void)(cf);
|
|
// CHECK-NEXT: [[R:%.*]] = load volatile float, ptr @cf, align 4
|
|
// CHECK-NEXT: [[I:%.*]] = load volatile float, ptr getelementptr inbounds nuw (i8, ptr @cf, i64 4), align 4
|
|
// CHECK-NEXT: store volatile float [[R]], ptr @cf, align 4
|
|
// CHECK-NEXT: store volatile float [[I]], ptr getelementptr inbounds nuw (i8, ptr @cf, i64 4), align 4
|
|
(void)(cf=cf);
|
|
// CHECK-NEXT: ret void
|
|
}
|
|
|
|
// CHECK-LABEL: define{{.*}} void @test_cd()
|
|
void test_cd(void) {
|
|
// CHECK: load volatile double, ptr @cd, align 8
|
|
// CHECK-NEXT: load volatile double, ptr getelementptr inbounds nuw (i8, ptr @cd, i64 8), align 8
|
|
(void)(cd);
|
|
// CHECK-NEXT: [[R:%.*]] = load volatile double, ptr @cd, align 8
|
|
// CHECK-NEXT: [[I:%.*]] = load volatile double, ptr getelementptr inbounds nuw (i8, ptr @cd, i64 8), align 8
|
|
// CHECK-NEXT: store volatile double [[R]], ptr @cd, align 8
|
|
// CHECK-NEXT: store volatile double [[I]], ptr getelementptr inbounds nuw (i8, ptr @cd, i64 8), align 8
|
|
(void)(cd=cd);
|
|
// CHECK-NEXT: ret void
|
|
}
|
|
|
|
// CHECK-LABEL: define{{.*}} void @test_cf32()
|
|
void test_cf32(void) {
|
|
// CHECK: load volatile float, ptr @cf32, align 32
|
|
// CHECK-NEXT: load volatile float, ptr getelementptr inbounds nuw (i8, ptr @cf32, i64 4), align 4
|
|
(void)(cf32);
|
|
// CHECK-NEXT: [[R:%.*]] = load volatile float, ptr @cf32, align 32
|
|
// CHECK-NEXT: [[I:%.*]] = load volatile float, ptr getelementptr inbounds nuw (i8, ptr @cf32, i64 4), align 4
|
|
// CHECK-NEXT: store volatile float [[R]], ptr @cf32, align 32
|
|
// CHECK-NEXT: store volatile float [[I]], ptr getelementptr inbounds nuw (i8, ptr @cf32, i64 4), align 4
|
|
(void)(cf32=cf32);
|
|
// CHECK-NEXT: ret void
|
|
}
|
|
|
|
// CHECK-LABEL: define{{.*}} void @test_cd32()
|
|
void test_cd32(void) {
|
|
// CHECK: load volatile double, ptr @cd32, align 32
|
|
// CHECK-NEXT: load volatile double, ptr getelementptr inbounds nuw (i8, ptr @cd32, i64 8), align 8
|
|
(void)(cd32);
|
|
// CHECK-NEXT: [[R:%.*]] = load volatile double, ptr @cd32, align 32
|
|
// CHECK-NEXT: [[I:%.*]] = load volatile double, ptr getelementptr inbounds nuw (i8, ptr @cd32, i64 8), align 8
|
|
// CHECK-NEXT: store volatile double [[R]], ptr @cd32, align 32
|
|
// CHECK-NEXT: store volatile double [[I]], ptr getelementptr inbounds nuw (i8, ptr @cd32, i64 8), align 8
|
|
(void)(cd32=cd32);
|
|
// CHECK-NEXT: ret void
|
|
}
|