]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
use the right type of cast
authorKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Wed, 4 Oct 2023 20:35:10 +0000 (23:35 +0300)
committerKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Wed, 4 Oct 2023 20:35:10 +0000 (23:35 +0300)
src/util/supervector/arch/ppc64el/impl.cpp
unit/internal/simd_utils.cpp

index add84418a939af9379561faddd0c8d133753944b..de7c73fa1a4de482279da35c31d4a13496de055c 100644 (file)
@@ -166,7 +166,7 @@ template<>
 template<>
 really_inline SuperVector<16>::SuperVector(int64_t const other)
 {
-    u.s64x2[0] = static_cast<int64x2_t>(vec_splats(static_cast<ulong64_t>(other)));
+    u.s64x2[0] = reinterpret_cast<int64x2_t>(vec_splats(static_cast<ulong64_t>(other)));
 }
 #if defined(__clang__) && (__clang_major__ >= 15)
 #pragma clang diagnostic pop
@@ -176,7 +176,7 @@ template<>
 template<>
 really_inline SuperVector<16>::SuperVector(uint64_t const other)
 {
-    u.u64x2[0] = static_cast<uint64x2_t>(vec_splats(static_cast<ulong64_t>(other)));
+    u.u64x2[0] = reinterpret_cast<uint64x2_t>(vec_splats(static_cast<ulong64_t>(other)));
 }
 
 // Constants
@@ -284,7 +284,7 @@ SuperVector<16>::comparemask(void) const {
     uint8x16_t bitmask = vec_gb(u.u8x16[0]);
     bitmask = (uint8x16_t) vec_perm(vec_splat_u8(0), bitmask, perm);
     u32 ALIGN_ATTR(16) movemask;
-    vec_ste(static_cast<uint32x4_t>(bitmask), 0, &movemask);
+    vec_ste(reinterpret_cast<uint32x4_t>(bitmask), 0, &movemask);
     return movemask;
 }
 #if defined(__clang__) && (__clang_major__ >= 15)
index 7ebd013a554924d20801d7d3a2d25ac97f1f0477..c57cd5982430d76f0ee8c8324de154ce8ed55f38 100644 (file)
@@ -678,7 +678,7 @@ TEST(SimdUtilsTest, movq) {
 #pragma clang diagnostic ignored "-Wdeprecate-lax-vec-conv-all"
 #endif // defined(__clang__) && (__clang_major__ == 15)
     int64x2_t a = {0x123456789abcdefLL, ~0LL };
-    simd = static_cast<m128>(a);
+    simd = reinterpret_cast<m128>(a);
 #if defined(__clang__) && (__clang_major__ >= 15)
 #pragma clang diagnostic pop
 #endif // defined(__clang__) && (__clang_major__ == 15)