On Thu, 7 Mar 2024, Richard Sandiford wrote: > Sorry, still catching up on email, but: > > Richard Biener <rguent...@suse.de> writes: > > We have optimize_vectors_before_lowering_p but we shouldn't even there > > turn supported into not supported ops and as said, what's supported or > > not cannot be finally decided (if it's only vcond and not vcond_mask > > that is supported). Also optimize_vectors_before_lowering_p is set > > for a short time between vectorization and vector lowering and we > > definitely do not want to turn supported vectorizer emitted stmts > > into ones that we need to lower. For GCC 15 we should see to move > > vector lowering before vectorization (before loop optimization I'd > > say) to close this particula hole (and also reliably ICE when the > > vectorizer creates unsupported IL). We also definitely want to > > retire vcond expanders (no target I know of supports single-instruction > > compare-and-select). > > ...definitely agree with this FWIW. Sounds like a much cleaner approach. > > One of the main tricks that vcond*s tend to do is invert "difficult" > comparisons and swap the data operands to match. But I think we should > move to a situation where targets don't provide comparison patterns > that require an inversion, and instead move inversions to generic code.
Yes, that would be good as well - of course it will likely require fending off some more simplification pattenrs. Sounds like step #2 anyway, making all ports happy with no vcond will definitely require some work unless we force it by simply no longer using vcond ... Richard.