libgomp/ChangeLog:
* config/gcn/bar.h (gomp_barrier_init): Limit thread count to the
actual physical number.
* config/gcn/team.c (gomp_team_start): Don't attempt to set up
threads that do not exist.
+2021-08-03 Andrew Stubbs <ams@codesourcery.com>
+
+ * config/gcn/bar.h (gomp_barrier_init): Limit thread count to the
+ actual physical number.
+ * config/gcn/team.c (gomp_team_start): Don't attempt to set up
+ threads that do not exist.
+
2021-06-02 Julian Brown <julian@codesourcery.com>
* testsuite/libgomp.oacc-c-c++-common/deep-copy-15.c: New test.
static inline void gomp_barrier_init (gomp_barrier_t *bar, unsigned count)
{
+ unsigned actual_thread_count = __builtin_gcn_dim_size (1);
+ if (count > actual_thread_count)
+ count = actual_thread_count;
bar->total = count;
bar->awaited = count;
bar->awaited_final = count;
if (nthreads == 1)
return;
+ unsigned actual_thread_count = __builtin_gcn_dim_size (1);
+ if (nthreads > actual_thread_count)
+ nthreads = actual_thread_count;
+
/* Release existing idle threads. */
for (unsigned i = 1; i < nthreads; ++i)
{