From: Kyrylo Tkachov Date: Wed, 2 Oct 2013 10:05:43 +0000 (+0000) Subject: arm.c (arm_legitimize_reload_address): Explain why plus_constant is not used. X-Git-Tag: releases/gcc-4.9.0~3763 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ebfcd719cf1ca5c186befb9ea013add7342b1cb2;p=thirdparty%2Fgcc.git arm.c (arm_legitimize_reload_address): Explain why plus_constant is not used. 2013-10-02 Kyrylo Tkachov * config/arm/arm.c (arm_legitimize_reload_address): Explain why plus_constant is not used. From-SVN: r203106 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e0b30a373eba..7dc504bbf3b0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-10-02 Kyrylo Tkachov + + * config/arm/arm.c (arm_legitimize_reload_address): Explain why + plus_constant is not used. + 2013-10-01 Wei Mi * config/i386/x86-tune.def (DEF_TUNE): Remove diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index cc3eec767aed..f0a7deae67d1 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -7015,7 +7015,11 @@ arm_legitimize_reload_address (rtx *p, return false; /* Reload the high part into a base reg; leave the low part - in the mem. */ + in the mem. + Note that replacing this gen_rtx_PLUS with plus_constant is + wrong in this case because we rely on the + (plus (plus reg c1) c2) structure being preserved so that + XEXP (*p, 0) in push_reload below uses the correct term. */ *p = gen_rtx_PLUS (GET_MODE (*p), gen_rtx_PLUS (GET_MODE (*p), XEXP (*p, 0), GEN_INT (high)),