[Bug middle-end/122871] [13/14/15/16 Regression] de-optimized synthesis of long long shift and add

roger at nextmovesoftware dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 16 21:33:54 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122871

Roger Sayle <roger at nextmovesoftware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at nextmovesoftware dot com

--- Comment #9 from Roger Sayle <roger at nextmovesoftware dot com> ---
Created attachment 63946
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63946&action=edit
proposed patch

Here's my version of a patch, to both enhance synth_mult to correctly cost
double word shifts by a constant greater than or equal to BITS_PER_WORD (but
necessarily less than 2*BITS_PER_WORD), and to tweak optabs.cc's
expand_doubleword_mult to improve initial RTL generation during expand, e.g.
avoiding emitting multiply instructions by the immediate constant 1 [which
addresses Andrew's observations in comment #2].  As always it would be good to
get some additional tesing...


More information about the Gcc-bugs mailing list