Skip to content

Commit

Permalink
e2k-lcc: Avoid psllqh and psrlql warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
makise-homura committed Feb 20, 2021
1 parent 9ff51ed commit 6d9669a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions simde/simde-arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
#if defined(__LCC__)
#define SIMDE_BUG_LCC_TOO_STRICT_VECTOR_SHIFTS_AND_COMPARES
#define SIMDE_BUG_LCC_XOP_MISSING
#define SIMDE_BUG_LCC_WARNING_ON_SHIFTS
#define SIMDE_BUG_LCC_FMA_WRONG_RESULT
#define SIMDE_BUG_LCC_AVX_NO_LOAD_STORE_U2

Expand Down
12 changes: 10 additions & 2 deletions simde/x86/sse2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,11 @@ simde_mm_bslli_si128 (simde__m128i a, const int imm8)
return simde__m128i_from_private(r_);
}
#if defined(SIMDE_X86_SSE2_NATIVE) && !defined(__PGI)
#define simde_mm_bslli_si128(a, imm8) _mm_slli_si128(a, imm8)
#if defined(SIMDE_BUG_LCC_WARNING_ON_SHIFTS)
#define simde_mm_bslli_si128(a, imm8) ((imm8 & ~15) ? _mm_setzero_si128() : _mm_slli_si128(a, imm8 & 15))
#else
#define simde_mm_bslli_si128(a, imm8) _mm_slli_si128(a, imm8)
#endif
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE) && !defined(__clang__)
#define simde_mm_bslli_si128(a, imm8) \
simde__m128i_from_neon_i8(((imm8) <= 0) ? simde__m128i_to_neon_i8(a) : (((imm8) > 15) ? (vdupq_n_s8(0)) : (vextq_s8(vdupq_n_s8(0), simde__m128i_to_neon_i8(a), 16 - (imm8)))))
Expand Down Expand Up @@ -1252,7 +1256,11 @@ simde_mm_bsrli_si128 (simde__m128i a, const int imm8)
return simde__m128i_from_private(r_);
}
#if defined(SIMDE_X86_SSE2_NATIVE) && !defined(__PGI)
#define simde_mm_bsrli_si128(a, imm8) _mm_srli_si128(a, imm8)
#if defined(SIMDE_BUG_LCC_WARNING_ON_SHIFTS)
#define simde_mm_bsrli_si128(a, imm8) ((imm8 & ~15) ? _mm_setzero_si128() : _mm_srli_si128(a, imm8 & 15))
#else
#define simde_mm_bsrli_si128(a, imm8) _mm_srli_si128(a, imm8)
#endif
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE) && !defined(__clang__)
#define simde_mm_bsrli_si128(a, imm8) \
simde__m128i_from_neon_i8(((imm8 < 0) || (imm8 > 15)) ? vdupq_n_s8(0) : (vextq_s8(simde__m128i_to_private(a).neon_i8, vdupq_n_s8(0), ((imm8 & 15) != 0) ? imm8 : (imm8 & 15))))
Expand Down

0 comments on commit 6d9669a

Please sign in to comment.