[Patch][amdgcn] Silence warnings + add gcc_unreachable() (was: Re: [committed, amdgcn] Use GFX9 granulated sgprs count correctly)

2019-11-25 Thread Tobias Burnus
This patch adds "gcc_unreachable ();" as suggested by me (cf. below). It also silences the -Wunused-variable + 'no return statement' warnings. OK for the trunk? Tobias PS: The warning fixes were part of my OG9 silence-warnings patch at https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01056.html ,

Re: [committed, amdgcn] Use GFX9 granulated sgprs count correctly

2019-11-22 Thread Tobias Burnus
Hi Andrew, On 11/22/19 3:47 PM, Andrew Stubbs wrote: --- a/gcc/config/gcn/gcn.c +++ b/gcc/config/gcn/gcn.c @@ -4922,6 +4922,14 @@ gcn_hsa_declare_function_name (FILE *file, const char *name, tree) + int granulated_sgprs; + if (TARGET_GCN3) +granulated_sgprs = (sgpr + extra_regs + 7) / 8 -

[committed, amdgcn] Use GFX9 granulated sgprs count correctly

2019-11-22 Thread Andrew Stubbs
I've committed the attached. The patch adjusts the GCN kernel metadata so that it is correct for GFX9 devices. The existing implementation was correct for GFX8, and seems to work on GFX9, but wasn't technically correct. -- Andrew Stubbs CodeSourcery / Mentor Graphics Use GFX9 granulated sgprs