[nvptx] Force vl32 if calling vector-partitionable routines
authorTom de Vries <tdevries@suse.de>
Mon, 7 Jan 2019 10:01:49 +0000 (10:01 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Mon, 7 Jan 2019 10:01:49 +0000 (10:01 +0000)
commit6e723923df52bdde7c3aebd6bccaae3c7bff19ee
tree56290fe75d9fead37fbc9cb053d1e010cb3120f1
parentd471bdec413c333f2067c0723c61ad045f3589e3
[nvptx] Force vl32 if calling vector-partitionable routines

With PTX_MAX_VECTOR_LENGTH set to larger than PTX_WARP_SIZE, routines can be
called from offloading regions with vector-size set to larger than warp size.
OTOH, vector-partitionable routines assume warp-sized vector length.

Detect if we're calling a vector-partitionable routine from an offloading
region, and if so, fall back to warp-sized vector length in that region.

2019-01-07  Tom de Vries  <tdevries@suse.de>

PR target/85486
* config/nvptx/nvptx.c (has_vector_partitionable_routine_calls_p): New
function.
(nvptx_goacc_validate_dims): Force vl32 if calling vector-partitionable
routines.

From-SVN: r267640
gcc/ChangeLog
gcc/config/nvptx/nvptx.c