[PATCH #2], PR 71201, Fix xxperm fusion on PowerPC ISA 3.0

Segher Boessenkool segher@kernel.crashing.org
Mon May 23 23:13:00 GMT 2016


Hi,

On Mon, May 23, 2016 at 06:17:36PM -0400, Michael Meissner wrote:
> > > Unfortunately, in running the testsuite on the power9 simulator, we discovered
> > > that the test gcc.c-torture/execute/pr56866.c would fail because the fusion
> > > alternatives confused the register allocator and/or the passes after the
> > > register allocator.  This patch removes the explicit fusion support from
> > > XXPERM.
> > 
> > Okay.  Please keep the PR open until that problem is fixed.  It also
> > shouldn't be "target" category, if the problem is RA.

> This patch just fixes the xxperm fusion problem, and I will submit the
> vpermr/xxpermr support in another patch.

Thanks.

> Note, if you believe the register allocator and the post reload RTL passes need
> to be fixed to allow the fusion of the move to the xxperm, that is fine.
> However, take it on yourself.

I'm just saying that if the RA (and later) are "confused", that is their
problem, not a target problem.  Or I'm not understanding what the problem
is.  Maybe it is just target abusing the RA?  Either way...

> As the person who wrote the code to add fusion
> support for xxperm, I now think it was a bad idea, and I want to remove that
> support.  It would probably be better done by modifying the scheduler to keep
> the move and xxperm together, rather than including it in the insn.

That should give most of the win without most of the complexity.  I like
that plan ;-)

> I have bootstrapped the compiler on a little endian power9 system and there
> were no regressions in the test suite.  Is it ok to check into the trunk and on
> the 6.1 branch?
> 
> [gcc]
> 2016-05-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
> 
> 	PR target/71201
> 	* config/rs6000/altivec.md (altivec_vperm_<mode>_internal): Drop
> 	ISA 3.0 xxperm fusion alternative.
> 	(altivec_vperm_v8hiv16qi): Likewise.
> 	(altivec_vperm_<mode>_uns_internal): Likewise.
> 	(vperm_v8hiv4si): Likewise.
> 	(vperm_v16qiv8hi): Likewise.
> 
> [gcc/testsuite]
> 2016-05-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
> 	    Kelvin Nilsen  <kelvin@gcc.gnu.org>
> 
> 	* gcc.target/powerpc/p9-permute.c: Run test on big endian as well
> 	as little endian.

Okay for trunk.  Okay for 6 after a week or so.


Segher



More information about the Gcc-patches mailing list