чт, 5 дек. 2024 г. в 14:23, Georg-Johann Lay <a...@gjlay.de>: > > This is an addendum to the -msplit-ldst patch. > > When -msplit-ldst is on, it may be possible to propagate __zero_reg__ > to the sources of the new stores. For example, without this patch, > > unsigned long lx; > > void store_lsr17 (void) > { > lx >>= 17; > } > > compiles to: > > store_lsr17: > lds r26,lx+2 ; movqi_insn > lds r27,lx+3 ; movqi_insn > movw r24,r26 ; *movhi > lsr r25 ; *lshrhi3_const > ror r24 > ldi r26,0 ; movqi_insn > ldi r27,0 ; movqi_insn > sts lx,r24 ; movqi_insn > sts lx+1,r25 ; movqi_insn > sts lx+2,r26 ; movqi_insn > sts lx+3,r27 ; movqi_insn > ret > > but with this patch it becomes: > > store_lsr17: > lds r26,lx+2 ; movqi_insn > lds r27,lx+3 ; movqi_insn > movw r24,r26 ; *movhi > lsr r25 ; *lshrhi3_const > ror r24 > sts lx,r24 ; movqi_insn > sts lx+1,r25 ; movqi_insn > sts lx+2,__zero_reg__ ; movqi_insn > sts lx+3,__zero_reg__ ; movqi_insn > ret > > Ok for trunk? >
Ok. Denis