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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=89317
           Keywords|needs-bisection             |
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2025-04-01

--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> Someone should do a bisect on this; note 13.1.0 is correctly working and the
> libstdc++ patch is there already. I suspect this is improved by the VRP work
> in GCC 13 and can't be backported to GCC 12.

Fixed by r13-4600 for Bug 89317

  tree-optimization/89317 - missed folding of (p + 4) - &p->d

  The PR notices we fail to simplify

    a_4 = &x_3(D)->data;
    b_5 = x_3(D) + 16;
    _1 = b_5 - a_4;

  together with the enabler handling ADDR_EXPR leafs in separate
  stmts in match.pd the suggested patterns work.

Reply via email to