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]

[gomp] Fix PTX worker spill/fill


I've committed this patch to fix a bug in the worker spill/fill code. We ended up not incrementing the pointer, resulting in the stack frame being filled with the same value.

Thanks to Jim for finding the failure.

nathan
2015-07-16  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_gen_wcast): Fix typo accessing reg's
	mode for pointer increment.

Index: config/nvptx/nvptx.c
===================================================================
--- config/nvptx/nvptx.c	(revision 225831)
+++ config/nvptx/nvptx.c	(working copy)
@@ -1257,7 +1257,7 @@ nvptx_gen_wcast (rtx reg, propagate_mask
 	    
 	    emit_insn (res);
 	    emit_insn (gen_adddi3 (data->ptr, data->ptr,
-				   GEN_INT (GET_MODE_SIZE (GET_MODE (res)))));
+				   GEN_INT (GET_MODE_SIZE (GET_MODE (reg)))));
 	    res = get_insns ();
 	    end_sequence ();
 	  }

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