diff options
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r-- | gcc/tree-vect-slp.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index c142bbb0201..0ab6be0671a 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -2337,8 +2337,23 @@ vect_get_constant_vectors (tree op, slp_tree slp_node, op = gimple_call_arg (stmt, op_num); break; + case LSHIFT_EXPR: + case RSHIFT_EXPR: + case LROTATE_EXPR: + case RROTATE_EXPR: + op = gimple_op (stmt, op_num + 1); + /* Unlike the other binary operators, shifts/rotates have + the shift count being int, instead of the same type as + the lhs, so make sure the scalar is the right type if + we are dealing with vectors of + long long/long/short/char. */ + if (op_num == 1 && constant_p) + op = fold_convert (TREE_TYPE (vector_type), op); + break; + default: op = gimple_op (stmt, op_num + 1); + break; } } |