From 9f106823dcb9c4a463c50c912695f66325fb9a46 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Wed, 6 Jun 2007 14:12:32 +0200 Subject: re PR tree-optimization/32216 (ICE: verify_stmts failed (invalid reference prefix) with -ftree-vectorize) 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. From-SVN: r125482 --- gcc/tree-vect-generic.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gcc/tree-vect-generic.c') diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index e955c44..8c0bbd5 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) -- cgit v1.1