]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/54290 (wrong code at -O2 with large offset)
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 21 Sep 2012 11:06:51 +0000 (11:06 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 21 Sep 2012 11:06:51 +0000 (11:06 +0000)
PR rtl-optimization/54290
PR rtl-optimization/54644
* reload1.c (choose_reload_regs): Fix thinko in previous change.

From-SVN: r191609

gcc/ChangeLog
gcc/reload1.c

index de8d149cc445662cfbec824c0d7a8b2718b4df24..c077cebdee9fae7be90dcb5dab43261b3336f6ca 100644 (file)
@@ -1,3 +1,9 @@
+2012-09-21  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR rtl-optimization/54290
+       PR rtl-optimization/54644
+       * reload1.c (choose_reload_regs): Fix thinko in previous change.
+
 2012-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * config/rs6000/rs6000.md (define_split for plus_eqsi):
index 66ae8087d823569e711a6f999ad2633070fb555d..c4c1426b43aa63f67dd9eeb4a91520361c9bdb85 100644 (file)
@@ -6991,16 +6991,17 @@ choose_reload_regs (struct insn_chain *chain)
             If we succeeded removing some reload and we are doing a preliminary
             pass just to remove such reloads, make another pass, since the
             removal of one reload might allow us to inherit another one.  */
-         else if (pass
-                  && rld[r].in
+         else if (rld[r].in
                   && rld[r].out != rld[r].in
                   && remove_address_replacements (rld[r].in))
-           pass = 2;
+           {
+             if (pass)
+               pass = 2;
+           }
 #ifdef SECONDARY_MEMORY_NEEDED
          /* If we needed a memory location for the reload, we also have to
             remove its related reloads.  */
-         else if (pass
-                  && rld[r].in
+         else if (rld[r].in
                   && rld[r].out != rld[r].in
                   && (tem = replaced_subreg (rld[r].in), REG_P (tem))             
                   && REGNO (tem) < FIRST_PSEUDO_REGISTER
@@ -7009,7 +7010,10 @@ choose_reload_regs (struct insn_chain *chain)
                   && remove_address_replacements
                      (get_secondary_mem (tem, rld[r].inmode, rld[r].opnum,
                                          rld[r].when_needed)))
-           pass = 2;
+           {
+             if (pass)
+               pass = 2;
+           }
 #endif
        }
     }