Message ID | 98572baf-842f-b13b-3073-d31838a679d1@mentor.com |
---|---|
State | New |
Headers | show |
On 05/21/2017 03:35 AM, Tom de Vries wrote: > On 12/02/2015 04:09 PM, Nathan Sidwell wrote: >> +/* Output a pattern for a move instruction. */ >> + >> +const char * >> +nvptx_output_mov_insn (rtx dst, rtx src) >> +{ > src_inner uses dst_mode rather than GET_MODE (src). I'm trying to > understand if that is intentional or not. I have no idea.
Fix src_inner in nvptx_output_mov_insn --- gcc/config/nvptx/nvptx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 4c35c16..6951e27 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -2146,10 +2146,11 @@ const char * nvptx_output_mov_insn (rtx dst, rtx src) { machine_mode dst_mode = GET_MODE (dst); + machine_mode src_mode = GET_MODE (src); machine_mode dst_inner = (GET_CODE (dst) == SUBREG ? GET_MODE (XEXP (dst, 0)) : dst_mode); machine_mode src_inner = (GET_CODE (src) == SUBREG - ? GET_MODE (XEXP (src, 0)) : dst_mode); + ? GET_MODE (XEXP (src, 0)) : src_mode); rtx sym = src; if (GET_CODE (sym) == CONST)