> With the avx512_two_epilogues tuning enabled for zen4 and zen5
> the gcc.target/i386/vect-epilogues-5.c testcase below regresses
> and ends up using AVX2 sized vectors for the masked epilogue
> rather than AVX512 sized vectors. The following patch rectifies
> this and adds coverage for the intended behavior.
>
> Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
>
> OK for trunk and 15 branch if that succeeds?
>
> Thanks,
> Richard.
>
> * config/i386/i386.cc (ix86_vector_costs::finish_cost):
> Do not suggest a first epilogue mode for AVX512 sized
> main loops with X86_TUNE_AVX512_TWO_EPILOGUES as that
> interferes with using a masked epilogue.
>
> * gcc.target/i386/vect-epilogues-1.c: New testcase.
> * gcc.target/i386/vect-epilogues-2.c: Likewise.
> * gcc.target/i386/vect-epilogues-3.c: Likewise.
> * gcc.target/i386/vect-epilogues-4.c: Likewise.
> * gcc.target/i386/vect-epilogues-5.c: Likewise.
OK
thanks,
Honza