[PATCH] [testsuite] Fix gcc.dg/pr115066.c fail on aarch64

2024-05-14 Thread Tom de Vries
this by not explicitly matching the comment marker. Tested on aarch64 and x86_64. gcc/testsuite/ChangeLog: 2024-05-14 Tom de Vries * gcc.dg/pr115066.c: Don't match comment marker. --- gcc/testsuite/gcc.dg/pr115066.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc

[PATCH] [debug] Fix dwarf v4 .debug_macro.dwo

2024-05-14 Thread Tom de Vries
Consider a hello world, compiled with -gsplit-dwarf and dwarf version 4, and -g3: ... $ gcc -gdwarf-4 -gsplit-dwarf /data/vries/hello.c -g3 -save-temps -dA ... In section .debug_macro.dwo, we have: ... .Ldebug_macro0: .value 0x4 # DWARF macro version number .byte 0x2 #

Re: [Patch] nvptx/mkoffload.cc: Add dummy proc for OpenMP rev-offload table [PR108098]

2023-04-04 Thread Tom de Vries via Gcc-patches
On 4/4/23 11:02, Thomas Schwinge wrote: Hi! Are we going to install such a work-around? Hi, LGTM. Thanks, - Tom Grüße Thomas On 2022-12-19T13:04:43+0100, I wrote: Hi! On 2022-12-16T17:19:00+0100, Tobias Burnus wrote: Seems to be a CUDA JIT issue A Nvidia Driver JIT issue, more

Re: [PATCH, nvptx, 1/2] Reimplement libgomp barriers for nvptx

2022-12-16 Thread Tom de Vries via Gcc-patches
On 9/21/22 09:45, Chung-Lin Tang wrote: Hi Tom, I had a patch submitted earlier, where I reported that the current way of implementing barriers in libgomp on nvptx created a quite significant performance drop on some SPEChpc2021 benchmarks:

Re: [PATCH, nvptx, 2/2] Reimplement libgomp barriers for nvptx: bar.red instruction support in GCC

2022-12-16 Thread Tom de Vries via Gcc-patches
On 9/21/22 09:45, Chung-Lin Tang wrote: Hi Tom, following the first patch. This new barrier implementation I posted in the first patch uses the 'bar.red' instruction. > Usually this could've been easily done with a single line of inline assembly. However I quickly realized that because the

