On 16/07/15 19:28, Segher Boessenkool wrote:
On Thu, Jul 16, 2015 at 07:17:54PM +0100, Kyrill Tkachov wrote:
If you always want to simplify first, does it work to move this whole big
block behind the simplify just following it?  Or do you want to simplify
after the transform as well?
You mean move this hunk outside the "if (BINARY_P (x)...)" block it's in?
I think it would work, but I'm not sure if it would affect other cases.
I was also conscious that simplify_rtx might not be a cheap function to call
so frequently (or is it? I didn't profile it), so I tried to avoid calling
it unless I need for the transformation in question here.
I mean move the whole "if (BINARY_P ..." block to after the existing
simplify calls, to just before the "First see if we can apply" comment,
and not do a new simplify_rtx call at all.  Does that work?

Yes, it does the transformation I want :) if it's combined (pardon the pun)
with the simplify-rtx.c patch at 
https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01433.html


Which brings the question why it wasn't there in the first place, hrm.

Dunno, I'll test this approach more thoroughly tomorrow, check the impact on
some codebases and propose a patch if it all works out.

Thanks for the help,
Kyrill



Segher


Reply via email to