aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2013-11-07 11:44:04 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2013-11-07 11:44:04 +0000
commitacf67b8e7c649d35547d627cbc1a275f11d35fa7 (patch)
tree0ea72cf5820d538b1090730f6873e404c61aa46a /gcc/config
parent846abd0d6dd31c69c04d55623cd17151bf108dcc (diff)
downloadgcc-acf67b8e7c649d35547d627cbc1a275f11d35fa7.zip
gcc-acf67b8e7c649d35547d627cbc1a275f11d35fa7.tar.gz
gcc-acf67b8e7c649d35547d627cbc1a275f11d35fa7.tar.bz2
aarch64.c (aarch64_legitimize_reload_address): Explain why plus_constant is not used.
* config/aarch64/aarch64.c (aarch64_legitimize_reload_address): Explain why plus_constant is not used. From-SVN: r204507
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/aarch64/aarch64.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 30c8eb0..8458cac 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -4033,7 +4033,11 @@ aarch64_legitimize_reload_address (rtx *x_p,
cst = force_const_mem (xmode, cst);
/* Reload high part into base reg, leaving the low part
- in the mem instruction. */
+ in the mem instruction.
+ 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. */
x = gen_rtx_PLUS (xmode,
gen_rtx_PLUS (xmode, XEXP (x, 0), cst),
GEN_INT (low));