This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Undo one optimization in the generic vector patch


It turns out that creating VIEW_CONVERT_EXPR's for the lhs causes several regressions on i686. Unfortunately these do not show up on the platform I tested, but they are easy enough to fix simply by not building the VIEW_CONVERT_EXPR's on the lhs, but on the rhs as before my patch at http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01163.html

I am committing this as a (partial) reversal of my patch.

Bootstrapped/regtested on i686-pc-linux-gnu (only C: there are no C++ tests for this feature as confirmed by the lack of regressions on a path that is taken very frequently on i686). This fixes all the regressions reported recently by Michael Ritzert's automated tester and introduces no new one.

Paolo

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.

Index: tree-complex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-complex.c,v
retrieving revision 2.23
diff -u -r2.23 tree-complex.c
--- tree-complex.c 27 Apr 2005 09:10:59 -0000 2.23
+++ tree-complex.c 27 Apr 2005 16:36:50 -0000
@@ -980,10 +980,11 @@
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 (VIEW_CONVERT_EXPR, TREE_TYPE (lhs), rhs);
else
*p_rhs = gimplify_build1 (bsi, NOP_EXPR, TREE_TYPE (lhs), rhs);
}



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]