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
1.9 KiB
C++
66 lines
1.9 KiB
C++
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
// RUN: split-file %s %t
|
|
//
|
|
// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 -x c++-header %t/foo.h \
|
|
// RUN: -emit-pch -o %t/foo.pch
|
|
// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/use.cpp -include-pch \
|
|
// RUN: %t/foo.pch -emit-llvm -o - | FileCheck %t/use.cpp
|
|
|
|
//--- foo.h
|
|
#ifndef FOO_H
|
|
#define FOO_H
|
|
typedef float __m128 __attribute__((__vector_size__(16), __aligned__(16)));
|
|
|
|
static __inline__ __m128 __attribute__((__always_inline__, __min_vector_width__(128)))
|
|
_mm_setr_ps(float __z, float __y, float __x, float __w)
|
|
{
|
|
return __extension__ (__m128){ __z, __y, __x, __w };
|
|
}
|
|
|
|
typedef __m128 VR;
|
|
|
|
inline VR MakeVR( float X, float Y, float Z, float W )
|
|
{
|
|
return _mm_setr_ps( X, Y, Z, W );
|
|
}
|
|
|
|
extern "C" float sqrtf(float);
|
|
|
|
namespace VectorSinConstantsSSE
|
|
{
|
|
float a = (16 * sqrtf(0.225f));
|
|
VR A = MakeVR(a, a, a, a);
|
|
static const float b = (16 * sqrtf(0.225f));
|
|
static const VR B = MakeVR(b, b, b, b);
|
|
}
|
|
|
|
#endif // FOO_H
|
|
|
|
//--- use.cpp
|
|
#include "foo.h"
|
|
float use() {
|
|
return VectorSinConstantsSSE::A[0] + VectorSinConstantsSSE::A[1] +
|
|
VectorSinConstantsSSE::A[2] + VectorSinConstantsSSE::A[3] +
|
|
VectorSinConstantsSSE::B[0] + VectorSinConstantsSSE::B[1] +
|
|
VectorSinConstantsSSE::B[2] + VectorSinConstantsSSE::B[3];
|
|
}
|
|
|
|
// CHECK: define{{.*}}@__cxx_global_var_init(
|
|
// CHECK: store{{.*}}, ptr @_ZN21VectorSinConstantsSSE1aE
|
|
|
|
// CHECK: define{{.*}}@__cxx_global_var_init.1(
|
|
// CHECK: store{{.*}}, ptr @_ZN21VectorSinConstantsSSE1AE
|
|
|
|
// CHECK: define{{.*}}@__cxx_global_var_init.2(
|
|
// CHECK: store{{.*}}, ptr @_ZN21VectorSinConstantsSSEL1BE
|
|
|
|
// CHECK: define{{.*}}@__cxx_global_var_init.3(
|
|
// CHECK: store{{.*}}, ptr @_ZN21VectorSinConstantsSSEL1bE
|
|
|
|
// CHECK: @_GLOBAL__sub_I_use.cpp
|
|
// CHECK: call{{.*}}@__cxx_global_var_init(
|
|
// CHECK: call{{.*}}@__cxx_global_var_init.1(
|
|
// CHECK: call{{.*}}@__cxx_global_var_init.3(
|
|
// CHECK: call{{.*}}@__cxx_global_var_init.2(
|