This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH PR62151]Fix uninitialized register issue caused by distribute_notes in combine pass
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: "Bin.Cheng" <amker dot cheng at gmail dot com>, Richard Earnshaw <rearnsha at arm dot com>, Bin Cheng <bin dot cheng at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 2 Sep 2014 06:50:17 -0500
- Subject: Re: [PATCH PR62151]Fix uninitialized register issue caused by distribute_notes in combine pass
- Authentication-results: sourceware.org; auth=none
- References: <000a01cfc1de$cac1c230$60454690$ at arm dot com> <53FDB440 dot 5030904 at arm dot com> <CAHFci28BS75pySKVtLTeY8BQsYupJHvXs73ZdYq1RkfHLbXocQ at mail dot gmail dot com> <5401680D dot 60907 at redhat dot com> <20140831121844 dot GA8949 at gate dot crashing dot org> <5404A1C7 dot 4060304 at redhat dot com> <20140901191555 dot GB6643 at gate dot crashing dot org> <54053949 dot 5090800 at redhat dot com>
On Mon, Sep 01, 2014 at 09:28:09PM -0600, Jeff Law wrote:
> >Note that in this case we're talking about a hard register, not a pseudo.
> I was referring to r84 in Bin's message, not the condition code
> register. Unless I missed something it's set at the start of the
> sequence to the value 0, then later to -ltu(flags,cc,0).
Bin said that the three-insn combination is refused because of the flags
register, not r84. So either the four-insn combination should do those
same checks, or we should allow it, or both.
> There's no good reason I can see why we're reusing a pseudo like that.
> I suspect that if we go back, fix whatever's creating that lame sequence
> and simply reject combinations involving a pseudo set more than once it
> won't affect code in any real way. If we wanted to be anal about it,
> we'd put in some kind of debugging note and someone could do some wider
> scale testing.
All that, too :-) Although it all seems to work fine for two-insn and
three-insn combinations.
Segher