3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 -x c++-header %t/foo.h \
6 // RUN: -emit-pch -o %t/foo.pch
7 // RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %t/use.cpp -include-pch \
8 // RUN: %t/foo.pch -emit-llvm -o - | FileCheck %t/use.cpp
13 typedef float __m128 __attribute__((__vector_size__(16), __aligned__(16)));
15 static __inline__ __m128 __attribute__((__always_inline__, __min_vector_width__(128)))
16 _mm_setr_ps(float __z, float __y, float __x, float __w)
18 return __extension__ (__m128){ __z, __y, __x, __w };
23 inline VR MakeVR( float X, float Y, float Z, float W )
25 return _mm_setr_ps( X, Y, Z, W );
28 extern "C" float sqrtf(float);
30 namespace VectorSinConstantsSSE
32 float a = (16 * sqrtf(0.225f));
33 VR A = MakeVR(a, a, a, a);
34 static const float b = (16 * sqrtf(0.225f));
35 static const VR B = MakeVR(b, b, b, b);
43 return VectorSinConstantsSSE::A[0] + VectorSinConstantsSSE::A[1] +
44 VectorSinConstantsSSE::A[2] + VectorSinConstantsSSE::A[3] +
45 VectorSinConstantsSSE::B[0] + VectorSinConstantsSSE::B[1] +
46 VectorSinConstantsSSE::B[2] + VectorSinConstantsSSE::B[3];
49 // CHECK: define{{.*}}@__cxx_global_var_init(
50 // CHECK: store{{.*}}, ptr @_ZN21VectorSinConstantsSSE1aE
52 // CHECK: define{{.*}}@__cxx_global_var_init.1(
53 // CHECK: store{{.*}}, ptr @_ZN21VectorSinConstantsSSE1AE
55 // CHECK: define{{.*}}@__cxx_global_var_init.2(
56 // CHECK: store{{.*}}, ptr @_ZN21VectorSinConstantsSSEL1BE
58 // CHECK: define{{.*}}@__cxx_global_var_init.3(
59 // CHECK: store{{.*}}, ptr @_ZN21VectorSinConstantsSSEL1bE
61 // CHECK: @_GLOBAL__sub_I_use.cpp
62 // CHECK: call{{.*}}@__cxx_global_var_init(
63 // CHECK: call{{.*}}@__cxx_global_var_init.1(
64 // CHECK: call{{.*}}@__cxx_global_var_init.3(
65 // CHECK: call{{.*}}@__cxx_global_var_init.2(