]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64.c (aarch64_legitimize_reload_address): Explain why plus_constant is not used.
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Thu, 7 Nov 2013 11:44:04 +0000 (11:44 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Thu, 7 Nov 2013 11:44:04 +0000 (11:44 +0000)
* config/aarch64/aarch64.c (aarch64_legitimize_reload_address):
Explain why plus_constant is not used.

From-SVN: r204507

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index 72dd1c2b3e215e92fd2ebd3d90b2f64427c947ce..77f1b32fdaac268da4483de1bb7970ed48c53f14 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       * config/aarch64/aarch64.c (aarch64_legitimize_reload_address):
+       Explain why plus_constant is not used.
+
 2013-11-07  Richard Biener  <rguenther@suse.de>
 
        * tree-ssa-ccp.c (canonicalize_float_value): Rename to ...
index 30c8eb008058d50f1f791753d36db760fba12d56..8458cac34f2f53e17a449cce2e2ced7943559460 100644 (file)
@@ -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));