This is the mail archive of the
mailing list for the GCC project.
Re: [PR80693] drop value of parallel SETs dropped by combine
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 22 Jun 2017 11:04:28 -0500
- Subject: Re: [PR80693] drop value of parallel SETs dropped by combine
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org> <20170608195013.GL19687@gate.crashing.org> <email@example.com>
On Thu, Jun 22, 2017 at 03:21:01AM -0300, Alexandre Oliva wrote:
> On Jun 8, 2017, Segher Boessenkool <firstname.lastname@example.org> wrote:
> > [ I missed this patch the first time around; please cc: me to prevent this ]
> > On Thu, May 18, 2017 at 07:25:57AM -0300, Alexandre Oliva wrote:
> >> When an insn used by combine has multiple SETs, only the non-REG_UNUSED
> >> set is used: others will end up dropped on the floor.
> > Sometimes, yes; not always.
> You mean sets to non-REGs, I suppose. I didn't take them into account
> in my statement indeed, but I think it still applies: can_combine_p will
> reject parallel SETs if two or more of them don't have a REG_UNUSED note
> for their respective SET_DESTs.
can_combine_p is not called for I3; it also isn't called until after
I2 is split, if that happens.
It is fairly normal for an I3 with two SETs to have both survive in the
combined insn, even if one is unused. (And this is a good thing! The
insn with one SET removed might not exist. OTOH, if we can remove one
of the SETs we probably should; we don't try that currently, if the
"full" instruction is recognised.)