https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118795
--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> --- For reference, the following fixes the ICE (more "latent" issues with permute support queries elsewhere I bet). diff --git a/gcc/match.pd b/gcc/match.pd index ad966766376..c0402e81c28 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -11128,7 +11128,7 @@ and, (with { vec_perm_indices sel0 (builder0, 2, nelts); - vec_perm_indices sel1 (builder1, 1, nelts); + vec_perm_indices sel1 (builder1, 2, nelts); for (int i = 0; i < nelts; i++) builder2.quick_push (sel0[sel1[i].to_constant ()]);