https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80517
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- Several of those intrinsics are implemented using vector extensions and constant propagation works fine on those. What seems to be missing here is constant folding of the very specific __builtin_ia32_pmovmskb128 and __builtin_ia32_pext_si in ix86_fold_builtin. It should not be very hard, mostly needs someone motivated ;-)