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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=115881
           Keywords|                            |ice-on-valid-code
          Component|rtl-optimization            |tree-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-07-18
   Target Milestone|---                         |15.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
trying to combine definition of r41 in:
    6: {r13:DI=sp:DI+0xc;clobber flags:CC;}
      REG_EQUIV frame:DI-0x4
into:
   58: bp:SI=r13:SI
successfully matched this instruction to *leasi:
(set (reg:SI 6 bp [orig:105 ivtmp.22D.2815 ] [105])
    (plus:SI (subreg:SI (reg/f:DI 7 sp) 0)
        (const_int 12 [0xc])))

(which is similar to PR 115881)

BUT BUT ivopts does:

  _30 = (unsigned int) &hdr;
  ivtmp.22_24 = -_30;

which does not make sense.

So I think this is a bug in IV_OPTs in the first place.

Though we should not ICE here either.

Note the original code didn't have the undefinedness that the reduced code has
with respect to the reading past the element size.

Reply via email to