On Fri, Jun 08, 2018 at 10:09:23AM -0700, Carl Love wrote: > > > @@ -100,7 +152,6 @@ extract_uchar_15 (vector unsigned char a) > > > /* { dg-final { scan-assembler "extsb " } } */ > > > /* { dg-final { scan-assembler "extsh " } } */ > > > /* { dg-final { scan-assembler "extsw " } } */ > > > -/* { dg-final { scan-assembler-not "m\[ft\]vsr" } } */ > > > /* { dg-final { scan-assembler-not "stxvd2x " } } */ > > > /* { dg-final { scan-assembler-not "stxv " } } */ > > > /* { dg-final { scan-assembler-not "lwa " } } */ > > > > Why delete this? The changelog doesn't mention it either. > > > > Otherwise okay for trunk. Thanks! > > I went back and looked at that, it has been awhile since I did the > patch and don't remember the details. The above occurs in file > gcc/testsuite/gcc.target/powerpc/p9-extract-1.c. Reading the test > file, there is a comment at the top that I probably didn't read before. > > /* Test that under ISA 3.0 (-mcpu=power9), the compiler optimizes conversion > to > double after a vec_extract to use the VEXTRACTU{B,H} or XXEXTRACTUW > > instructions (which leaves the result in a vector register), and not the > > VEXTU{B,H,W}{L,R}X instructions (which needs a direct move to do the > floating > point conversion). */ > > So, the dg-final { scan-assembler-not "m\[ft\]vsr" is checking to make > sure we are not using any direct moves. The new vec_extract tests with > the "long long int" and "long long bool" are generating the move > instruction. It looks like the existing GCC support for VEXTRACTU{B,H} > or XXEXTRACTUW doesn't include support for extracting a double element.
Maybe split the test file in two, then? Or just do scan-assembler-times for mfvsr and for mtvsr? > There is a new Power 9 instruction vextractd for extracting double as > well as the new Power 9 instructions vextractub, vextractuw, > vextractuh. At first glance I didn't see an xxextractd or similar > instruction. Will need to look further. So, that said, it looks like > I really need to add the support to GCC to extract the double element. > Based on a quick look at the code, that is not trivial. So, I have > dropped the changes to file p9-extract-1.c from the patch. The updated > patch is given below. > > Please let me know if this revised patch is OK for mainline. The > changes to p9-extract-1.c will be addressed in a future patch. Thanks. Looks fine to me. Okay for trunk. Thanks! Segher