https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68577
--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- Created attachment 36870 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36870&action=edit proposed patch Here's the patch I'm testing. Adding the cost of the demotion prevents vectorisation in the original testcase, but it vectorises successfully with -fvect-cost-model=unlimited. (We didn't vectorise before the combined_fn series either.) The patch also includes an SLP testcase.