Re: [PATCH] opcodes: fix wrong code in expand_binop_directly [PR117811]

2025-04-05 Thread Christophe Lyon
On Fri, 21 Mar 2025 at 11:39, Richard Biener wrote: > > On Fri, 21 Mar 2025, Richard Earnshaw wrote: > > > If expand_binop_directly fails to add a REG_EQUAL note it tries to > > unwind and restart. But it can unwind too far if expand_binop changed > > some of the operands before calling it. We d

Re: [PATCH] opcodes: fix wrong code in expand_binop_directly [PR117811]

2025-03-21 Thread Andrew Pinski
On Fri, Mar 21, 2025 at 2:51 AM Richard Earnshaw wrote: > > If expand_binop_directly fails to add a REG_EQUAL note it tries to > unwind and restart. But it can unwind too far if expand_binop changed > some of the operands before calling it. We don't need to unwind that > far anyway since we shou

Re: [PATCH] opcodes: fix wrong code in expand_binop_directly [PR117811]

2025-03-21 Thread Richard Biener
On Fri, 21 Mar 2025, Richard Earnshaw wrote: > If expand_binop_directly fails to add a REG_EQUAL note it tries to > unwind and restart. But it can unwind too far if expand_binop changed > some of the operands before calling it. We don't need to unwind that > far anyway since we should end up tak

[PATCH] opcodes: fix wrong code in expand_binop_directly [PR117811]

2025-03-21 Thread Richard Earnshaw
If expand_binop_directly fails to add a REG_EQUAL note it tries to unwind and restart. But it can unwind too far if expand_binop changed some of the operands before calling it. We don't need to unwind that far anyway since we should end up taking exactly the same route next time, just without a t