diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0f928024530..1534d479c30 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-09-05 Georg-Johann Lay + + PR target/50289 + * config/avr/avr.c (sequent_regs_live): Don't recognize sequences + that contain global register variable. + 2011-09-05 Richard Guenther * tree-cfg.c (replace_uses_by): Use fold_stmt, not fold_stmt_inplace. diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index d267ef00901..f158cddefe9 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -522,6 +522,17 @@ sequent_regs_live (void) for (reg = 0; reg < 18; ++reg) { + if (fixed_regs[reg]) + { + /* Don't recognize sequences that contain global register + variables. */ + + if (live_seq != 0) + return 0; + else + continue; + } + if (!call_used_regs[reg]) { if (df_regs_ever_live_p (reg))