Re: nvptx: In 'STARTFILE_SPEC', fix 'crt0.o' for '-mmainkernel' (was: [MentorEmbedded/nvptx-tools] Match standard 'ld' "search" behavior (PR #38))

2022-11-18 Thread Tom de Vries via Gcc-patches
On 11/19/22 00:25, Thomas Schwinge wrote: Hi! Re : On 2022-11-18T11:05:23-0800, I wrote: Actually, in GCC/nvptx target testing, this #38's commit 886a95faf66bf66a82fc0fe7d2a9fd9e9fec2820 "ld: Don't search for

[committed] Don't build readline/libreadline.a, when --with-system-readline is supplied

2022-10-21 Thread Tom de Vries via Gcc-patches
Hi, [ Committed as obvious as per https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00299.html . ] https://sourceware.org/bugzilla/show_bug.cgi?id=18632 The bundled libreadline is always built, even if the system is ./configure'd --with-system-readline and the build libreadline.a is not

Re: Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR' (was: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality)

2022-10-10 Thread Tom de Vries via Gcc-patches
On 10/10/22 16:19, Thomas Schwinge wrote: With that, OK to push? FWIW, nvptx change looks in the obvious category to me. Thanks, - Tom

[PATCH] Add --without-makeinfo

2022-10-04 Thread Tom de Vries via Gcc-patches
by building gdb on x86_64-linux, and verifying that no .info files were generated. OK for trunk? Thanks, - Tom Add --without-makeinfo ChangeLog: 2022-09-05 Tom de Vries * configure.ac: Add --without-makeinfo. * configure: Regenerate. --- configure| 4 configure.ac

Re: [PING^5] nvptx: Allow '--with-arch' to override the default '-misa' (was: nvptx multilib setup)

2022-09-18 Thread Tom de Vries via Gcc-patches
+0200, I wrote: Hi Tom! On 2022-05-13T16:20:14+0200, I wrote: On 2022-02-04T13:09:29+0100, Tom de Vries via Gcc wrote: On 2/4/22 08:21, Thomas Schwinge wrote: On 2022-02-03T13:35:55+, "vries at gcc dot gnu.org via Gcc-bugs" wrote: I've tested this using (recommended) dri

Re: [committed][nvptx] Add uniform_warp_check insn

2022-09-14 Thread Tom de Vries via Gcc-patches
On 9/14/22 11:41, Thomas Schwinge wrote: Hi Tom! On 2022-02-01T19:31:27+0100, Tom de Vries via Gcc-patches wrote: Hi, On a GT 1030, with driver version 470.94 and -mptx=3.1 I run into: ... FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/parallel-dims.c \ -DACC_DEVICE_TYPE_nvidia=1

Re: [committed][nvptx] Add bar.warp.sync

2022-09-14 Thread Tom de Vries via Gcc-patches
On 9/14/22 11:41, Thomas Schwinge wrote: Hi Tom! On 2022-02-01T19:31:13+0100, Tom de Vries via Gcc-patches wrote: On a GT 1030 (sm_61), with driver version 470.94 I run into: ... FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/parallel-dims.c \ -DACC_DEVICE_TYPE_nvidia=1

[PING^2][PATCH][gdb/build] Fix build breaker with --enabled-shared

2022-09-06 Thread Tom de Vries via Gcc-patches
On 7/12/22 15:42, Tom de Vries wrote: [ dropped gdb-patches, since already applied there. ] On 6/27/22 15:38, Tom de Vries wrote: On 6/27/22 15:03, Tom de Vries wrote: Hi, When building gdb with --enabled-shared, I run into: ... ld: build/zlib/libz.a(libz_a-inffast.o): relocation

Re: [PATCH] nvptx: Silence unused variable warning

2022-09-06 Thread Tom de Vries via Gcc-patches
On 8/28/22 13:09, Jan-Benedict Glaw wrote: Hi! The nvptx backend defines ASM_OUTPUT_DEF along with ASM_OUTPUT_DEF_FROM_DECLS. Much like the rs6000 coff target, nvptx triggers an unused variable warning: /usr/lib/gcc-snapshot/bin/g++ -fno-PIE -c -g -O2 -DIN_GCC

Re: [PING] nvptx: forward '-v' command-line option to assembler, linker

2022-09-05 Thread Tom de Vries via Gcc-patches
On 6/7/22 17:41, Thomas Schwinge wrote: Subject: [PING] nvptx: forward '-v' command-line option to assembler, linker From: Thomas Schwinge Date: 6/7/22, 17:41 To: Tobias Burnus , , "Tom de Vries" Hi! On 2022-05-30T09:06:21+0200, Tobias Burnus wrote: On 29.05.22 22:

Re: [PING][PATCH][gdb/build] Fix build breaker with --enabled-shared

2022-07-12 Thread Tom de Vries via Gcc-patches
On 7/12/22 15:59, Iain Sandoe wrote: Hi Tom On 12 Jul 2022, at 14:42, Tom de Vries via Gcc-patches wrote: [ dropped gdb-patches, since already applied there. ] On 6/27/22 15:38, Tom de Vries wrote: On 6/27/22 15:03, Tom de Vries wrote: Hi, When building gdb with --enabled-shared, I run

[PING][PATCH][gdb/build] Fix build breaker with --enabled-shared

2022-07-12 Thread Tom de Vries via Gcc-patches
[ dropped gdb-patches, since already applied there. ] On 6/27/22 15:38, Tom de Vries wrote: On 6/27/22 15:03, Tom de Vries wrote: Hi, When building gdb with --enabled-shared, I run into: ... ld: build/zlib/libz.a(libz_a-inffast.o): relocation R_X86_64_32S against \    `.rodata' can

Re: [PATCH][gdb/build] Fix build breaker with --enabled-shared

2022-06-27 Thread Tom de Vries via Gcc-patches
On 6/27/22 15:03, Tom de Vries wrote: Hi, When building gdb with --enabled-shared, I run into: ... ld: build/zlib/libz.a(libz_a-inffast.o): relocation R_X86_64_32S against \ `.rodata' can not be used when making a shared object; recompile with -fPIC ld: build/zlib/libz.a(libz_a-inflate.o

[PATCH][gdb/build] Fix build breaker with --enabled-shared

2022-06-27 Thread Tom de Vries via Gcc-patches
build] Fix build breaker with --enabled-shared ChangeLog: 2022-06-27 Tom de Vries * configure.ac: Set extra_host_libiberty_configure_flags and extra_host_zlib_configure_flags in separate case statements. * configure: Regenerate. --- configure| 8 ++-- config

[PATCH][gdb/build] Fix gdbserver build with -fsanitize=thread

2022-06-25 Thread Tom de Vries via Gcc-patches
Hi, When building gdbserver with -fsanitize=thread (added to CFLAGS/CXXFLAGS) we run into: ... ld: ../libiberty/libiberty.a(safe-ctype.o): warning: relocation against \ `__tsan_init' in read-only section `.text' ld: ../libiberty/libiberty.a(safe-ctype.o): relocation R_X86_64_PC32 \ against

[committed][gdb/build] Fix build for gcc < 11

2022-06-15 Thread Tom de Vries via Gcc-patches
Hi, When building trunk on openSUSE Leap 15.3 with system gcc 7.5.0, I run into: ... In file included from ../bfd/bfd.h:46:0, from gdb/defs.h:37, from gdb/debuginfod-support.c:19: gdb/debuginfod-support.c: In function ‘bool debuginfod_is_enabled()’:

Re: libgomp nvptx plugin: Split 'PLUGIN_NVPTX_DYNAMIC' into 'PLUGIN_NVPTX_INCLUDE_SYSTEM_CUDA_H' and 'PLUGIN_NVPTX_LINK_LIBCUDA'

2022-05-12 Thread Tom de Vries via Gcc-patches
On 4/28/22 15:45, Thomas Schwinge wrote: Hi Tom! On 2022-04-08T09:35:44+0200, Tom de Vries wrote: On 4/8/22 00:27, Thomas Schwinge wrote: On 2017-01-13T19:11:23+0100, Jakub Jelinek wrote: Especially for distributions it is undesirable to need to have proprietary CUDA libraries and headers

Re: [committed][nvptx] Fix ASM_SPEC workaround for sm_30

2022-04-11 Thread Tom de Vries via Gcc-patches
On 4/7/22 16:17, Thomas Schwinge wrote: Hi! On 2022-03-31T09:40:47+0200, Tom de Vries via Gcc-patches wrote: Newer versions of CUDA no longer support sm_30, and nvptx-tools as currently doesn't handle that gracefully when verifying ( https://github.com/MentorEmbedded/nvptx-tools/issues/30

Re: libgomp nvptx plugin: Split 'PLUGIN_NVPTX_DYNAMIC' into 'PLUGIN_NVPTX_INCLUDE_SYSTEM_CUDA_H' and 'PLUGIN_NVPTX_LINK_LIBCUDA' (was: [PATCH] Allow building GCC with PTX offloading even without CUDA

2022-04-08 Thread Tom de Vries via Gcc-patches
On 4/8/22 00:27, Thomas Schwinge wrote: Hi! On 2017-01-13T19:11:23+0100, Jakub Jelinek wrote: Especially for distributions it is undesirable to need to have proprietary CUDA libraries and headers installed when building GCC. --- libgomp/plugin/configfrag.ac.jj 2017-01-13

Re: Proposal to remove '--with-cuda-driver' (was: [wwwdocs][patch] gcc-12: Nvptx updates)

2022-04-06 Thread Tom de Vries via Gcc-patches
On 4/5/22 17:14, Thomas Schwinge wrote: Hi! Still catching up with GCC/nvptx back end changes... %-) In the following I'm not discussing the patch to document "gcc-12: Nvptx updates", but rather one aspect of the "gcc-12: Nvptx updates" themselves. ;-) On 2022-03-30T1

Re: [PATCH][libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

2022-04-04 Thread Tom de Vries via Gcc-patches
On 4/4/22 13:07, Jakub Jelinek wrote: On Mon, Apr 04, 2022 at 01:05:12PM +0200, Tom de Vries wrote: 2022-04-04 Tom de Vries * testsuite/libgomp.fortran/examples-4/on_device_arch.c: Copy from parent dir. Wouldn't just ! { dg-additional-sources ../on_device_arch.c } work

Re: [PATCH][libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

2022-04-04 Thread Tom de Vries via Gcc-patches
On 4/1/22 17:57, Tom de Vries wrote: On 4/1/22 17:38, Jakub Jelinek wrote: On Fri, Apr 01, 2022 at 05:34:50PM +0200, Tom de Vries wrote: Do you perhaps have an idea why it's failing? Because you call on_device_arch_nvptx () outside of !$omp target region, so unless the host device is NVPTX

Re: [PATCH][libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

2022-04-01 Thread Tom de Vries via Gcc-patches
On 4/1/22 17:38, Jakub Jelinek wrote: On Fri, Apr 01, 2022 at 05:34:50PM +0200, Tom de Vries wrote: Do you perhaps have an idea why it's failing? Because you call on_device_arch_nvptx () outside of !$omp target region, so unless the host device is NVPTX, it will not be true. That bit does

Re: [PATCH][libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

2022-04-01 Thread Tom de Vries via Gcc-patches
On 4/1/22 14:28, Thomas Schwinge wrote: Hi Tom! On 2022-04-01T13:24:40+0200, Tom de Vries wrote: When running testcases libgomp.fortran/examples-4/declare_target-{1,2}.f90 on an RTX A2000 (sm_86) with driver 510.60.02 and with GOMP_NVPTX_JIT=-O0 I run into: ... FAIL: libgomp.fortran/examples

[PATCH][libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

2022-04-01 Thread Tom de Vries via Gcc-patches
, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90 libgomp/ChangeLog: 2022-04-01 Tom de Vries * testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Define and use REC_DEPTH. * testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Same

[committed][libgomp, testsuite, nvptx] Fix dg-output test in vector-length-128-7.c

2022-04-01 Thread Tom de Vries via Gcc-patches
e: 6 * 128 == 768. ] Fix this by updating the check to allow num_workers in the range 1 to 8. Tested on x86_64 with nvptx accelerator. Committed to trunk. Thanks, - Tom [libgomp, testsuite, nvptx] Fix dg-output test in vector-length-128-7.c libgomp/ChangeLog: 2022-04-01 Tom de Vries *

[committed][nvptx, testsuite] Fix gcc.target/nvptx/alias-*.c on sm_80

2022-04-01 Thread Tom de Vries via Gcc-patches
abstractions: ... /* { dg-do run { target runtime_ptx_alias } } */ /* { dg-add-options ptx_alias } */ ... Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx, testsuite] Fix gcc.target/nvptx/alias-*.c on sm_80 gcc/testsuite/ChangeLog: 2022-04-01 Tom de Vries * gcc.target/nvptx

[committed][nvptx, testsuite] Fix typo in gcc.target/nvptx/march.c

2022-03-31 Thread Tom de Vries via Gcc-patches
testsuite] Fix typo in gcc.target/nvptx/march.c gcc/testsuite/ChangeLog: 2022-03-31 Tom de Vries * gcc.target/nvptx/march.c: Add missing space in dg-options line. --- gcc/testsuite/gcc.target/nvptx/march.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tests

[committed][nvptx] Fix ASM_SPEC workaround for sm_30

2022-03-31 Thread Tom de Vries via Gcc-patches
on the command line. Use a more robust workaround: verify using sm_35 when misa=sm_30 is specified (either implicitly or explicitly). Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Fix ASM_SPEC workaround for sm_30 gcc/ChangeLog: 2022-03-30 Tom de Vries * config/nvptx

[wwwdocs][patch] gcc-12: Nvptx updates.

2022-03-30 Thread Tom de Vries via Gcc-patches
[ was: Re: [wwwdocs][patch] gcc-12/changes.html: Document -misa update for nvptx ] On 3/3/22 13:27, Tobias Burnus wrote: The current wording, https://gcc.gnu.org/gcc-12/changes.html#nvptx , is outdated and (now wrongly) encourages to use -mptx=. Updated as follows. I've taken these changes

Re: [PATCH][nvptx, doc] Update misa and mptx, add march and march-map

2022-03-30 Thread Tom de Vries via Gcc-patches
On 3/30/22 11:02, Tobias Burnus wrote: On 30.03.22 10:03, Tom de Vries wrote: On 3/29/22 16:47, Tobias Burnus wrote: I think it would be useful to have additionally some wording for the (new in GCC 12/new since today) macros, [...] The macro is defined also if the option is not specified

Re: [PATCH][nvptx, doc] Update misa and mptx, add march and march-map

2022-03-30 Thread Tom de Vries via Gcc-patches
On 3/29/22 16:47, Tobias Burnus wrote: On 29.03.22 16:28, Tobias Burnus wrote: On 29.03.22 15:39, Tom de Vries wrote: Any comments? I think it would be useful to have additionally some wording for the (new in GCC 12/new since today) macros, Agreed. i.e. something like: --- a/gcc/doc

Re: [PATCH][nvptx, doc] Update misa and mptx, add march and march-map

2022-03-30 Thread Tom de Vries via Gcc-patches
On 3/29/22 16:28, Tobias Burnus wrote: Hi Tom, On 29.03.22 15:39, Tom de Vries wrote: Any comments? +(e.g.@: @samp{sm_35}).  Valid architecture strings are @samp{sm_30}, +@samp{sm_35}, @samp{sm_53} @samp{sm_70}, @samp{sm_75} and +@samp{sm_80}.  The default target architecture is sm_30

[committed][nvptx] Add __PTX_ISA_VERSION_{MAJOR,MINOR}__

2022-03-29 Thread Tom de Vries via Gcc-patches
e. */ #else /* Fallback code. */ #endif ... Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Add __PTX_ISA_VERSION_{MAJOR,MINOR}__ gcc/ChangeLog: 2022-03-29 Tom de Vries PR target/104857 * config/nvptx/nvptx-c.cc (nvptx_cpu_cpp_builtins): Emit

[PATCH][nvptx, doc] Update misa and mptx, add march and march-map

2022-03-29 Thread Tom de Vries via Gcc-patches
n march alias. - Add march-map. - Fix "for given the specified" typo. Any comments? Thanks, - Tom [nvptx, doc] Update misa and mptx, add march and march-map gcc/ChangeLog: 2022-03-29 Tom de Vries * doc/invoke.texi (misa, mptx): Update. (march, march-m

[committed][nvptx] Update help text for m64

2022-03-29 Thread Tom de Vries via Gcc-patches
gcc/ChangeLog: 2022-03-29 Tom de Vries * config/nvptx/nvptx.opt (m64): Update help text to reflect that it is ignored. --- gcc/config/nvptx/nvptx.opt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/nvptx/nvptx.opt b/gcc/config/nvptx/nvptx.opt

[committed][nvptx] Add march-map

2022-03-29 Thread Tom de Vries via Gcc-patches
-03-29 Tom de Vries PR target/104714 * config/nvptx/nvptx.opt (march-map=*): Add aliases. gcc/testsuite/ChangeLog: 2022-03-29 Tom de Vries PR target/104714 * gcc.target/nvptx/march-map.c: New test. --- gcc/config/nvptx/nvptx.opt | 51

[committed][nvptx] Add march alias for misa

2022-03-29 Thread Tom de Vries via Gcc-patches
he more intuitive alias march for misa: ... $ gcc --target-help 2>&1 | grep march -march= Alias: Same as -misa=. ... Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Add march alias for misa gcc/ChangeLog: 2022-03-29 Tom de Vries * config/nvptx/nv

[committed][nvptx] Improve help description of misa and mptx

2022-03-28 Thread Tom de Vries via Gcc-patches
rchitectures (for use with the -misa= option): Known PTX ISA versions (for use with the -mptx= option): ... Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Improve help description of misa and mptx gcc/ChangeLog: 2022-03-28 Tom de Vries PR target/104818 * con

Re: [PATCH][libgomp, testsuite] Fix hardcoded libexec in plugin/configfrag.ac

2022-03-28 Thread Tom de Vries via Gcc-patches
On 3/28/22 14:04, Richard Biener wrote: On Mon, 28 Mar 2022, Andreas Schwab wrote: On Mär 28 2022, Richard Biener via Gcc-patches wrote: OK in principle, but I have no idea on how portable $(libexecdir:\$(exec_prefix)/%=%) is going to be? We already require GNU make, don't we? We

Re: [PATCH][libgomp, testsuite] Fix hardcoded libexec in plugin/configfrag.ac

2022-03-28 Thread Tom de Vries via Gcc-patches
On 3/28/22 10:49, Richard Biener wrote: On Mon, 28 Mar 2022, Tom de Vries wrote: Hi, When building an nvptx offloading configuration on openSUSE Leap 15.3, the site script /usr/share/site/x86_64-unknown-linux-gnu is activated, setting libexecdir to ${exec_prefix}/lib rather than ${exec_prefix

[PATCH][libgomp, testsuite] Fix hardcoded libexec in plugin/configfrag.ac

2022-03-28 Thread Tom de Vries via Gcc-patches
ted on x86_64-linux with nvptx accelerator. OK for trunk? Thanks, - Tom [libgomp, testsuite] Fix hardcoded libexec in plugin/configfrag.ac libgomp/ChangeLog: 2022-03-28 Tom de Vries * plugin/configfrag.ac: Use /$(libexecdir:\$(exec_prefix)/%=%)/ instead of /libexec/.

Re: [PATCH][libgomp, testsuite] Scale down some OpenACC test-cases

2022-03-25 Thread Tom de Vries via Gcc-patches
On 3/25/22 13:35, Thomas Schwinge wrote: Hi! On 2022-03-25T13:08:52+0100, Tom de Vries wrote: On 3/25/22 11:04, Tobias Burnus wrote: On 25.03.22 10:27, Jakub Jelinek via Gcc-patches wrote: On Fri, Mar 25, 2022 at 10:18:49AM +0100, Tom de Vries wrote: [...] Fix this by scaling down

Re: [PATCH][libgomp, testsuite] Scale down some OpenACC test-cases

2022-03-25 Thread Tom de Vries via Gcc-patches
On 3/25/22 11:04, Tobias Burnus wrote: On 25.03.22 10:27, Jakub Jelinek via Gcc-patches wrote: On Fri, Mar 25, 2022 at 10:18:49AM +0100, Tom de Vries wrote: [...] Fix this by scaling down the failing test-cases. Tested on x86_64-linux with nvptx accelerator. [...] Will defer to Thomas

[PATCH][libgomp, testsuite] Scale down some OpenACC test-cases

2022-03-25 Thread Tom de Vries via Gcc-patches
for trunk? Thanks, - Tom [libgomp, testsuite] Scale down some OpenACC test-cases libgomp/ChangeLog: 2022-03-25 Tom de Vries PR libgomp/105042 * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Reduce execution time. * testsuite/libgomp.oacc-c-c++-common/vred2d

Re: [PATCH][libatomic] Fix return value in libat_test_and_set

2022-03-24 Thread Tom de Vries via Gcc-patches
On 3/24/22 11:59, Jakub Jelinek wrote: On Thu, Mar 24, 2022 at 11:01:30AM +0100, Tom de Vries wrote: Shouldn't that be instead return (woldval & ((UWORD) -1 << shift)) != 0; or return (woldval & ((UWORD) ~(UWORD) 0 << shift)) != 0; ? Well, I used '(woldval &a

Re: [PATCH][libatomic] Fix return value in libat_test_and_set

2022-03-24 Thread Tom de Vries via Gcc-patches
On 3/24/22 10:02, Jakub Jelinek wrote: On Thu, Mar 24, 2022 at 09:28:15AM +0100, Tom de Vries via Gcc-patches wrote: Hi, On nvptx (using a Quadro K2000 with driver 470.103.01) I ran into this: ... FAIL: gcc.dg/atomic/stdatomic-flag-2.c -O1 execution test ... which mimimized to: ... #include

[PATCH][libatomic] Fix return value in libat_test_and_set

2022-03-24 Thread Tom de Vries via Gcc-patches
Hi, On nvptx (using a Quadro K2000 with driver 470.103.01) I ran into this: ... FAIL: gcc.dg/atomic/stdatomic-flag-2.c -O1 execution test ... which mimimized to: ... #include atomic_flag a = ATOMIC_FLAG_INIT; int main () { if ((atomic_flag_test_and_set) ()) __builtin_abort ();

[committed][nvptx] Use '%' as register prefix

2022-03-22 Thread Tom de Vries via Gcc-patches
Tom de Vries PR target/104925 * config/nvptx/nvptx.md (define_insn "nvptx_uniform_warp_check"): Use % as register prefix. --- gcc/config/nvptx/nvptx.md | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gcc/config/nvptx/nvpt

[committed][nvptx] Limit HFmode support to mexperimental

2022-03-22 Thread Tom de Vries via Gcc-patches
/ChangeLog: 2022-03-19 Tom de Vries * config/nvptx/nvptx.cc (nvptx_scalar_mode_supported_p) (nvptx_libgcc_floating_mode_supported_p): Only enable HFmode for mexperimental. gcc/testsuite/ChangeLog: 2022-03-19 Tom de Vries * gcc.target/nvptx/float16-1.c: Add

[committed][nvptx] Add mexperimental

2022-03-22 Thread Tom de Vries via Gcc-patches
-experimental. If more features at the same time will be developed, we can do something like -mexperimental=feature1,feature2 but for now that's not necessary. For now, has no effect. Committed to trunk. Thanks, - Tom [nvptx] Add mexperimental gcc/ChangeLog: 2022-03-19 Tom de Vries * config

[committed][nvptx] Use .alias directive for mptx >= 6.3

2022-03-22 Thread Tom de Vries via Gcc-patches
he point of view of the common part of the compiler, aliases are supported. Committed to trunk. Thanks, - Tom [nvptx] Use .alias directive for mptx >= 6.3 gcc/ChangeLog: 2022-03-18 Tom de Vries PR target/104957 * config/nvptx/nvptx-protos.h (nvptx_asm_output_def_from_decls): Dec

[committed][nvptx] Add warp sync at simt exit

2022-03-22 Thread Tom de Vries via Gcc-patches
d hang is the problem described above. Fix this by adding an explicit warp sync at simt exit. Note that we're assuming here that the warp will stay uniform until the next SIMT region entry. Tested on x86_64 with nvptx accelerator. Committed to trunk. Thanks, - Tom [nvptx] Add warp sync at simt exi

Re: [PING^2][PATCH][final] Handle compiler-generated asm insn

2022-03-21 Thread Tom de Vries via Gcc-patches
On 3/21/22 14:49, Richard Biener wrote: On Mon, Mar 21, 2022 at 12:50 PM Tom de Vries wrote: On 3/21/22 08:58, Richard Biener wrote: On Thu, Mar 17, 2022 at 4:10 PM Tom de Vries via Gcc-patches wrote: On 3/9/22 13:50, Tom de Vries wrote: On 2/22/22 14:55, Tom de Vries wrote: Hi

Re: [PING^2][PATCH][final] Handle compiler-generated asm insn

2022-03-21 Thread Tom de Vries via Gcc-patches
On 3/21/22 08:58, Richard Biener wrote: On Thu, Mar 17, 2022 at 4:10 PM Tom de Vries via Gcc-patches wrote: On 3/9/22 13:50, Tom de Vries wrote: On 2/22/22 14:55, Tom de Vries wrote: Hi, For the nvptx port, with -mptx-comment we have in pr53465.s: ... // #APP // 9 "gcc/test

Re: [PATCH][openmp] Set location for taskloop stmts

2022-03-18 Thread Tom de Vries via Gcc-patches
On 3/18/22 15:56, Jakub Jelinek wrote: On Fri, Mar 18, 2022 at 03:42:48PM +0100, Tom de Vries wrote: And for NVPTX we somehow lower the taskloop into GIMPLE_ASM or how we end up ICEing? In the nvptx backend, gen_comment (triggering not very frequently atm) uses gen_rtx_ASM_INPUT_loc

[committed][openmp] Fix SIMT reduction using TRUTH_{AND,OR}IF_EXPR

2022-03-18 Thread Tom de Vries via Gcc-patches
-03-17 Tom de Vries PR target/104952 * omp-low.cc (lower_rec_input_clauses): Make sure GOMP_SIMT_XCHG_BFLY is executed unconditionally. libgomp/ChangeLog: 2022-03-17 Tom de Vries PR target/104952 * testsuite/libgomp.c/pr104952-1.c: New test

Re: [PATCH][openmp] Set location for taskloop stmts

2022-03-18 Thread Tom de Vries via Gcc-patches
On 3/18/22 14:01, Jakub Jelinek wrote: On Fri, Mar 18, 2022 at 01:44:00PM +0100, Tom de Vries wrote: The test-case included in this patch contains: ... #pragma omp taskloop simd shared(a) lastprivate(myId) ... This is translated to 3 taskloop statements in gimple, visible with -fdump-tree

[PATCH][openmp] Set location for taskloop stmts

2022-03-18 Thread Tom de Vries via Gcc-patches
. Tested libgomp testsuite on x86_64 with nvptx accelerator. OK for trunk? Thanks, - Tom [openmp] Set location for taskloop stmts gcc/ChangeLog: 2022-03-18 Tom de Vries * gimplify.cc (gimplify_omp_for): Set taskloop location. gcc/testsuite/ChangeLog: 2022-03-18 Tom de Vries

[PING^2][PATCH][final] Handle compiler-generated asm insn

2022-03-17 Thread Tom de Vries via Gcc-patches
On 3/9/22 13:50, Tom de Vries wrote: On 2/22/22 14:55, Tom de Vries wrote: Hi, For the nvptx port, with -mptx-comment we have in pr53465.s: ... // #APP // 9 "gcc/testsuite/gcc.c-torture/execute/pr53465.c" 1 // Start: Added by -minit-regs=3:

PING**4 - [PATCH] middle-end: Support ABIs that pass FP values as wider integers.

2022-03-14 Thread Tom de Vries via Gcc-patches
On 3/2/22 20:18, Jeff Law via Gcc-patches wrote: On 2/28/2022 5:54 AM, Richard Biener via Gcc-patches wrote: On Mon, 28 Feb 2022, Tobias Burnus wrote: Ping**3 On 23.02.22 09:42, Tobias Burnus wrote: PING**2 for the ME review or at least comments to that patch, which fixes a build

[committed][nvptx] Use no,yes for attribute predicable

2022-03-10 Thread Tom de Vries via Gcc-patches
quot;false,true" (const_string "true")) ... Fix this by updating to: ... (define_attr "predicable" "no,yes" (const_string "yes")) ... Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Use no,yes for attribute predicable gcc/ChangeLog: 2022-03-0

[committed][nvptx] Disable warp sync in simt region

2022-03-10 Thread Tom de Vries via Gcc-patches
ync (and likewise, bar.warp.sync and the uniform warp check) such that it only executes outside the SIMT region. Tested on x86_64 with nvptx accelerator. Committed to trunk. Thanks, - Tom [nvptx] Disable warp sync in simt region gcc/ChangeLog: 2022-03-08 Tom de Vries PR target/104

[committed][nvptx] Handle unused result in nvptx_unisimt_handle_set

2022-03-10 Thread Tom de Vries via Gcc-patches
, 1; bar.warp.sync 0x; ... Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Handle unused result in nvptx_unisimt_handle_set gcc/ChangeLog: 2022-03-07 Tom de Vries * config/nvptx/nvptx.cc (nvptx_unisimt_handle_set): Handle unused result. gcc/testsu

[committed][nvptx] Use bit-bucket operand for atom insns

2022-03-10 Thread Tom de Vries via Gcc-patches
for all atom insns. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Use bit-bucket operand for atom insns gcc/ChangeLog: 2022-03-07 Tom de Vries PR target/104815 * config/nvptx/nvptx.cc (nvptx_print_operand): Handle 'x' operand modifier. * config

[committed][nvptx] Use atom.and.b64 instead of atom.b64.and

2022-03-10 Thread Tom de Vries via Gcc-patches
on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Use atom.and.b64 instead of atom.b64.and gcc/ChangeLog: 2022-03-07 Tom de Vries * config/nvptx/nvptx.md (define_insn "atomic_fetch_"): Emit atom.and.b64 instead of atom.b64.and. gcc/testsuite/ChangeLog: 2022-03-07 To

[committed][nvptx] Add multilib mptx=3.1

2022-03-10 Thread Tom de Vries via Gcc-patches
scenarios. With --enable-multilib, we can enable older drivers, as well as generate code similar to how that was done in previous gcc releases, which is very useful. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Add multilib mptx=3.1 gcc/ChangeLog: 2022-03-07 Tom de Vries * conf

[committed][nvptx] Restore default to sm_30

2022-03-10 Thread Tom de Vries via Gcc-patches
sm_35, so fix this by switching back to default sm_30. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Restore default to sm_30 gcc/ChangeLog: 2022-03-07 Tom de Vries PR target/104758 * config/nvptx/nvptx.opt (misa): Set default to sm_30. * config/nvp

[PING][PATCH][final] Handle compiler-generated asm insn

2022-03-09 Thread Tom de Vries via Gcc-patches
On 2/22/22 14:55, Tom de Vries wrote: Hi, For the nvptx port, with -mptx-comment we have in pr53465.s: ... // #APP // 9 "gcc/testsuite/gcc.c-torture/execute/pr53465.c" 1 // Start: Added by -minit-regs=3: // #NO_APP mov.u32 %r26, 0;

[committed][nvptx] Build libraries with mptx=3.1

2022-03-03 Thread Tom de Vries via Gcc-patches
Tom de Vries * config/nvptx/t-nvptx (MULTILIB_EXTRA_OPTS): Add mptx=3.1. --- gcc/config/nvptx/t-nvptx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/nvptx/t-nvptx b/gcc/config/nvptx/t-nvptx index 056d2dd2d04..8f67264d132 100644 --- a/gcc/config/nvptx/t

[committed][nvptx] Build libraries with misa=sm_30

2022-03-03 Thread Tom de Vries via Gcc-patches
, - Tom [nvptx] Build libraries with misa=sm_30 gcc/ChangeLog: 2022-03-03 Tom de Vries PR target/104758 * config/nvptx/t-nvptx (MULTILIB_EXTRA_OPTS): Add misa=sm_30. --- gcc/config/nvptx/t-nvptx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/config/nvptx/t-nvptx b/gcc

[committed][nvptx] Use --no-verify for sm_30

2022-03-03 Thread Tom de Vries via Gcc-patches
. Thanks, - Tom [nvptx] Use --no-verify for sm_30 gcc/ChangeLog: 2022-03-03 Tom de Vries * config/nvptx/nvptx.h (ASM_SPEC): Add %{misa=sm_30:--no-verify}. --- gcc/config/nvptx/nvptx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/nvptx/nvptx.h b/gcc

[committed][nvptx] Add -mptx=_ in gcc.target/nvptx/smxx.c

2022-03-03 Thread Tom de Vries via Gcc-patches
and similar. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Add -mptx=_ in gcc.target/nvptx/smxx.c gcc/testsuite/ChangeLog: 2022-03-03 Tom de Vries * gcc.target/nvptx/sm53.c: Add -mptx=_. * gcc.target/nvptx/sm70.c: Same. * gcc.target/nvptx/sm75.c: Same

[committed][nvptx] Handle DCmode in define_expand "omp_simt_xchg_{bfly,idx}"

2022-03-01 Thread Tom de Vries via Gcc-patches
and CDImode in define_expand "omp_simt_xchg_{bfly,idx}". Tested on x86_64 with nvptx accelerator. Committed to trunk. Thanks, - Tom [nvptx] Handle DCmode in define_expand "omp_simt_xchg_{bfly,idx}" gcc/ChangeLog: 2022-02-28 Tom de Vries PR target/102429 * c

[committed][nvptx] Add nvptx-gen.h and nvptx-gen.opt

2022-03-01 Thread Tom de Vries via Gcc-patches
/ChangeLog: 2022-02-25 Tom de Vries * config.gcc (nvptx*-*-*): Add nvptx/nvptx-gen.opt to extra_options. * config/nvptx/gen-copyright.sh: New file. * config/nvptx/gen-h.sh: New file. * config/nvptx/gen-opt.sh: New file. * config/nvptx/nvptx.h (TARGET_SM35

[committed][nvptx] Use nvptx-sm.def for t-omp-device

2022-03-01 Thread Tom de Vries via Gcc-patches
Hi, Add a script gen-omp-device-properties.sh that uses nvptx-sm.def to generate omp-device-properties-nvptx. Tested on x86_64 with nvptx accelerator. Committed to trunk. Thanks, - Tom [nvptx] Use nvptx-sm.def for t-omp-device gcc/ChangeLog: 2022-02-25 Tom de Vries * config

[committed][nvptx] Add nvptx-sm.def

2022-03-01 Thread Tom de Vries via Gcc-patches
a pattern: ... #define NVPTX_SM(XX, SEP) { ... } #include "nvptx-sm.def" #undef NVPTX_SM ... Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx] Add nvptx-sm.def gcc/ChangeLog: 2022-02-25 Tom de Vries * config/nvptx/nvptx-sm.def: New file. * config/n

[committed][nvptx, testsuite] Add gcc.target/nvptx/sm*.c

2022-03-01 Thread Tom de Vries via Gcc-patches
Hi, Add a few test-cases that test passing each -misa=sm_xx version and verify that the proper __PTX_SM__ is defined. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx, testsuite] Add gcc.target/nvptx/sm*.c gcc/testsuite/ChangeLog: 2022-02-25 Tom de Vries * gcc.target

[committed][libgomp, testsuite, nvptx] Add -mptx=_ in declare-variant-3-sm*.c

2022-02-28 Thread Tom de Vries via Gcc-patches
-variant-3-sm*.c libgomp/ChangeLog: 2022-02-28 Tom de Vries * testsuite/libgomp.c/declare-variant-3-sm30.c: Add -foffload=-mptx=_. * testsuite/libgomp.c/declare-variant-3-sm35.c: Same. * testsuite/libgomp.c/declare-variant-3-sm53.c: Same. * testsuite/libgomp.c

[committed][nvptx, testsuite] Add -mptx=_ in nvptx.exp test-cases

2022-02-28 Thread Tom de Vries via Gcc-patches
cases by adding an explicit -mptx=_ setting. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx, testsuite] Add -mptx=_ in nvptx.exp test-cases gcc/testsuite/ChangeLog: 2022-02-28 Tom de Vries * gcc.target/nvptx/atomic-store-1.c: Add -mptx=_. * gcc.target/nvptx/atomic

[committed][nvptx] Add -mptx=_

2022-02-28 Thread Tom de Vries via Gcc-patches
/ChangeLog: 2022-02-28 Tom de Vries * config/nvptx/nvptx-opts.h (enum ptx_version): Add PTX_VERSION_default. * config/nvptx/nvptx.cc (handle_ptx_version_option): Handle PTX_VERSION_default. * config/nvptx/nvptx.opt: Add EnumValue "_" / PTX_VERSI

[committed][nvptx, testsuite] Add -misa=sm_30 in nvptx/atomic-store-3.c

2022-02-28 Thread Tom de Vries via Gcc-patches
. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx, testsuite] Add -misa=sm_30 in nvptx/atomic-store-3.c gcc/testsuite/ChangeLog: 2022-02-28 Tom de Vries * gcc.target/nvptx/atomic-store-3.c: Add -misa=sm_30. --- gcc/testsuite/gcc.target/nvptx/atomic-store-3.c | 2 +- 1

[committed][nvptx, testsuite] Add -misa=sm_30 in nvptx/uniform-simt-2.c

2022-02-28 Thread Tom de Vries via Gcc-patches
an explicit -misa=sm_30 in the test-case. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx, testsuite] Add -misa=sm_30 in nvptx/uniform-simt-2.c gcc/testsuite/ChangeLog: 2022-02-28 Tom de Vries * gcc.target/nvptx/uniform-simt-2.c: Add -misa=sm_30. --- gcc/testsuite

[committed][nvptx, testsuite] Add -misa=sm_35 in nvptx/rotate.c

2022-02-28 Thread Tom de Vries via Gcc-patches
this by adding an explicit -misa=sm_35 in the test-case. Tested on nvptx. Committed to trunk. Thanks, - Tom [nvptx, testsuite] Add -misa=sm_35 in nvptx/rotate.c gcc/testsuite/ChangeLog: 2022-02-28 Tom de Vries * gcc.target/nvptx/rotate.c: Add -misa=sm_35. --- gcc/testsuite/gcc.target/nvptx

Re: [PATCH][libgomp, testsuite, nvptx] Add libgomp.c/declare-variant-3-sm*.c

2022-02-24 Thread Tom de Vries via Gcc-patches
On 2/24/22 11:09, Jakub Jelinek wrote: On Thu, Feb 24, 2022 at 11:01:22AM +0100, Tom de Vries wrote: [ was: Re: [Patch] nvptx: Add -mptx=6.0 + -misa=sm_70 ] On 2/24/22 09:29, Tom de Vries wrote: I'll try to submit a patch with one or more test-cases. Hi, These test-cases exercise the omp

[PATCH][libgomp, testsuite, nvptx] Add libgomp.c/declare-variant-3-sm*.c

2022-02-24 Thread Tom de Vries via Gcc-patches
[ was: Re: [Patch] nvptx: Add -mptx=6.0 + -misa=sm_70 ] On 2/24/22 09:29, Tom de Vries wrote: I'll try to submit a patch with one or more test-cases. Hi, These test-cases exercise the omp declare variant construct using the available nvptx isas. OK for trunk? Thanks, - Tom[libgomp

Re: [Patch] nvptx: Add -mptx=6.0 + -misa=sm_70

2022-02-24 Thread Tom de Vries via Gcc-patches
On 2/22/22 17:03, Tobias Burnus wrote: Hi Tom, On 22.02.22 15:43, Tom de Vries wrote: On 2/17/22 18:24, Tobias Burnus wrote: --- a/gcc/config/nvptx/t-omp-device +++ b/gcc/config/nvptx/t-omp-device @@ -1,4 +1,4 @@ echo kind: gpu > $@ echo arch: nvptx >> $@ -    echo isa: sm

[committed][nvptx] Add shf.{l,r}.wrap insn

2022-02-24 Thread Tom de Vries via Gcc-patches
On 2/23/22 12:40, Tom de Vries wrote: Hi, Ptx contains funnel shift operations shf.l.wrap and shf.r.wrap that can be used to implement 32-bit left or right rotate. Add define_insns rotlsi3 and rotrsi3. Currently testing. And committed. Thanks, - Tom [nvptx] Add shf.{l,r}.wrap insn gcc

[committed][nvptx] Fix dummy location in gen_comment

2022-02-24 Thread Tom de Vries via Gcc-patches
On 2/23/22 12:58, Thomas Schwinge wrote: Hi! On 2022-02-23T12:14:57+0100, Tom de Vries via Gcc-patches wrote: [ Re: [committed][nvptx] Add -mptx-comment ] On 2/22/22 14:53, Tom de Vries wrote: Add functionality that indicates which insns are added by -minit-regs, such that for instance we

[PATCH][nvptx] Add shf.{l,r}.wrap insn

2022-02-23 Thread Tom de Vries via Gcc-patches
Hi, Ptx contains funnel shift operations shf.l.wrap and shf.r.wrap that can be used to implement 32-bit left or right rotate. Add define_insns rotlsi3 and rotrsi3. Currently testing. Thanks, - Tom [nvptx] Add shf.{l,r}.wrap insn gcc/ChangeLog: 2022-02-23 Tom de Vries * config

[PATCH][nvptx] Fix dummy location in gen_comment

2022-02-23 Thread Tom de Vries via Gcc-patches
[ Re: [committed][nvptx] Add -mptx-comment ] On 2/22/22 14:53, Tom de Vries wrote: Hi, Add functionality that indicates which insns are added by -minit-regs, such that for instance we have for pr53465.s: ... // #APP // 9 "gcc/testsuite/gcc.c-torture/execute/pr53465

Re: [committed][nvptx] Use nvptx_warpsync / nvptx_uniform_warp_check for -muniform-simt

2022-02-23 Thread Tom de Vries via Gcc-patches
On 2/23/22 10:06, Thomas Schwinge wrote: Hi Tom! This is me again, following along GCC/nvptx devlopment, and asking questions. ;-) Yes, thanks for that, that's useful :) On 2022-02-19T20:07:18+0100, Tom de Vries via Gcc-patches wrote: With the default ptx isa 6.0, we have for uniform

Re: [PATCH] middle-end: Support ABIs that pass FP values as wider integers.

2022-02-22 Thread Tom de Vries via Gcc-patches
dling of SUBREGs was tightened up, so this might be considered a regression. Cheers, Roger -- -Original Message----- From: Tom de Vries Sent: 22 February 2022 15:43 To: Roger Sayle ; gcc-patches@gcc.gnu.org Subject: Re: [PATCH] middle-end: Support ABIs that pass FP values as wider integers.

Re: [PATCH] nvptx: Back-end portion of a fix for PR target/104489.

2022-02-22 Thread Tom de Vries via Gcc-patches
-patches/2022-February/590139.html This patch has been tested on nvptx-none hosted on x86_64-pc-linux-gnu, together with the above middle-end patch and changes identical to those described by Tom de Vries in the PR, with make and make -k check, where the build now completes

Re: [PATCH] middle-end: Support ABIs that pass FP values as wider integers.

2022-02-22 Thread Tom de Vries via Gcc-patches
On 2/9/22 21:12, Roger Sayle wrote: This patch adds middle-end support for target ABIs that pass/return floating point values in integer registers with precision wider than the original FP mode. An example, is the nvptx backend where 16-bit HFmode registers are passed/returned as (promoted to)

  1   2   3   4   5   6   7   8   9   10   >