https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91069
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- It "mismatches" in if (sel.series_p (1, 1, nelts + 1, 1)) { /* After canonicalizing the first elt to come from the first vector we only can insert the first elt from the first vector. */ at = 0; if ((ins = fold_read_from_vector (cop0, 0))) op0 = op1; } it should read from element sel[0], not 0. Testing patch.