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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-12-19
     Ever confirmed|0                           |1
            Version|unknown                     |15.0
          Component|tree-optimization           |ipa
             Status|UNCONFIRMED                 |NEW
            Summary|wrong code at -O3 with      |[15 Regression] wrong code
                   |"-fno-inline" on            |at -O3 with "-fno-inline"
                   |x86_64-linux-gnu            |on x86_64-linux-gnu
   Target Milestone|---                         |15.0
           Keywords|                            |wrong-code

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. The problem is in IPA-CP:
Propagated bits info for function h.constprop/6:
 param 0: value = 0xffffffff, mask = 0x0
Propagated bits info for function i.constprop/7:
 param 0: value = 0xfffffffffffffffffffffffffffffffffffffff...., mask = 0x0
Propagated bits info for function i/7:
 param 0: value = 0xfffffffffffffffffffffffffffffffffffffff...., mask = 0x0
Propagated bits info for function h/6:
 param 0: value = 0xffffffff, mask = 0x0


h (and h.constprop) are correct but i (and i.constprop) are incorrect. There
was a sign extend when it should have been a zero extend.

  Jump functions of caller  h/6:
    callsite  h/6 -> f/5 : 
       param 0: PASS THROUGH: 0, op nop_expr

Reply via email to