summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-generic.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 12:12:32 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 12:12:32 +0000
commitbb6c9541e9d3949965c0c89074754a14a8823983 (patch)
treede9849634b1b7fa1d9a2c6099d590044f0aa8c3a /gcc/tree-vect-generic.c
parentb852d3a09892a4681d07a34043d674621f2080f0 (diff)
downloadgcc-bb6c9541e9d3949965c0c89074754a14a8823983.tar.gz
PR tree-optimization/32216
* tree-vectorizer.c (supportable_widening_operation): Determine signedness of FIX_TRUNC_EXPR from output operand. (supportable_narrowing_operation): Ditto. * tree-vect-generic.c (expand_vector_operations_1): Determine signedness of VEC_UNPACK_FLOAT_HI_EXPR and VEC_UNPACK_FLOAT_LO_EXPR from input operand. testsuite/ChangeLog: PR tree-optimization/32216 * gcc.dg/vect/pr32216.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125482 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-generic.c')
-rw-r--r--gcc/tree-vect-generic.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index e955c44743c..8c0bbd556fa 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -412,17 +412,22 @@ expand_vector_operations_1 (block_stmt_iterator *bsi)
return;
gcc_assert (code != CONVERT_EXPR);
+
+ /* The signedness is determined from input argument. */
+ if (code == VEC_UNPACK_FLOAT_HI_EXPR
+ || code == VEC_UNPACK_FLOAT_LO_EXPR)
+ type = TREE_TYPE (TREE_OPERAND (rhs, 0));
+
op = optab_for_tree_code (code, type);
/* For widening/narrowing vector operations, the relevant type is of the
- arguments, not the widened result. */
+ arguments, not the widened result. VEC_UNPACK_FLOAT_*_EXPR is
+ calculated in the same way above. */
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_UNPACK_FLOAT_HI_EXPR
- || code == VEC_UNPACK_FLOAT_LO_EXPR
|| code == VEC_PACK_TRUNC_EXPR
|| code == VEC_PACK_SAT_EXPR
|| code == VEC_PACK_FIX_TRUNC_EXPR)