This is the mail archive of the
mailing list for the GCC project.
Re: Better info for combine results in worse code generated
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Date: Thu, 28 May 2015 13:11:20 -0400
- Subject: Re: Better info for combine results in worse code generated
- Authentication-results: sourceware.org; auth=none
- References: <20150528143941 dot GL14752 at bubble dot grove dot modra dot org> <CAGWvnyk9E7HE6SY0R9dZz-H5TQRqV3jTDWB7oGHmk+axo4L4Ew at mail dot gmail dot com> <20150528151349 dot GM14752 at bubble dot grove dot modra dot org>
On Thu, May 28, 2015 at 11:13 AM, Alan Modra <firstname.lastname@example.org> 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
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.