[Bug other/60486] [avr] missed optimization on detecting zero flag set
gjl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 10 17:24:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60486
--- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Here is a smaller test case with similar artifact (insn #7):
extern void foo (unsigned);
char v;
void pr_60486 (unsigned z)
{
if (--z == 0)
v = 0;
foo (z);
}
pr_60486:
sbiw r24,1 ; 6 addhi3_clobber/1 [length = 1]
sbiw r24,0 ; 7 *cmphi/1 [length = 1]
brne .L9 ; 8 branch [length = 1]
sts v,__zero_reg__ ; 10 movqi_insn/3 [length = 2]
.L9:
rjmp foo ; 14 call_insn/4 [length = 1]
More information about the Gcc-bugs
mailing list