aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/gcn
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2023-10-27 17:53:10 +0100
committerAndrew Stubbs <ams@codesourcery.com>2023-10-27 18:00:55 +0100
commit9f3c4c673d769bd3f1d504d85b743ba250e68d7b (patch)
treeb4950d91237bb7cb9ea62a6a9d4598d20b30b73e /gcc/config/gcn
parent9ae1fbdd38c565ef0cde18b614d68119cbc9af63 (diff)
downloadgcc-9f3c4c673d769bd3f1d504d85b743ba250e68d7b.zip
gcc-9f3c4c673d769bd3f1d504d85b743ba250e68d7b.tar.gz
gcc-9f3c4c673d769bd3f1d504d85b743ba250e68d7b.tar.bz2
amdgcn: Fix bug in gfx1030 support patch
The previous patch to add gfx1030 support introduced an issue with passing exit codes from kernels run under gcn-run (offload kernels were unaffected). gcc/ChangeLog: PR target/112088 * config/gcn/gcn.cc (gcn_expand_epilogue): Fix kernel epilogue register conflict.
Diffstat (limited to 'gcc/config/gcn')
-rw-r--r--gcc/config/gcn/gcn.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index 6f85f55..6a2aaef 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -3615,13 +3615,11 @@ gcn_expand_epilogue (void)
set_mem_addr_space (retptr_mem, ADDR_SPACE_SCALAR_FLAT);
emit_move_insn (kernarg_reg, retptr_mem);
- rtx retval_addr = gen_rtx_REG (DImode, FIRST_VPARM_REG);
+ rtx retval_addr = gen_rtx_REG (DImode, FIRST_VPARM_REG + 2);
emit_move_insn (retval_addr, kernarg_reg);
rtx retval_mem = gen_rtx_MEM (SImode, retval_addr);
- rtx scalar_retval = gen_rtx_REG (SImode, FIRST_VPARM_REG + 2);
set_mem_addr_space (retval_mem, ADDR_SPACE_FLAT);
- emit_move_insn (scalar_retval, gen_rtx_REG (SImode, RETURN_VALUE_REG));
- emit_move_insn (retval_mem, scalar_retval);
+ emit_move_insn (retval_mem, gen_rtx_REG (SImode, RETURN_VALUE_REG));
}
emit_jump_insn (gen_gcn_return ());