https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92537
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- One issue that I think can pop up with the way we now make nodes built from scalars (aka turn them into externs) is that it can possibly invalidate earlier validation of other SLP instances. It's probably not the case here though, a way out if we run into this issue would be to unshare the node we are externalizing. There is for example vectorizable_shift which is asymmetric in what it supports as shift argument (but it favors externs here, being less capable for internal defs - but eventually there's the opposite case elsewhere unless we'd decleare that a bug). Testing patch.