diff options
Diffstat (limited to 'src/lib/utils/simd')
-rw-r--r-- | src/lib/utils/simd/simd_32.h | 4 | ||||
-rw-r--r-- | src/lib/utils/simd/simd_avx2/simd_avx2.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/utils/simd/simd_32.h b/src/lib/utils/simd/simd_32.h index ee87c9c3d..58d76c277 100644 --- a/src/lib/utils/simd/simd_32.h +++ b/src/lib/utils/simd/simd_32.h @@ -296,13 +296,13 @@ class SIMD_4x32 final #if defined(BOTAN_TARGET_ARCH_IS_ARM64) - BOTAN_IF_CONSTEXPR(ROT == 8) + if constexpr(ROT == 8) { const uint8_t maskb[16] = { 3,0,1,2, 7,4,5,6, 11,8,9,10, 15,12,13,14 }; const uint8x16_t mask = vld1q_u8(maskb); return SIMD_4x32(vreinterpretq_u32_u8(vqtbl1q_u8(vreinterpretq_u8_u32(m_simd), mask))); } - else BOTAN_IF_CONSTEXPR(ROT == 16) + else if constexpr(ROT == 16) { return SIMD_4x32(vreinterpretq_u32_u16(vrev32q_u16(vreinterpretq_u16_u32(m_simd)))); } diff --git a/src/lib/utils/simd/simd_avx2/simd_avx2.h b/src/lib/utils/simd/simd_avx2/simd_avx2.h index 3498c2ad0..21261e700 100644 --- a/src/lib/utils/simd/simd_avx2/simd_avx2.h +++ b/src/lib/utils/simd/simd_avx2/simd_avx2.h @@ -80,14 +80,14 @@ class SIMD_8x32 final #if defined(__AVX512VL__) return SIMD_8x32(_mm256_rol_epi32(m_avx2, ROT)); #else - BOTAN_IF_CONSTEXPR(ROT == 8) + if constexpr(ROT == 8) { const __m256i shuf_rotl_8 = _mm256_set_epi8(14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3, 14, 13, 12, 15, 10, 9, 8, 11, 6, 5, 4, 7, 2, 1, 0, 3); return SIMD_8x32(_mm256_shuffle_epi8(m_avx2, shuf_rotl_8)); } - else BOTAN_IF_CONSTEXPR(ROT == 16) + else if constexpr(ROT == 16) { const __m256i shuf_rotl_16 = _mm256_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2); |