aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-vect-generic.c')
-rw-r--r--gcc/tree-vect-generic.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index b1e567a..d1ac94f 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -411,9 +411,15 @@ expand_vector_operations_1 (block_stmt_iterator *bsi)
gcc_assert (code != CONVERT_EXPR);
op = optab_for_tree_code (code, type);
- /* For widening vector operations, the relevant type is of the arguments,
- not the widened result. */
- if (code == WIDEN_SUM_EXPR)
+ /* For widening/narrowgin vector operations, the relevant type is of the
+ arguments, not the widened result. */
+ if (code == WIDEN_SUM_EXPR
+ || code == VEC_WIDEN_MULT_HI_EXPR
+ || code == VEC_WIDEN_MULT_LO_EXPR
+ || code == VEC_UNPACK_HI_EXPR
+ || code == VEC_UNPACK_LO_EXPR
+ || code == VEC_PACK_MOD_EXPR
+ || code == VEC_PACK_SAT_EXPR)
type = TREE_TYPE (TREE_OPERAND (rhs, 0));
/* Optabs will try converting a negation into a subtraction, so