diff options
author | Andreas Schwab <schwab@issan.cs.uni-dortmund.de> | 1998-12-30 21:51:53 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-12-30 14:51:53 -0700 |
commit | 2c74fb2bf089989bff9918b995397df004a4c406 (patch) | |
tree | 880f03b2c51711302c749758efcf3185e2a2341c /gcc/loop.c | |
parent | ff381587ecb48a6d844d87d0d22399da71716b56 (diff) | |
download | gcc-2c74fb2bf089989bff9918b995397df004a4c406.zip gcc-2c74fb2bf089989bff9918b995397df004a4c406.tar.gz gcc-2c74fb2bf089989bff9918b995397df004a4c406.tar.bz2 |
loop.c (check_dbra_loop): While reversing the loop...
* loop.c (check_dbra_loop): While reversing the loop, if the
comparison value has a VOID mode use the mode of the other operand
to compute the mask.
From-SVN: r24444
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -6857,8 +6857,12 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info) add_val = INTVAL (bl->biv->add_val); comparison_value = XEXP (comparison, 1); - comparison_const_width - = GET_MODE_BITSIZE (GET_MODE (XEXP (comparison, 1))); + if (GET_MODE (comparison_value) == VOIDmode) + comparison_const_width + = GET_MODE_BITSIZE (GET_MODE (XEXP (comparison, 0))); + else + comparison_const_width + = GET_MODE_BITSIZE (GET_MODE (comparison_value)); if (comparison_const_width > HOST_BITS_PER_WIDE_INT) comparison_const_width = HOST_BITS_PER_WIDE_INT; comparison_sign_mask |