[PATCH] Add peephole2s to improve pr49095.c f{char,short,int,long}minus on ia32 (PR rtl-optimization/89865)

Jakub Jelinek jakub@redhat.com
Mon Apr 8 11:32:00 GMT 2019


On Sat, Mar 30, 2019 at 11:21:33AM +0100, Uros Bizjak wrote:
> > OK.  One might ask if there's a way to share a bit of code here since
> > there's a fair amount of duplication.  But I'll trust that you've
> > pondered that and decided it wasn't really worth the effort.
> 
> I think that Vladimir n is looking into the PR. So, if RA can avoid
> register copies by itself, then these extra peepholes won't be needed.
> Let's ask Vladimir for his opinion.

While Vlad's patch improved the code generation on the testcase, it was
orthogonal to the two peephole2 patches:
https://gcc.gnu.org/ml/gcc-patches/2019-03/msg01441.html
https://gcc.gnu.org/ml/gcc-patches/2019-03/msg01442.html
as can be seen even from that Vlad didn't have to adjust the counts in the
pr49095.c testcase, while both of those patches do that (both together down
to zero RMW sequences).

Are you ok with those patches, or do you have other suggestions?

	Jakub



More information about the Gcc-patches mailing list