https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67391

--- Comment #15 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Created attachment 36393
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36393&action=edit
Another trail, doesn't work with LRA

(In reply to Kazumoto Kojima from comment #14)
> Created attachment 36387 [details]
> a trial
> 
> Although a bit ugly, how about adding pattern using scratch reg?
> Does it get the original clrt+addc issue back again?

The clrt+addc sequence does not appear with this patch it seems.  There are
only a few +4/-4 code size changes in the CSiBE set.  So basically the patch
seems to work, but I think we should try to avoid it.

For example, with the attached patch (without LRA) I'm getting for CSiBE:
sum:  3345527 -> 3334307    -11220 / -0.335373 %

It seems the addsi3 pattern has a big influence on address calculations.  I
haven't done full testing of the patch though.  Compiling CSiBE with this patch
and LRA triggers various problems.  One is a segfault in LRA and another is
something in postreload.

I'm now trying to come up with something that is between your patch and my
patch to make it work with LRA.  However, somehow I think we are just
desperately wallpapering LRA deficits here.  It looks a bit fragile.  We should
try to avoid that if possible.

Reply via email to