]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm.c (arm_legitimize_reload_address): Explain why plus_constant is not used.
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 2 Oct 2013 10:05:43 +0000 (10:05 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Wed, 2 Oct 2013 10:05:43 +0000 (10:05 +0000)
2013-10-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* config/arm/arm.c (arm_legitimize_reload_address): Explain why
plus_constant is not used.

From-SVN: r203106

gcc/ChangeLog
gcc/config/arm/arm.c

index e0b30a373ebaf90061db128e937cb263dd337194..7dc504bbf3b0b4cc4ce35c9dbcda8a03b7474e65 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       * config/arm/arm.c (arm_legitimize_reload_address): Explain why
+       plus_constant is not used.
+
 2013-10-01  Wei Mi  <wmi@google.com>
 
        * config/i386/x86-tune.def (DEF_TUNE): Remove
index cc3eec767aed80562553d2c53e5ef64c5f4e6af8..f0a7deae67d1ea98c94b59036118a7047d6d7e4f 100644 (file)
@@ -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)),