diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2019-11-25 11:34:53 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2019-11-25 12:34:53 +0100 |
commit | 6349e4f04ca6ccb060fdfc496bf8cf6366a5a5d1 (patch) | |
tree | f92d94234742daebcfe2922e71eeb3c61d7fcec5 | |
parent | d587d1e4aa6a33372f64b0f3983ef66afa3d1897 (diff) | |
download | gcc-6349e4f04ca6ccb060fdfc496bf8cf6366a5a5d1.zip gcc-6349e4f04ca6ccb060fdfc496bf8cf6366a5a5d1.tar.gz gcc-6349e4f04ca6ccb060fdfc496bf8cf6366a5a5d1.tar.bz2 |
[amdgcn] Silence warnings + add gcc_unreachable()
* config/gcn/gcn.c (gcn_expand_scalar_to_vector_address,
gcn_md_reorg): Remove unused variables.
(gcn_emutls_var_init): Add missing (but unreachable) return
to silence warning.
(gcn_hsa_declare_function_name): Add gcc_unreachable to ensure
target != TARGET_GCN3 or TARGET_GCN3 will fail instead of use
an uninitialized variable.
From-SVN: r278678
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/gcn/gcn.c | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5364edc..9b0169b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2019-11-25 Tobias Burnus <tobias@codesourcery.com> + + * config/gcn/gcn.c (gcn_expand_scalar_to_vector_address, + gcn_md_reorg): Remove unused variables. + (gcn_emutls_var_init): Add missing (but unreachable) return + to silence warning. + (gcn_hsa_declare_function_name): Add gcc_unreachable to ensure + target != TARGET_GCN3 or TARGET_GCN3 will fail instead of use + an uninitialized variable. + 2019-11-25 Martin Jambor <mjambor@suse.cz> PR ipa/92109 diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c index f85d84b..d2a35c9 100644 --- a/gcc/config/gcn/gcn.c +++ b/gcc/config/gcn/gcn.c @@ -1783,7 +1783,6 @@ gcn_expand_scalar_to_vector_address (machine_mode mode, rtx exec, rtx mem, /* tmp[:] += zext (mem_base) */ if (exec) { - rtx undef_di = gcn_gen_undef (DImode); emit_insn (gen_addv64si3_vcc_dup_exec (tmplo, mem_base_lo, tmplo, vcc, undef_v64si, exec)); emit_insn (gen_addcv64si3_exec (tmphi, tmphi, const0_rtx, @@ -3213,6 +3212,7 @@ tree gcn_emutls_var_init (tree, tree decl, tree) { sorry_at (DECL_SOURCE_LOCATION (decl), "TLS is not implemented for GCN."); + return NULL_TREE; } /* }}} */ @@ -4340,8 +4340,6 @@ gcn_md_reorg (void) { basic_block bb; rtx exec_reg = gen_rtx_REG (DImode, EXEC_REG); - rtx exec_lo_reg = gen_rtx_REG (SImode, EXEC_LO_REG); - rtx exec_hi_reg = gen_rtx_REG (SImode, EXEC_HI_REG); regset_head live; INIT_REG_SET (&live); @@ -4937,6 +4935,8 @@ gcn_hsa_declare_function_name (FILE *file, const char *name, tree) granulated_sgprs = (sgpr + extra_regs + 7) / 8 - 1; else if (TARGET_GCN5) granulated_sgprs = 2 * ((sgpr + extra_regs + 15) / 16 - 1); + else + gcc_unreachable (); fputs ("\t.align\t256\n", file); fputs ("\t.type\t", file); |