From: Ulrich Weigand Date: Fri, 28 Mar 2014 12:42:40 +0000 (+0000) Subject: rs6000.c (fusion_gpr_load_p): Refuse optimization if it would clobber the stack point... X-Git-Tag: upstream/12.2.0~64070 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd302a183af5190fb504174099a9085c3859bc93;p=platform%2Fupstream%2Fgcc.git rs6000.c (fusion_gpr_load_p): Refuse optimization if it would clobber the stack pointer, even temporarily. * config/rs6000/rs6000.c (fusion_gpr_load_p): Refuse optimization if it would clobber the stack pointer, even temporarily. From-SVN: r208895 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index faca258..82f387c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-03-28 Ulrich Weigand + + * config/rs6000/rs6000.c (fusion_gpr_load_p): Refuse optimization + if it would clobber the stack pointer, even temporarily. + 2014-03-28 Eric Botcazou * mode-switching.c: Make small adjustments to the top comment. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index cd85257..d9606a1 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -32523,6 +32523,11 @@ fusion_gpr_load_p (rtx *operands, bool peep2_p) if (!peep2_reg_dead_p (2, addis_reg)) return false; + + /* If the target register being loaded is the stack pointer, we must + avoid loading any other value into it, even temporarily. */ + if (REG_P (target) && REGNO (target) == STACK_POINTER_REGNUM) + return false; } base_reg = XEXP (addr, 0);