This is the mail archive of the
mailing list for the GCC project.
Re: RTL CSE picking simpler but more expensive expressions (re: PR 65932)
- From: Jeff Law <law at redhat dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Cc: Jim Wilson <jim dot wilson at linaro dot org>
- Date: Thu, 14 Jan 2016 10:20:37 -0700
- Subject: Re: RTL CSE picking simpler but more expensive expressions (re: PR 65932)
- Authentication-results: sourceware.org; auth=none
- References: <569635F2 dot 7030406 at foss dot arm dot com> <5696A55D dot 3000409 at redhat dot com> <5697752C dot 9030500 at foss dot arm dot com>
On 01/14/2016 03:15 AM, Kyrill Tkachov wrote:
There are cases where calls to fold_rtx with a non-NULL insn don't
end up modifying src, ending up in src to not be always equal to
src_folded (I added an assert to that effect and saw it trigger). It
seems that fold_rtx is not *guaranteed* to modify src if insn is
non-NULL, but it just does in many cases.
Right. That's roughly what I'd expect.
Alternately you could compute stuff for "SRC" prior to the call to
fold_rtx. It's less likely to have unexpected side effects.
My inclination would be to go with changing INSN to NULL though. It
seems to match the overall intent here better.
I agree and, as I said, I saw no impact on codegen for all of
SPEC2006 on arm. It just improved the testcase I described above.
I'll evaluate this patch on aarch64 and x86_64 and hopefully it has a
low impact there as well.