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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|https://gcc.gnu.org/bugzill |
                   |a/show_bug.cgi?id=64331,    |
                   |https://gcc.gnu.org/bugzill |
                   |a/show_bug.cgi?id=99221     |
          Component|rtl-optimization            |target
            Summary|cprop_hardreg deletes an    |[avr] asm_out for movqi
                   |insns that's not dead       |insn doesn't restore
                   |                            |partially clobbered address
                   |                            |register

--- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
hmpf.  Target issue.

There are insn like

 ; (insn 512 511 513 (parallel [
 ;             (set (reg:QI 27 r27)
 ;                 (mem:QI (plus:HI (reg:HI 26 r26)
 ;                         (const_int 1 [0x1])) [1 MEM[(long long int *)_48]+1
S1 A8]))
 ;             (clobber (reg:CC 36 cc))
 ;         ]) "pr111683-1.c":15:44 89 {movqi_insn}
 ;      (expr_list:REG_UNUSED (reg:CC 36 cc)
 ;         (nil)))
        adiw r26,1
        ld r27,X

where the address overlaps the destination, and the asm printer thinks that an
overlap means that there's no need to restore the address.

(FYI, the removal from cprop_hardreg is correct because there is an identical
move at the top of the block).

Reply via email to