tree-complex.c (expand_vector_operations_1): Do not build VIEW_CONVERT_EXPR's for...
authorPaolo Bonzini <bonzini@gnu.org>
Wed, 27 Apr 2005 16:50:19 +0000 (16:50 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Wed, 27 Apr 2005 16:50:19 +0000 (16:50 +0000)
2005-04-27  Paolo Bonzini  <bonzini@gnu.org>

* tree-complex.c (expand_vector_operations_1): Do not build
VIEW_CONVERT_EXPR's for the lhs.

From-SVN: r98853

gcc/ChangeLog
gcc/tree-complex.c

index 01947cd55448485b1e311aa0b7b7bfc723b7b3a7..2f0dfcb6d9af2faf1d0952f6ed9d807f80ee4247 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-27  Paolo Bonzini  <bonzini@gnu.org>
+
+       * tree-complex.c (expand_vector_operations_1): Do not build
+       VIEW_CONVERT_EXPR's for the lhs.
+
 2005-04-27  Nathan Sidwell  <nathan@codesourcery.com>
 
        * config/pa/pa.h (PRINT_OPERAND_ADDRESS): Use gcc_assert, remove
index 98b6c561503bffb83b3b243e919cd584ee1a79ad..97951d0be958d07a450084132a102412b58204ee 100644 (file)
@@ -980,10 +980,11 @@ expand_vector_operations_1 (block_stmt_iterator *bsi)
   else
     {
       /* Build a conversion; VIEW_CONVERT_EXPR is very expensive unless T will
-         be stored in memory anyway, so prefer NOP_EXPR.  Also, perform the
-        VIEW_CONVERT_EXPR on the left side of the assignment.  */
+         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_lhs = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (rhs), lhs);
+        *p_rhs = gimplify_build1 (bsi, VIEW_CONVERT_EXPR, TREE_TYPE (lhs), rhs);
       else
        *p_rhs = gimplify_build1 (bsi, NOP_EXPR, TREE_TYPE (lhs), rhs);
     }