2011/11/21 Georg-Johann Lay <a...@gjlay.de>: > After updating my local copy I get new runtime FAILs in the test suite because > of the following sequence, e.g. from gcc.c-torture/execute/990527-1.c: > > sbiw r28,1 ; 12 addhi3_clobber/1 [length = 1] > ldi r24,lo8(9) ; 24 *movhi/5 [length = 2] > clr r25 > brne .L3 ; 16 branch [length = 1] > > The trouble is that *movhi promises that it does not change cc0. Thus, the > correct code is: > > sbiw r28,1 ; 12 addhi3_clobber/1 [length = 1] > ldi r24,lo8(9) ; 24 *movhi/5 [length = 2] > ldi r25,0 > brne .L3 ; 16 branch [length = 1] > > The patch fixes this and adjusts cc attribute of involved insns. > > When loading 0, cc=none is more useful than cc=set_zn because the compiler > knows what it loads, and cc=none preserves cc0 from preceding code. > > Tests pass fine again. > > Ok to apply? > > Johann > > * config/avr/avr.c (output_reload_in_const): Loading a byte with 0 > must not affect cc0. > * config/avr/avr.md (*movhi, *movpsi, *movsi, *movsf): Zero to any > register does not change cc0. Same for any constant to ld-register. > >
Approved. Denis.