Message ID | 6D39441BF12EF246A7ABCE6654B0235380B5CE93@hhmail02.hh.imgtec.org |
---|---|
State | New |
Headers | show |
On 02/07/2017 09:08 AM, Matthew Fortune wrote: > Hi, > > This patch partially reverts r243782 where a return false was added > expecting it to be a no-op. Detailed inspection shows this was not > true. Despite no bug being identified following the change, removing > the early return is likely to be safer than leaving it in place. > > This is supported by the discussion here: > https://gcc.gnu.org/ml/gcc/2017-02/msg00007.html > OK for the trunk. Matt, thank you very much for efforts to clean simplify_operand_subreg up. > gcc/ > * lra-constraints.c (simplify_operand_subreg): Remove early > return false. > --- > gcc/lra-constraints.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c > index 484a70d..0b7ae34 100644 > --- a/gcc/lra-constraints.c > +++ b/gcc/lra-constraints.c > @@ -1607,7 +1607,8 @@ simplify_operand_subreg (int nop, machine_mode reg_mode) > the memory. Typical case is when the index scale should > correspond the memory. */ > *curr_id->operand_loc[nop] = operand; > - return false; > + /* Do not return false here as the MEM_P (reg) will be processed > + later in this function. */ > } > else if (REG_P (reg) && REGNO (reg) < FIRST_PSEUDO_REGISTER) > {
Vladimir Makarov <vmakarov@redhat.com> writes: > On 02/07/2017 09:08 AM, Matthew Fortune wrote: > > Hi, > > > > This patch partially reverts r243782 where a return false was added > > expecting it to be a no-op. Detailed inspection shows this was not > > true. Despite no bug being identified following the change, removing > > the early return is likely to be safer than leaving it in place. > > > > This is supported by the discussion here: > > https://gcc.gnu.org/ml/gcc/2017-02/msg00007.html > > > OK for the trunk. Matt, thank you very much for efforts to clean > simplify_operand_subreg up. Committed as r245600. Thanks, Matthew
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 484a70d..0b7ae34 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -1607,7 +1607,8 @@ simplify_operand_subreg (int nop, machine_mode reg_mode) the memory. Typical case is when the index scale should correspond the memory. */ *curr_id->operand_loc[nop] = operand; - return false; + /* Do not return false here as the MEM_P (reg) will be processed + later in this function. */ } else if (REG_P (reg) && REGNO (reg) < FIRST_PSEUDO_REGISTER) {