[Bug tree-optimization/122186] single_use is too much on some match patterns

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 7 07:43:45 GMT 2025


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2025-10-07

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's often used for SSA coalescing / RTL combine / register pressure / VRP
reasons.  I agree it's a hack that's not applied consistently.

In this case using :s on the pointer_plus would be a no-op since
(op @1 CST) is considered "simple" even when it possibly increases
the lifetime of @1.

Note even :s is imperfect as it does not consider other folding candidates
when forwprop folds all stmts and it also is prone to be confused by code
made dead by other foldings but not yet removed.


More information about the Gcc-bugs mailing list