From 354fda48fb476d2483da099f77bf0f2feeed1696 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Wed, 4 Oct 2023 20:28:35 +0300 Subject: [PATCH] add conditional for __clang__ --- src/util/arch/ppc64el/simd_utils.h | 2 ++ src/util/supervector/arch/ppc64el/impl.cpp | 2 ++ unit/internal/simd_utils.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/util/arch/ppc64el/simd_utils.h b/src/util/arch/ppc64el/simd_utils.h index 4f0e6cc7..7b0f62a0 100644 --- a/src/util/arch/ppc64el/simd_utils.h +++ b/src/util/arch/ppc64el/simd_utils.h @@ -43,6 +43,7 @@ #include // for memcpy +#if defined(__clang__) && (__clang_major__ == 15) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecate-lax-vec-conv-all" @@ -424,5 +425,6 @@ m128 set2x64(u64a hi, u64a lo) { } #pragma clang diagnostic pop +#endif // defined(__clang__) && (__clang_major__ == 15) #endif // ARCH_PPC64EL_SIMD_UTILS_H diff --git a/src/util/supervector/arch/ppc64el/impl.cpp b/src/util/supervector/arch/ppc64el/impl.cpp index e7baedde..05aaba41 100644 --- a/src/util/supervector/arch/ppc64el/impl.cpp +++ b/src/util/supervector/arch/ppc64el/impl.cpp @@ -158,6 +158,7 @@ really_inline SuperVector<16>::SuperVector(uint32_t const other) u.u32x4[0] = vec_splats(static_cast(other)); } +#if defined(__clang__) && (__clang_major__ == 15) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecate-lax-vec-conv-all" template<> @@ -167,6 +168,7 @@ really_inline SuperVector<16>::SuperVector(int64_t const other) u.s64x2[0] = static_cast(vec_splats(static_cast(other))); } #pragma clang diagnostic pop +#endif // defined(__clang__) && (__clang_major__ == 15) template<> template<> diff --git a/unit/internal/simd_utils.cpp b/unit/internal/simd_utils.cpp index 19793442..510a0ed1 100644 --- a/unit/internal/simd_utils.cpp +++ b/unit/internal/simd_utils.cpp @@ -673,11 +673,13 @@ TEST(SimdUtilsTest, movq) { int64x2_t a = { 0x123456789abcdefLL, ~0LL }; simd = vreinterpretq_s32_s64(a); #elif defined(ARCH_PPC64EL) +#if defined(__clang__) && (__clang_major__ == 15) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecate-lax-vec-conv-all" int64x2_t a = {0x123456789abcdefLL, ~0LL }; simd = static_cast(a); #pragma clang diagnostic pop +#endif // defined(__clang__) && (__clang_major__ == 15) #endif #endif r = movq(simd);