https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116926
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So the problem with r15-4317 is that setting limit_mode == from_mode means there would be no searching for an optab since `FOR_EACH_MODE (from_mode, from_mode, limit_mode)` means search from from_mode to limit_mode but NOT include the limit_mode. Patch which seems to fix this, will write up a commit message in a little bit: ``` diff --git a/gcc/optabs-query.cc b/gcc/optabs-query.cc index 65eeb5d8e51..144619bcd86 100644 --- a/gcc/optabs-query.cc +++ b/gcc/optabs-query.cc @@ -492,7 +492,10 @@ find_widening_optab_handler_and_mode (optab op, machine_mode to_mode, { gcc_checking_assert (VECTOR_MODE_P (from_mode) && GET_MODE_INNER (from_mode) < to_mode); - limit_mode = from_mode; + enum insn_code handler = convert_optab_handler (op, to_mode, from_mode); + if (found_mode) + *found_mode = from_mode; + return handler; } else gcc_checking_assert (GET_MODE_CLASS (from_mode) == GET_MODE_CLASS (to_mode) ```