aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2015-05-28 09:29:19 +0000
committerJulian Brown <jules@gcc.gnu.org>2015-05-28 09:29:19 +0000
commit32eaed9380bfff86977823c0bf88fb69c2a375a6 (patch)
tree2bd3ae354d8dfe258860472c06b79b535af2b30b /gcc/builtins.c
parent7d9880c94ce8d5bbce64f56f4e75c1ed073a1e52 (diff)
downloadgcc-32eaed9380bfff86977823c0bf88fb69c2a375a6.zip
gcc-32eaed9380bfff86977823c0bf88fb69c2a375a6.tar.gz
gcc-32eaed9380bfff86977823c0bf88fb69c2a375a6.tar.bz2
re PR libgomp/65742 (Several libgomp.oacc-* failures after r221922.)
PR libgomp/65742 gcc/ * builtins.c (expand_builtin_acc_on_device): Don't use open-coded sequence for !ACCEL_COMPILER. libgomp/ * oacc-init.c (plugin/plugin-host.h): Include. (acc_on_device): Check whether we're in an offloaded region for host_nonshm plugin. Don't use __builtin_acc_on_device. * plugin/plugin-host.c (GOMP_OFFLOAD_openacc_parallel): Set nonshm_exec flag in thread-local data. (GOMP_OFFLOAD_openacc_create_thread_data): Allocate thread-local data for host_nonshm plugin. (GOMP_OFFLOAD_openacc_destroy_thread_data): Free thread-local data for host_nonshm plugin. * plugin/plugin-host.h: New. From-SVN: r223801
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index d92535e..4ce8e52 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -5913,6 +5913,7 @@ expand_stack_save (void)
static rtx
expand_builtin_acc_on_device (tree exp, rtx target)
{
+#ifdef ACCEL_COMPILER
if (!validate_arglist (exp, INTEGER_TYPE, VOID_TYPE))
return NULL_RTX;
@@ -5921,13 +5922,8 @@ expand_builtin_acc_on_device (tree exp, rtx target)
/* Return (arg == v1 || arg == v2) ? 1 : 0. */
machine_mode v_mode = TYPE_MODE (TREE_TYPE (arg));
rtx v = expand_normal (arg), v1, v2;
-#ifdef ACCEL_COMPILER
v1 = GEN_INT (GOMP_DEVICE_NOT_HOST);
v2 = GEN_INT (ACCEL_COMPILER_acc_device);
-#else
- v1 = GEN_INT (GOMP_DEVICE_NONE);
- v2 = GEN_INT (GOMP_DEVICE_HOST);
-#endif
machine_mode target_mode = TYPE_MODE (integer_type_node);
if (!target || !register_operand (target, target_mode))
target = gen_reg_rtx (target_mode);
@@ -5941,6 +5937,9 @@ expand_builtin_acc_on_device (tree exp, rtx target)
emit_label (done_label);
return target;
+#else
+ return NULL;
+#endif
}