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 - 1; + else if (TARGET_GCN5) + granulated_sgprs = 2 * ((sgpr + extra_regs + 15) / 16 - 1);
Would it make sense to add here: else gcc_unreachable (); (TARGET_GCN5_PLUS would also work, but gcc_unreachable is probably better.) Cheers, Tobias