]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
add conditional for __clang__
authorKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Wed, 4 Oct 2023 17:28:35 +0000 (20:28 +0300)
committerKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Wed, 4 Oct 2023 17:28:35 +0000 (20:28 +0300)
src/util/arch/ppc64el/simd_utils.h
src/util/supervector/arch/ppc64el/impl.cpp
unit/internal/simd_utils.cpp

index 4f0e6cc7a596e7637054a75cf525ca32a77c2d73..7b0f62a08794149f07ed99a921d4e65a9f68a9d4 100644 (file)
@@ -43,6 +43,7 @@
 
 #include <string.h> // 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
index e7baeddeba25f210e16af8b1c7b8023a8ad304bd..05aaba41386e1bbf568593f1199ed40946432287 100644 (file)
@@ -158,6 +158,7 @@ really_inline SuperVector<16>::SuperVector(uint32_t const other)
     u.u32x4[0] = vec_splats(static_cast<uint32_t>(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<int64x2_t>(vec_splats(static_cast<ulong64_t>(other)));
 }
 #pragma clang diagnostic pop
+#endif // defined(__clang__) && (__clang_major__ == 15)
 
 template<>
 template<>
index 1979344290d8f01c2b16315e71b8a2b088153bf8..510a0ed19397d8f1ac1baf1df4d12f568db6fc1f 100644 (file)
@@ -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<m128>(a);
 #pragma clang diagnostic pop
+#endif // defined(__clang__) && (__clang_major__ == 15)
 #endif
 #endif
     r = movq(simd);