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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Target Milestone|---                         |14.4
             Target|                            |aarch64, x86_64 riscv64
      Known to work|13.4.0                      |
      Known to fail|14.1.0, 14.2.0, 14.3.0,     |
                   |15.1.0, 15.2.0              |
           Keywords|                            |ra
   Last reconfirmed|                            |2025-12-08
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. for GCC 14, it seems like the RA is pulling in the copy into the
loop.

For GCC 15+ late_combine moves the copy from outside into the loop and we get:
```
(insn 23 20 24 3 (set (reg:CC 66 cc)
        (compare:CC (reg/f:DI 64 sfp)
            (reg:DI 102 [ ivtmp.32 ]))) 406 {cmpdi}
     (nil))
```

And then sfp is translated to `sp+N` which then gets reloaded and never pulled
out of the loop again.

Reply via email to