On Tue, 16 Jul 2024, Filip Kastl wrote:
> On Wed 2024-07-10 11:34:44, Richard Biener wrote:
> > On Mon, 8 Jul 2024, Filip Kastl wrote:
> >
> > > Hi,
> > >
> > > I'm replying to Richard and keeping Andrew in cc since your suggestions
> > > overlap.
> > >
> > >
> > > On Tue 2024-06-11 14:48:06, Richard Biener wrote:
> > > > On Thu, 30 May 2024, Filip Kastl wrote:
> > > > > +/* { dg-do compile } */
> > > > > +/* { dg-options "-O2 -fdump-tree-switchconv -march=znver3" } */
> > > >
> > > > I think it's better to enable -mpopcnt and -mbmi (or what remains
> > > > as minimal requirement).
> > >
> > > Will do. Currently the testcases are in the i386 directory. After I
> > > exchange
> > > the -march for -mpopcnt -mbmi can I put these testcases into
> > > gcc.dg/tree-ssa?
> > > Will the -mpopcnt -mbmi options work with all target architectures?
> >
> > No, those are i386 specific flags. At least for popcount there's
> > dejagnu effective targets popcount, popcountl and popcountll so you
> > could do
> >
> > /* { dg-additional-options "-mpopcnt" { target { x86_64-*-* i?86-*-* } } }
> > */
> >
> > and guard the tree dump scan with { target popcount } to cover other
> > archs that have popcount (without adding extra flags).
> >
>
> How does this take into account the FFS instruction? If -mbmi is i386
> specific
> then I can't just put it into dg-options, right? And if I wanted to handle it
> similarly to how you suggest handling POPCOUNT, there would have to be
> something like { target bmi }. Is there something like that?
I don't think so. You can of course add architecture specific tests.
Richard.
> Note that I commited to adding x & -x == x as a fallback to POPCOUNT so now I
> do not require -mpopcount. I now just have to ensure that the testcase only
> runs when the target supports FFS (or runs always but scans output only when
> target supports FFS).
> Cheers,
> Filip Kastl
>
--
Richard Biener <[email protected]>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)