https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111699
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (simplify (vec_cond (vec_cond:s @0 @3 integer_zerop) @1 @2) (if (optimize_vectors_before_lowering_p () && types_match (@0, @3)) (vec_cond (bit_and @0 @3) @1 @2))) goes into an infinite loop with fold_build3 as the fold_build2:BIT_AND of: (gdb) p debug_generic_expr(captures[1]) v == { 0, 0, 0, 0, 0, 0, 0, 0 } $9 = void (gdb) p debug_generic_expr(captures[2]) { 0, -1, -1, -1, -1, -1, -1, -1 } Creates a vec_cond ...