On Fri, 14 Apr 2023, Jakub Jelinek wrote:
> On Fri, Apr 14, 2023 at 11:42:55AM +0200, Richard Biener via Gcc-patches
> wrote:
> > This replaces i686*-*-* && { ! lp64 } with the appropriate
> > { i?86-*-* x86_64-*-* } && { ! lp64 } for the testcases and
> > also amends the e variants checking last variant for avx.
> > I've used avx in the dump scanning, not avx_runtime, since
> > the dumps get produced when one would not execute but only
> > compile them. The f varaints lack AVX checking, I didn't
>
> avx_runtime was actually intentional. The thing is that the testcase
> has
> /* { dg-additional-options "-mavx" { target avx_runtime } } */
> So, if avx_runtime, we know we are compiled with -mavx. If not, we don't
> really know, it could be with -mavx because user configured gcc to default
> to -mavx through some --with-arch=, or because it was tested with
> --target_board=unix/-mavx etc.
> If we wanted to make sure it is exact, we could do
> /* { dg-additional-options "-mno-avx" { target i?86-*-* x86_64-*-* } } */
> /* { dg-additional-options "-mavx" { target avx_runtime } } */
> and then avx_runtime can be actually trusted.
Oops. Indeed target_avx checks whether it can compile sth with
-O2 -mavx rather than verifying avx is present. I've seen scan
failures with -m32/-march=cascadelake on a zen2 host. I'm not exactly
sure why.
I'll revert the avx_runtime changes and let somebody else deal
with the remaining issues in these tests.
Richard.