https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88473
--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> --- (In reply to Andrew Pinski from comment #7) > The UNSPEC_MASKOP ones are still there. > > PR 93885 is the same issue. void test(void* data, void* data2) { __m128i v = _mm_load_si128((__m128i const*)data); __mmask8 m = _mm_testn_epi16_mask(v, v); m = m | 0x0f; m = m | 0xf0; v = _mm_maskz_add_epi16(m, v, v); _mm_store_si128((__m128i*)data2, v); } Should be ok. Currently we rely on RA to choose whether to use mask register or gpr for bitwise operation, which means that if we remove UNSPEC_MASKOP, _kor_mask8 will only generate gpr orb, to ensure the correspondence between intrinsic and instruction, UNSPEC_MASKOP is necessary, if the user wants GCC to optimize bitwise operation, it is recommended to use bitwise operator instead of intrinsic.