diff mbox

[gomp] Fix PTX worker spill/fill

Message ID 55A7DA98.5020404@acm.org
State New
Headers show

Commit Message

Nathan Sidwell July 16, 2015, 4:23 p.m. UTC
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
diff mbox

Patch

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 ();
 	  }