[Bug tree-optimization/118679] Missed optimization: inline functions, when operations can be done with smaller bit width

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 21 07:30:41 GMT 2025


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |easyhack

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
interesting for -Os for aarch64 we get:
```
  _1 = (long unsigned int) a_3(D);
  _2 = (long unsigned int) b_4(D);
  _8 = .SAT_SUB (_1, _2);
  _7 = (uint32_t) _8;
```
Which can be optimized to just `.SAT_SUB (a_3(D), b_4(D))`.


More information about the Gcc-bugs mailing list