aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@issan.cs.uni-dortmund.de>1998-12-30 21:51:53 +0000
committerJeff Law <law@cygnus.com>1998-12-30 21:51:53 +0000
commite625c6e93e42f305275b9bb84d7007f4d2b2df51 (patch)
tree880f03b2c51711302c749758efcf3185e2a2341c
parentc8bbaff7285609603732fa316bdf4b2e1171cc33 (diff)
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@24444 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/loop.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9f2789645e2..015af043b58 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+1998-12-30 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * 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.
+
Wed Dec 30 22:24:00 1998 Michael Meissner <meissner@cygnus.com>
* rs6000.md ({save,restore}_stack_function): Take 2 operands to
diff --git a/gcc/loop.c b/gcc/loop.c
index 082fc817060..f1cdd033185 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -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