OSDN Git Service

PR c/21911
[pf3gnuchains/gcc-fork.git] / gcc / loop.c
index 868b052..5e85248 100644 (file)
@@ -17,8 +17,8 @@ for more details.
 
 You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.  */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA.  */
 
 /* This is the loop optimization pass of the compiler.
    It finds invariant computations within loops and moves them
@@ -1135,6 +1135,7 @@ scan_loop (struct loop *loop, int flags)
          if (! in_libcall
              && (set = single_set (p))
              && REG_P (SET_DEST (set))
+             && SET_DEST (set) != frame_pointer_rtx
 #ifdef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
              && SET_DEST (set) != pic_offset_table_rtx
 #endif
@@ -3645,8 +3646,7 @@ loop_invariant_p (const struct loop *loop, rtx x)
        return 1;
 
       if (LOOP_INFO (loop)->has_call
-         && REGNO (x) < FIRST_PSEUDO_REGISTER
-         && TEST_HARD_REG_BIT (regs_invalidated_by_call, REGNO (x)))
+         && REGNO (x) < FIRST_PSEUDO_REGISTER && call_used_regs[REGNO (x)])
        return 0;
 
       /* Out-of-range regs can occur when we are called from unrolling.
@@ -6720,8 +6720,7 @@ valid_initial_value_p (rtx x, rtx insn, int call_seen, rtx loop_start)
      some machines, don't use any hard registers at all.  */
   if (REGNO (x) < FIRST_PSEUDO_REGISTER
       && (SMALL_REGISTER_CLASSES
-         || (call_seen
-             && TEST_HARD_REG_BIT (regs_invalidated_by_call, REGNO (x)))))
+         || (call_seen && call_used_regs[REGNO (x)])))
     return 0;
 
   /* Don't use registers that have been clobbered before the start of the