This is the mail archive of the 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]

Re: [PATCH] SSA expand: Convert mode when copying between partition base vars


On Mon, 27 Apr 2009, Andreas Krebbel wrote:

> s390 currently doesn't bootstrap. It fails since emit_move_insn is 
> invoked with two rtxs having a different mode. The insert_* functions 
> call emit_move_insn to copy between two partition base variables. This 
> doesn't work out if the source or destination variable has been promoted 
> to a different type. The attached patch adds a call to convert_to_mode 
> when emitting the move.
> With that patch the bootstrap gets significantly farther and dies due to 
> genautomata eating up all the memory :(
> Ok?

Rather try this one.  It fixes the cris issue (and perhaps the sparc 
thingy too), which is also about promoting PARM_DECLs.

	PR middle-end/39927
	* cfgexpand.c (expand_one_register_var): Correctly promote mode for PARM_DECLs.

Index: cfgexpand.c
--- cfgexpand.c	(revision 146824)
+++ cfgexpand.c	(working copy)
@@ -1049,7 +1049,9 @@ expand_one_register_var (tree var)
   tree type = TREE_TYPE (decl);
   int unsignedp = TYPE_UNSIGNED (type);
   enum machine_mode reg_mode
-    = promote_mode (type, DECL_MODE (decl), &unsignedp, 0);
+    = promote_mode (type, DECL_MODE (decl), &unsignedp,
+		    (TREE_CODE (decl) == RESULT_DECL
+		     || TREE_CODE (decl) == PARM_DECL) ? 1 : 0);
   rtx x = gen_reg_rtx (reg_mode);
   set_rtl (var, x);

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