From: Jeffrey A Law Date: Wed, 14 Jan 1998 00:24:33 +0000 (+0000) Subject: loop.c (check_dbra_loop): Make sure initial value is a CONST_INT before trying to... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8decb2c2b4be39f422c559227cc5bfccc438e60;p=gcc.git loop.c (check_dbra_loop): Make sure initial value is a CONST_INT before trying to normalize it. * loop.c (check_dbra_loop): Make sure initial value is a CONST_INT before trying to normalize it. From-SVN: r17352 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6483c61f2fb..6cf26de5b15 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/loop.c b/gcc/loop.c index a26c04ac995..a3f276e2eec 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -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;