Files
TheRock/compiler/amd-llvm/clang/test/CodeGenOpenCLCXX/reinterpret_cast.clcpp
T
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

29 lines
1.1 KiB
Plaintext

//RUN: %clang_cc1 %s -triple spir -emit-llvm -O0 -o - | FileCheck %s
typedef int int2 __attribute__((ext_vector_type(2)));
typedef int int4 __attribute__((ext_vector_type(4)));
typedef long long2 __attribute__((ext_vector_type(2)));
//CHECK-LABEL: define{{.*}} spir_func void @_Z3barPU3AS1Dv2_i
void bar(global int2 *in) {
//CHECK: bitcast <2 x i32> %{{[0-9]+}} to i64
auto l = reinterpret_cast<long>(in[0]);
//CHECK: bitcast i64 %{{[0-9]+}} to <2 x i32>
auto i2 = reinterpret_cast<int2>(l);
__private short s1;
// CHECK: %{{[0-9]+}} = load i16, ptr %s1, align 2
// CHECK-NEXT: store i16 %{{[0-9]+}}, ptr %s2, align 2
auto s2 = reinterpret_cast<__private short>(s1);
// CHECK: %{{[0-9]+}} = load i16, ptr %s1, align 2
// CHECK-NEXT: store i16 %{{[0-9]+}}, ptr %s3, align 2
auto s3 = reinterpret_cast<decltype(s1)>(s1);
// CHECK: %{{[0-9]+}} = load i16, ptr %s1, align 2
// CHECK-NEXT: store i16 %{{[0-9]+}}, ptr %s4, align 2
auto s4 = reinterpret_cast<__global short>(s1);
int4 i4;
//CHECK: bitcast <4 x i32> %{{[0-9]+}} to <2 x i64>
auto l2 = reinterpret_cast<long2>(i4);
}