Commit ad9df12f by Igor Shevlyakov Committed by Richard Henderson

combine.c (simplify_shift_const): Calculate rotate count correctly for vector operands.

        * combine.c (simplify_shift_const): Calculate rotate count
        correctly for vector operands.

From-SVN: r56928
parent 54c93c30
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.
......
......@@ -9046,7 +9046,14 @@ simplify_shift_const (x, code, result_mode, varop, orig_count)
/* 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment