This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] regcprop fix for PR rtl-optimization/54300
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 19 Nov 2013 17:22:55 +0000
- Subject: Re: [patch] regcprop fix for PR rtl-optimization/54300
- Authentication-results: sourceware.org; auth=none
- References: <528B9527 dot 2050800 at arm dot com> <CABu31nOddrxBhG3EyPxi=2scYm8xVLbC12NkSvJ8OmDDGOOvBA at mail dot gmail dot com>
On 19/11/13 17:17, Steven Bosscher wrote:
> On Tue, Nov 19, 2013 at 5:43 PM, Richard Earnshaw wrote:
>> PR 54300 is a problem in regcprop where the compiler sees
>> (parallel [(set (x) (y)
>> (set (y) (x)]) (REG_UNUSED (y))
>>
>> as a single-set insn (since the other operand, y, is not used) and
>> replaces a use of x with a use of y. However, it fails to take into
>> account that y has been clobbered in the insn itself.
>
> Ah, wait. Incorrect use of single_set().
>
> Try
> ------
> }
>
> - set = single_set (insn);
> + set = multiple_sets (insn) ? NULL_RTX : single_set (insn);
> extract_insn (insn);
> if (! constrain_operands (1))
> fatal_insn_not_found (insn);
> preprocess_constraints ();
> ------
>
> Ciao!
> Steven
>
That won't handle
parallel [ (set (x) (y))
(clobber (y))]
R.