https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121604
--- Comment #1 from Alex Coplan <acoplan at gcc dot gnu.org> --- Here is a possibly-related case: #include <arm_sve.h> svuint64_t f(svuint64_t zd, svbool_t p) { return svpmov_lane_u64_m(svdup_u64(~0UL), svpfalse(), 1); } with -O2 -march=armv8.2-a+sve2p1 on trunk this gives: f: mov z0.b, #-1 ret but I don't think it should fold to all 1s since we should have some zero bits moved in from the pfalse predicate.