diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2005-08-23 17:48:37 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2005-08-23 17:48:37 +0000 |
commit | 4d3c798d3f0b7a2e2ec4c577c8e549d915e4ab37 (patch) | |
tree | 4c0428b73658184eadcaa843efb1e394f6f5bb89 /gcc/tree-vect-generic.c | |
parent | 28d0e143fe4a942b5c29b087db18107664e0809f (diff) | |
download | gcc-4d3c798d3f0b7a2e2ec4c577c8e549d915e4ab37.zip gcc-4d3c798d3f0b7a2e2ec4c577c8e549d915e4ab37.tar.gz gcc-4d3c798d3f0b7a2e2ec4c577c8e549d915e4ab37.tar.bz2 |
re PR middle-end/23517 (can't cast between generic vector types and target supported vector types)
2005-08-23 Paolo Bonzini <bonzini@gnu.org>
PR middle-end/23517
* fold-const.c (fold_convert): Use VIEW_CONVERT_EXPR to convert
between vectors.
* convert.c (convert_to_integer, convert_to_vector): Likewise.
* tree-vect-generic.c (tree_vec_extract, expand_vector_operations_1):
Likewise.
From-SVN: r103406
Diffstat (limited to 'gcc/tree-vect-generic.c')
-rw-r--r-- | gcc/tree-vect-generic.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index f9c9fda..463b161 100644 --- a/gcc/tree-vect-generic.c +++ b/gcc/tree-vect-generic.c @@ -106,13 +106,8 @@ tree_vec_extract (block_stmt_iterator *bsi, tree type, { if (bitpos) return gimplify_build3 (bsi, BIT_FIELD_REF, type, t, bitsize, bitpos); - - /* Build a conversion; VIEW_CONVERT_EXPR is very expensive unless T will - anyway be stored in memory, so prefer NOP_EXPR. */ - else if (TYPE_MODE (type) == BLKmode) - return gimplify_build1 (bsi, VIEW_CONVERT_EXPR, type, t); else - return gimplify_build1 (bsi, NOP_EXPR, type, t); + return gimplify_build1 (bsi, VIEW_CONVERT_EXPR, type, t); } static tree @@ -455,16 +450,7 @@ expand_vector_operations_1 (block_stmt_iterator *bsi) if (lang_hooks.types_compatible_p (TREE_TYPE (lhs), TREE_TYPE (rhs))) *p_rhs = rhs; else - { - /* Build a conversion; VIEW_CONVERT_EXPR is very expensive unless T will - be stored in memory anyway, so prefer NOP_EXPR. We should also try - performing the VIEW_CONVERT_EXPR on the left side of the - assignment. */ - if (TYPE_MODE (TREE_TYPE (rhs)) == BLKmode) - *p_rhs = gimplify_build1 (bsi, VIEW_CONVERT_EXPR, TREE_TYPE (lhs), rhs); - else - *p_rhs = gimplify_build1 (bsi, NOP_EXPR, TREE_TYPE (lhs), rhs); - } + *p_rhs = gimplify_build1 (bsi, VIEW_CONVERT_EXPR, TREE_TYPE (lhs), rhs); mark_stmt_modified (bsi_stmt (*bsi)); } |