On Mon, 23 Jan 2023, Jakub Jelinek wrote:

> On Mon, Jan 23, 2023 at 11:09:43AM +0100, Richard Biener wrote:
> > The following deals with .LOOP_DIST_ALIAS surviving vectorization
> > because any of the loops involved were elided between loop distribution
> > and vectorization.  As opposed to .LOOP_VECTORIZED which exists only
> > between if-conversion and vectorization with no intermediate passes
> > this is more difficult to deal with in advance and thus cleaning
> > up after vectorization looks better.  There's the unconditional
> > vector lowering pass which looks like a good place for this (for
> > SIMD uid we have pass_simduid_cleanup).
> > 
> > Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
> > 
> > OK?
> 
> I admit I didn't know something like LOOP_DIST_ALIAS even exist until
> today.
> Anyway, I wonder if there is still time to clean up during/after
> veclower21.

That's what the patch does, but maybe I misunderstood the question.

> I see fold_loop_internal_call propagates the return value to immediate
> uses and cfg_changed means we'll clean up the cfg, is that enough?

It's enough to get rid of the internal function call which will ICE
if it reaches RTL expansion.  The earliest point to get rid of them
is in the loop vectorizer but for the testcase at hand this requires
a walk of the whole IL where we cut the whole vectorizer pass with
the number-of-loops in function check currently.

Richard.

Reply via email to