* combine.c (simplify_shift_const): Calculate rotate count
correctly for vector operands.
From-SVN: r56928
+2002-09-07 Igor Shevlyakov <igor@microunity.com>
+
+ * combine.c (simplify_shift_const): Calculate rotate count
+ correctly for vector operands.
+
2002-09-07 Ansgar Esztermann <ansgar@thphy.uni-duesseldorf.de>
* c-typeck.c (c_tree_expr_nonnegative_p): New function.
/* Convert ROTATERT to ROTATE. */
if (code == ROTATERT)
- code = ROTATE, count = GET_MODE_BITSIZE (result_mode) - count;
+ {
+ unsigned int bitsize = GET_MODE_BITSIZE (result_mode);;
+ code = ROTATE;
+ if (VECTOR_MODE_P (result_mode))
+ count = bitsize / GET_MODE_NUNITS (result_mode) - count;
+ else
+ count = bitsize - count;
+ }
/* We need to determine what mode we will do the shift in. If the
shift is a right shift or a ROTATE, we must always do it in the mode