From af79605ec27c0db7dee9ee001cd7d768eb6fcf02 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Sat, 12 Jan 2019 10:27:34 +0000 Subject: [PATCH] [nvptx] Apply vector-partitionable routines workaround to default vl Make "[nvptx] Force vl32 if calling vector-partitionable routines" work as well if vector length is set by modifying PTX_DEFAULT_VECTOR_LENGTH. 2019-01-12 Tom de Vries * config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): In offloading region calling vector-partitionable routine, set default_vector_length to WARP_SIZE. From-SVN: r267879 --- gcc/ChangeLog | 6 ++++++ gcc/config/nvptx/nvptx.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 87697c47ac1..24174c118ba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-01-12 Tom de Vries + + * config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): In offloading + region calling vector-partitionable routine, set default_vector_length + to WARP_SIZE. + 2019-01-12 Tom de Vries * config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): Add an use new diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 95d72d0a4e0..1d9704543d9 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -5669,6 +5669,8 @@ nvptx_goacc_validate_dims_1 (tree decl, int dims[], int fn_level, unsigned used) const char *vector_reason = NULL; if (offload_region_p && has_vector_partitionable_routine_calls_p (decl)) { + default_vector_length = PTX_WARP_SIZE; + if (dims[GOMP_DIM_VECTOR] > PTX_WARP_SIZE) { vector_reason = G_("using vector_length (%d) due to call to" -- 2.30.2