This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Better info for combine results in worse code generated


On Thu, May 28, 2015 at 11:13 AM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, May 28, 2015 at 10:47:53AM -0400, David Edelsohn wrote:
>> This seems like a problem with the cost model.  Rc instructions are
>> more expensive and should be represented as such in rtx_costs.
>
> The record instructions do have a higher cost (8 vs. 4 for normal
> insns).  If the cost is increaed I don't think you'll see them
> generated at all, which would fix my testcase but probably regress
> others.

It still seems to be a cost issue.  You and I "know" that "andi." is
more "expensive" in this context.  Somehow we need to teach GCC that
the instruction is "expensive" in this situation but useful in others.
I'm not sure that we want to inhibit GCC combine from making the
transformation for other reasons because it otherwise is correct.

Thanks, David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]