https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110776
--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to rguent...@suse.de from comment #7) > On Tue, 25 Jul 2023, linkw at gcc dot gnu.org wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110776 > > > > --- Comment #6 from Kewen Lin <linkw at gcc dot gnu.org> --- > > (In reply to rguent...@suse.de from comment #5) > > > On Tue, 25 Jul 2023, linkw at gcc dot gnu.org wrote: > > > > > > I think apart from the consideration what a single element vector > > > is compared to a scalar, a more to-the-point fix is > > > > > > if (VECTOR_TYPE_P (ltype) > > > && memory_access_type != VMAT_ELEMENTWISE) > > > > Thanks for the suggestion! I thought checking lnel can also cover > > VMAT_STRIDED_SLP's special case having const_nunits 1, but it seems > > impossible > > to have? > > I think so, unless I'm convinced with a testcase ;) (sorry for being a bit slow - we had a power outage that wasted most of the day) Richi's suggested patch fixes build of a cross-build for powerpc-darwin and the test results look OK too. A non-expert look at the code suggests that VMAT_ELEMENTWISE is already accounted for on the write side, so that we should not see a call to the costing code for the equivalent write-side.