https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114801
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Christophe Lyon from comment #7) > This fails because down the call chain from lowpart_subreg, we reach > gcc_unreachable in rtx_vector_builder::find_cached_value because m_mode == > V4BImode (so is MODE_VECTOR_BOOL), but is not a valid expected boolean > constant vector. Ah, so the builtin prototype says the argument is unsigned short (or unsigned char?) but mode (as the insn predicate mode) is V*BImode in that case? Then it would still be passed as SImode, so one would need if (GET_MODE (x) == SImode || GET_MODE (x) == VOIDmode) { x = lowpart_subreg ((mode == HImode || mode == V16BImode) ? HImode : QImode, x, SImode); if (mode != HImode) x = lowpart_subreg (mode, x, mode == V16BImode ? HImode : QImode); } Does that second lowpart_subreg create CONST_VECTOR you are looking for?