]> gcc.gnu.org Git - gcc.git/commitdiff
loop.c (check_dbra_loop): Make sure initial value is a CONST_INT before trying to...
authorJeffrey A Law <law@cygnus.com>
Wed, 14 Jan 1998 00:24:33 +0000 (00:24 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 14 Jan 1998 00:24:33 +0000 (17:24 -0700)
* loop.c (check_dbra_loop): Make sure initial value is a
CONST_INT before trying to normalize it.

From-SVN: r17352

gcc/ChangeLog
gcc/loop.c

index 6483c61f2fb24ef5b87d693f7aea441da8eeb96d..6cf26de5b15f832572dfcf33f92a73ee1cbbcbbe 100644 (file)
@@ -1,3 +1,8 @@
+Wed Jan 14 01:26:05 1998  Jeffrey A Law  (law@cygnus.com)
+
+       * loop.c (check_dbra_loop): Make sure initial value is a 
+       CONST_INT before trying to normalize it.
+
 Tue Jan 13 23:27:54 1998  Robert Lipe   (robertl@dgii.com)
 
        * sco5.h (ASM_OUTPUT_SECTION_NAME): Refresh from ../svr4.h.
index a26c04ac995facfaec1eef2741cfa305a4a09e85..a3f276e2eec08c2a9859d3df2583f40f20a5c72b 100644 (file)
@@ -6214,10 +6214,11 @@ check_dbra_loop (loop_end, insn_count, loop_start)
              comparison_val = INTVAL (XEXP (comparison, 1));
              initial_value = bl->initial_value;
                
-             /* Normalize the initial value if it has no other use
-                except as a counter.  This will allow a few more loops
-                to be reversed.  */
-             if (no_use_except_counting)
+             /* Normalize the initial value if it is an integer and 
+                has no other use except as a counter.  This will allow
+                a few more loops to be reversed.  */
+             if (no_use_except_counting
+                 && GET_CODE (initial_value) == CONST_INT)
                {
                  comparison_val = comparison_val - INTVAL (bl->initial_value);
                  initial_value = const0_rtx;
This page took 0.070727 seconds and 5 git commands to generate.