> I see, thanks Robin. Let's hold on for a while. IMHO this can go forward now.
For documentation purposes: I experimented with adding widening shifts via optabs/vectorizer directly and while it's possible it is IMHO too much rework. There's a clear path forward: - Make widen lshift an IFN, the patch is already accepted but causes regressions on arm. - To fix those regressions we need to distinguish between shift by scalar and shift by vector, as arm only supports the former. - For properly distinguishing the variants we need to replicate what vectorizable_shift does, which includes checking other SLP lanes, as well as initializing a vector constant if necessary. This needs to be combined with supportable_widening_operation. - supportable_widening_operation needs to be able to handle "SLP style"/n-n widening operations. This can be achieved by adding an IFN path to supportable_half_widening_operation and not using vect_create_half_widening_stmts on that path. I have a patch for this that I tested with widening left shift, vec_widen_add/sub, and widen_sum. -- Regards Robin
