On Sun, Aug 8, 2021 at 1:40 PM Roger Sayle <ro...@nextmovesoftware.com> wrote: > > > Doh! ENOPATCH. This time with attachments... > https://gcc.gnu.org/pipermail/gcc-patches/2021-August/576922.html
Note I was originally suggesting to perform the matching on GIMPLE but only in one of the "instruction selection passes". There's pass_optimize_widening_mul at -O1+ (but not -Og) and there's pass_gimple_isel at all optimization levels. The advantage of those would be cases where TER leaves you with no get_def_for_expr because of multiple uses or uses across calls, etc. So while I think the patch is technically OK it works in a somewhat backward direction from the intent to simplify the RTL expansion process and make its "tricks" more general and visible on GIMPLE prior to going out of SSA. Richard. > Roger > -- >