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]

[patch] fix PR33855, incorrect handling of complex regs


Hi,

I've missed the fact that we need to explicitely mark temporary variables 
of COMPLEX_TYPE and VECTOR_TYPE as gimple reg, otherwise the operand 
scanner will try to generate VOPS for it :-/  So I've added the same 
mechanism that we seem to use at all other places who call create_tmp_var 
with an unknown target type :-/

Fixes the bug, put into regstrapping (a nice word :) ) on x86_64.  Okay if 
it succeeds?


Ciao,
Michael.

	PR tree-optimization/33855

	* tree-ssa-phiopt.c (cond_store_replacement): Handle COMPLEX_TYPE
	and VECTOR_TYPE.

Index: gcc/tree-ssa-phiopt.c
===================================================================
--- gcc/tree-ssa-phiopt.c	(revision 129547)
+++ gcc/tree-ssa-phiopt.c	(working copy)
@@ -1287,6 +1287,9 @@ cond_store_replacement (basic_block midd
     {
       condstoretemp = create_tmp_var (TREE_TYPE (lhs), "cstore");
       get_var_ann (condstoretemp);
+      if (TREE_CODE (TREE_TYPE (lhs)) == COMPLEX_TYPE
+          || TREE_CODE (TREE_TYPE (lhs)) == VECTOR_TYPE)
+	DECL_GIMPLE_REG_P (condstoretemp) = 1;
     }
   add_referenced_var (condstoretemp);
 


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