This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Also test -O0 for OpenACC C, C++ offloading test cases
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>, Nathan Sidwell <nathan at codesourcery dot com>
- Date: Wed, 23 Mar 2016 19:57:50 +0100
- Subject: Re: Also test -O0 for OpenACC C, C++ offloading test cases
- Authentication-results: sourceware.org; auth=none
- References: <87mvpqrets dot fsf at kepler dot schwinge dot homeip dot net> <56F1CC9B dot 1060003 at redhat dot com> <87mvppbsgw dot fsf at hertz dot schwinge dot homeip dot net>
On 03/23/2016 07:47 AM, Thomas Schwinge wrote:
Want me to re-word that? :-| I thought it would be obvious from looking
at the test case code; will not be a problem in practice. It's because
of constructs used in the test cases, like the following, for example:
if (__builtin_acc_on_device (5))
{
int g = 0, w = 0, v = 0;
__asm__ volatile ("mov.u32 %0,%%ctaid.x;" : "=r" (g));
__asm__ volatile ("mov.u32 %0,%%tid.y;" : "=r" (w));
__asm__ volatile ("mov.u32 %0,%%tid.x;" : "=r" (v));
ary[ix] = (g << 16) | (w << 8) | v;
Ok, maybe write "This code uses nvptx assembly guarded with
__builtin_acc_on_device, which fails to be optimized away at -O0."
Ok with something like that.
Bernd