mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-05 21:49:36 +08:00
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
This commit is contained in:
parent
54c93c3019
commit
ad9df12ff5
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user