On 05/11/2016 02:52 AM, Dominik Vogt wrote:
On Wed, May 11, 2016 at 10:40:11AM +0200, Bernd Schmidt wrote:
On 05/11/2016 09:42 AM, Dominik Vogt wrote:
On Tue, May 10, 2016 at 05:05:06PM +0200, Bernd Schmidt wrote:
Earlier in the discussion you mentioned the intention to remove
these costs. Nothing else in the function does cost calculations -
maybe you can try placing a gcc_unreachable into the case where the
costs would prevent the transformation to see if it ever triggers.
You mean to try it out locally or as part of the patch?
I meant try it out locally. I'm almost certain the patch shouldn't
be trying to use costs here.
That's what I mentioned somewhere during the discussion. The s390
backend just uses COSTS_N_INSNS(1) for AND as well as ZERO_EXTEND,
so this won't ever trigger. I just left the rtx_cost call in the
patch for further discussion as Jeff said he liked the approach.
We don't need it to achieve the behaviour we want for s390.
I liked it, just based on the general theory that we should be comparing
costs of a transform to the original much more often than we currently do.
If Bernd prefers it gone and you don't need it to achieve your goals,
then I won't object to the costing stuff going away.
jeff