[PATCH v1] RISC-V: Adjust FP rint round tests for RV32

2023-11-06 Thread pan2 . li
From: Pan Li The FP rint test cases for RV32 need some additional adjust for types and data. This patch would like to fix this which is missed in FP rint support PATCH for RV32 only by mistake. Please note the math-llrintf-run-0.c will trigger one ICE in the vsetvl pass in RV32 only. ./riscv32-

Re: [PATCH v1] RISC-V: Adjust FP rint round tests for RV32

2023-11-06 Thread juzhe.zh...@rivai.ai
LGTM. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-11-06 16:33 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Adjust FP rint round tests for RV32 From: Pan Li The FP rint test cases for RV32 need some additional adjust for types and data. Th

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-06 Thread Arnaud Charlet
> > So without changing fundamentally the model, you can't decide dynamically > > for the whole > > system. Making the choice based on the current directory is pretty random, > > since the current > > directory isn't well defined at program's start up and could be pretty much > > any filesystem.

Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2023-11-06 Thread Tobias Burnus
On 03.11.23 20:53, Kwok Cheung Yeung wrote: On 17/10/2023 2:12 pm, Tobias Burnus wrote: C++11 (and C23) attribute do not seem to be properly handled: (Side remark: Since Saturday, the [[omp::]] attributes syntax is now also supported in C23.) [Quoted email text by Kwok: Lots of lines removed

[PATCH] tree-optimization/112369 - strip_float_extensions and vectors

2023-11-06 Thread Richard Biener
The following fixes an error in strip_float_extensions when facing vector conversions. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/112369 * tree.cc (strip_float_extensions): Use element_precision. * gcc.dg/pr112369.c: New testcase. --

Re: [RFC] vect: disable multiple calls of poly simdclones

2023-11-06 Thread Andrew Stubbs
On 06/11/2023 07:52, Richard Biener wrote: On Fri, 3 Nov 2023, Andre Vieira (lists) wrote: Hi, The current codegen code to support VF's that are multiples of a simdclone simdlen rely on BIT_FIELD_REF to create multiple input vectors. This does not work for non-constant simdclones, so we sh

[PATCH-3v2, rs6000] Enable 16-byte by pieces move [PR111449]

2023-11-06 Thread HAO CHEN GUI
Hi, The patch 2 enables 16-byte by pieces move on rs6000. This patch fixes the regression cases caused by previous patch. For sra-17/18, the long array with 4 elements can be loaded by one 16-byte by pieces move on 32-bit platform. So the array is not be constructed in LC0 and SRA optimization is

Re: [RFC] vect: disable multiple calls of poly simdclones

2023-11-06 Thread Richard Biener
On Mon, 6 Nov 2023, Andrew Stubbs wrote: > > > On 06/11/2023 07:52, Richard Biener wrote: > > On Fri, 3 Nov 2023, Andre Vieira (lists) wrote: > > > >> Hi, > >> > >> The current codegen code to support VF's that are multiples of a simdclone > >> simdlen rely on BIT_FIELD_REF to create multiple i

Re: [PATCH] libstdc++: Improve static assert messages for monadic operations

2023-11-06 Thread Jonathan Wakely
On Thu, 2 Nov 2023 at 14:55, Jonathan Wakely wrote: > > Any objections or suggestions for better wording? > > Tested x86_64-linux. Pushed to trunk. > > -- >8 -- > > The monadic operations for std::optional and std::expected make use of > internal helper traits __is_optional nad __is_expected, w

[PATCH v3 1/2]middle-end: expand copysign handling from lockstep to nested iters

2023-11-06 Thread Tamar Christina
Hi All, various optimizations in match.pd only happened on COPYSIGN in lock step which means they exclude IFN_COPYSIGN. COPYSIGN however is restricted to only the C99 builtins and so doesn't work for vectors. The patch expands these optimizations to work as nested iters. This is needed for the

[PATCH v3 2/2]middle-end match.pd: optimize fneg (fabs (x)) to copysign (x, -1) [PR109154]

2023-11-06 Thread Tamar Christina
Hi All, This patch transforms fneg (fabs (x)) into copysign (x, -1) which is more canonical and allows a target to expand this sequence efficiently. Such sequences are common in scientific code working with gradients. There is an existing canonicalization of copysign (x, -1) to fneg (fabs (x)) w

[PATCH] Avoid generating RTL code when d->testing_p.

2023-11-06 Thread liuhongt
Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready push to trunk. gcc/ChangeLog: PR target/112393 * config/i386/i386-expand.cc (ix86_expand_vec_perm_vpermt2): Avoid generating RTL code when d->testing_p. gcc/testsuite/ChangeLog: * gcc.target/i386/pr1

Re: [PATCH] libstdc++/complex: Remove implicit type casts in complex

2023-11-06 Thread Jonathan Wakely
On Fri, 3 Nov 2023 at 17:47, Weslley da Silva Pereira wrote: > > Hi Jonathan, > > I am sorry for the delay. The mailing lists libstd...@gcc.gnu.org and > gcc-patches@gcc.gnu.org have just too many emails, so your email got lost. I > hope my changes still make sense to be included in GCC. Please,

[committed] libgfortran: Fix calloc call by swapping arg order [PR112364]

2023-11-06 Thread Tobias Burnus
See PR for a discussion whether this change is required for alignment (or other) reasons (looks as if not) - or"just" to match the indented order (arg names + description) and to silence a -Walloc-size warning. Committed as r14-5148-g17df6ddcf11aef (BTW: I don't think that it is worthwhile to

Re: [PATCH] testsuite, Darwin: Add support for Mach-O function body scans.

2023-11-06 Thread Richard Sandiford
Iain Sandoe writes: > Hi Richard, > >> On 5 Nov 2023, at 12:11, Richard Sandiford wrote: >> >> Iain Sandoe writes: > On 26 Oct 2023, at 21:00, Iain Sandoe wrote: >>> > On 26 Oct 2023, at 20:49, Richard Sandiford >>> wrote: > > Iain Sandoe writes: >> This was written be

[PATCH] testsuite: skip gcc.target/i386/pr106910-1.c test when using newlib

2023-11-06 Thread Marc Poulhiès
Using newlib produces a different codegen because the support for c99 differs (see libc_has_function hook). gcc/testsuite/ChangeLog: * gcc.target/i386/pr106910-1.c: Disable for newlib. --- Tested on x86_64-linux and x86_64-elf. OK for master? gcc/testsuite/gcc.target/i386/pr106910-1.c

[PATCH] testsuite: require avx_runtime for some tests

2023-11-06 Thread Marc Poulhiès
These 3 tests fails parsing the 'vect' dump when not using -mavx. Make the dependency explicit. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-ifcvt-18.c: Add dep on avx_runtime. * gcc.dg/vect/vect-simd-clone-16f.c: Likewise. * gcc.dg/vect/vect-simd-clone-18f.c: Likewise. ---

[PATCH] testsuite: refine gcc.dg/analyzer/fd-4.c test for newlib

2023-11-06 Thread Marc Poulhiès
Contrary to glibc, including stdio.h from newlib defines mode_t which conflicts with the test's type definition. .../gcc/testsuite/gcc.dg/analyzer/fd-4.c:19:3: error: redefinition of typedef 'mode_t' with different type ... .../include/sys/types.h:189:25: note: previous declaration of 'mode_t' wi

Re: [PATCH 5/5] x86: yet more PR target/100711-like splitting

2023-11-06 Thread Jan Beulich
On 25.06.2023 08:41, Hongtao Liu wrote: > On Sun, Jun 25, 2023 at 2:35 PM Hongtao Liu wrote: >> >> On Sun, Jun 25, 2023 at 2:25 PM Jan Beulich wrote: >>> >>> On 25.06.2023 07:12, Hongtao Liu wrote: On Wed, Jun 21, 2023 at 2:29 PM Jan Beulich via Gcc-patches wrote: > > --- >

Re: [PING][PATCH 2/2] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2023-11-06 Thread Richard Sandiford
Stamatis Markianos-Wright writes: >> One of the main reasons for reading the arm bits was to try to answer >> the question: if we switch to a downcounting loop with a GE condition, >> how do we make sure that the start value is not a large unsigned >> number that is interpreted as negative by GE?

[PATCH] LoongArch: Remove redundant barrier instructions before LL-SC loops

2023-11-06 Thread Xi Ruoyao
This is isomorphic to the LLVM changes [1-2]. On LoongArch, the LL and SC instructions has memory barrier semantics: - LL: + - SC: + But the compare and swap operation is allowed to fail, and if it fails the SC instruction is not executed, thus the guarantee of acquiring semantics cannot be

[PATCH 0/2] libgfortran: empty array fixes [PR112371]

2023-11-06 Thread Mikael Morin
Hello, while preparing a testcase, I encountered a bug which I filed as PR112371. Investigating further, I found two different problems which I propose to fix with the followup patches. Those have been bootstraped and regression tested on x86_64-pc-linux-gnu. OK for master? Mikael Mikael Mori

[PATCH 1/2] libgfortran: Remove early return if extent is zero [PR112371]

2023-11-06 Thread Mikael Morin
Remove the early return present in function templates for transformational functions doing a (masked) reduction of an array along a dimension. This early return, which triggered if the extent in the reduction dimension was zero, was wrong because even if the reduction operation degenerates to a con

[PATCH] libstdc++/112351 - deal with __gthread_once failure during locale init

2023-11-06 Thread Richard Biener
The following makes the C++98 locale init path follow the way the C++11 performs initialization. This way we deal with pthread_once failing, falling back to non-threadsafe initialization which, given we initialize from the library, should be serialized by the dynamic loader already. Bootstrapped

Re: [PATCH v2] AArch64: Fix strict-align cpymem/setmem [PR103100]

2023-11-06 Thread Wilco Dijkstra
ping   v2: Use UINTVAL, rename max_mops_size. The cpymemdi/setmemdi implementation doesn't fully support strict alignment. Block the expansion if the alignment is less than 16 with STRICT_ALIGNMENT. Clean up the condition when to use MOPS.     Passes regress/bootstrap, OK for commit?     gcc/Ch

Re: [PATCH v2] AArch64: Add inline memmove expansion

2023-11-06 Thread Wilco Dijkstra
ping   v2: further cleanups, improved comments Add support for inline memmove expansions.  The generated code is identical as for memcpy, except that all loads are emitted before stores rather than being interleaved.  The maximum size is 256 bytes which requires at most 16 registers. Passes regre

Re: [PATCH] AArch64: Cleanup memset expansion

2023-11-06 Thread Wilco Dijkstra
ping   Cleanup memset implementation.  Similar to memcpy/memmove, use an offset and bytes throughout.  Simplify the complex calculations when optimizing for size by using a fixed limit. Passes regress/bootstrap, OK for commit?     gcc/ChangeLog:     * config/aarch64/aarch64.cc (aarch64_progre

Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-11-06 Thread Wilco Dijkstra
  ping   __sync_val_compare_and_swap may be used on 128-bit types and either calls the outline atomic code or uses an inline loop.  On AArch64 LDXP is only atomic if the value is stored successfully using STXP, but the current implementations do not perform the store if the comparison fails.  In

Re: [PATCH] libatomic: Improve ifunc selection on AArch64

2023-11-06 Thread Wilco Dijkstra
  ping From: Wilco Dijkstra Sent: 04 August 2023 16:05 To: GCC Patches ; Richard Sandiford Cc: Kyrylo Tkachov Subject: [PATCH] libatomic: Improve ifunc selection on AArch64   Add support for ifunc selection based on CPUID register.  Neoverse N1 supports atomic 128-bit load/store, so use the

Re: [PATCH] libatomic: Enable lock-free 128-bit atomics on AArch64 [PR110061]

2023-11-06 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 02 June 2023 18:28 To: GCC Patches Cc: Richard Sandiford ; Kyrylo Tkachov Subject: [PATCH] libatomic: Enable lock-free 128-bit atomics on AArch64 [PR110061]   Enable lock-free 128-bit atomics on AArch64.  This is backwards compatible with existing binaries,

Re: [PATCH] libstdc++/112351 - deal with __gthread_once failure during locale init

2023-11-06 Thread Jonathan Wakely
On Mon, 6 Nov 2023 at 11:52, Richard Biener wrote: > > The following makes the C++98 locale init path follow the way the > C++11 performs initialization. This way we deal with pthread_once > failing, falling back to non-threadsafe initialization which, given we > initialize from the library, shou

Re: [PATCH] libstdc++/112351 - deal with __gthread_once failure during locale init

2023-11-06 Thread Jakub Jelinek
On Mon, Nov 06, 2023 at 11:52:08AM +, Richard Biener wrote: > The following makes the C++98 locale init path follow the way the > C++11 performs initialization. This way we deal with pthread_once > failing, falling back to non-threadsafe initialization which, given we > initialize from the lib

Re: [PATCH] libstdc++/112351 - deal with __gthread_once failure during locale init

2023-11-06 Thread Jonathan Wakely
On Mon, 6 Nov 2023 at 12:16, Jakub Jelinek wrote: > > On Mon, Nov 06, 2023 at 11:52:08AM +, Richard Biener wrote: > > The following makes the C++98 locale init path follow the way the > > C++11 performs initialization. This way we deal with pthread_once > > failing, falling back to non-thread

[PATCH 1/3] attribs: Cache the gnu namespace

2023-11-06 Thread Richard Sandiford
Later patches add more calls to get_attribute_namespace. For scoped attributes, this is a simple operation on tree pointers. But for normal GNU attributes (the vast majority), it involves a call to get_identifier ("gnu"). This patch caches the identifier for speed. Admittedly I'm just going off g

[PATCH 2/3] attribs: Consider namespaces when comparing attributes

2023-11-06 Thread Richard Sandiford
decl_attributes and comp_type_attributes both had code that iterated over one list of attributes and looked for coresponding attributes in another list. This patch makes those lookups namespace-aware. Tested on aarch64-linux-gnu & x86_64-linux-gnu. OK to install? Richard gcc/ * attrib

[PATCH 3/3] attribs: Namespace-aware lookup_attribute_spec

2023-11-06 Thread Richard Sandiford
attribute_ignored_p already used a namespace-aware query to find the attribute_spec for an existing attribute: const attribute_spec *as = lookup_attribute_spec (TREE_PURPOSE (attr)); This patch does the same for other callers in the file. Tested on aarch64-linux-gnu & x86_64-linux-gnu. OK

[PATCH] RISC-V: Early expand DImode vec_duplicate in RV32 system

2023-11-06 Thread Juzhe-Zhong
An ICE was discovered in recent rounding autovec support: config/riscv/riscv-v.cc:4314 65 | } | ^ 0x1fa5223 riscv_vector::validate_change_or_fail(rtx_def*, rtx_def**, rtx_def*, bool) /home/pli/repos/gcc/222/riscv-gnu-toolchain/gcc/__RISC-V_BUILD/../gcc/config/riscv/riscv-v.cc:431

Ping: [PATCH] Allow target attributes in non-gnu namespaces

2023-11-06 Thread Richard Sandiford
This is a ping+rebase of the patch below. I've also optimised the handling of ignored attributes so that we don't register empty tables. There was also a typo in the jit changes (which I had tested, but the typo didn't seem to cause a failure). Retested on aarch64-linux-gnu & x86_64-linux-gnu. T

Re: [PATCH] attribs: Use existing traits for excl_hash_traits

2023-11-06 Thread Richard Sandiford
Ping. Richard Sandiford via Gcc-patches writes: > excl_hash_traits can be defined more simply by reusing existing traits. > > Tested on aarch64-linux-gnu. OK to install? > > Richard > > > gcc/ > * attribs.cc (excl_hash_traits): Delete. > (test_attribute_exclusions): Use pair_hash and

Re: [PATCH] RISC-V: Early expand DImode vec_duplicate in RV32 system

2023-11-06 Thread Kito Cheng
Could you add a testcase? other than that LGTM. On Mon, Nov 6, 2023 at 8:27 PM Juzhe-Zhong wrote: > > An ICE was discovered in recent rounding autovec support: > > config/riscv/riscv-v.cc:4314 >65 | } > | ^ > 0x1fa5223 riscv_vector::validate_change_or_fail(rtx_def*, rtx_def**, > rtx_def

Re: Re: [PATCH] RISC-V: Early expand DImode vec_duplicate in RV32 system

2023-11-06 Thread juzhe.zh...@rivai.ai
Testcase already existed on the trunk, which is added by Li Pan added recently when supporting rounding mode autovec. https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635280.html math-llrintf-run-0.c passed on RV64 but cause ICE on RV32. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2

Re: Re: [PATCH] RISC-V: Early expand DImode vec_duplicate in RV32 system

2023-11-06 Thread Kito Cheng
I would prefer to add a dedicated test case to test that, so that we could also cover that even if we didn't enable multi-lib testing for RV32, and I suppose that should only require compile test for part of that test case ? On Mon, Nov 6, 2023 at 8:41 PM juzhe.zh...@rivai.ai wrote: > > Testcase

Re: [PATCH] RISC-V: Early expand DImode vec_duplicate in RV32 system

2023-11-06 Thread juzhe.zhong
OK。will add it. Replied Message FromKito ChengDate11/06/2023 20:46 Tojuzhe.zh...@rivai.ai Cckito.cheng,gcc-patches,jeffreyalaw,Robin DappSubjectRe: Re: [PATCH] RISC-V: Early expand DImode vec_duplicate in RV32 systemI would prefer to add a dedicated test case to test that, so that we could

Re: [PATCH] libstdc++/112351 - deal with __gthread_once failure during locale init

2023-11-06 Thread Richard Biener
On Mon, 6 Nov 2023, Jonathan Wakely wrote: > On Mon, 6 Nov 2023 at 11:52, Richard Biener wrote: > > > > The following makes the C++98 locale init path follow the way the > > C++11 performs initialization. This way we deal with pthread_once > > failing, falling back to non-threadsafe initializati

[PATCH] RISC-V: VECT: Remember to assert any_known_not_updated_vssa

2023-11-06 Thread Maxim Blinov
From: Maxim Blinov This patch is based on and intended for the vendors/riscv/gcc-13-with-riscv-opts branch - please apply if looks OK. Fixes the following ICEs that I'm seeing: FAIL: gcc.dg/vect/O3-pr49087.c (internal compiler error: in vect_transform_loops, at tree-vectorizer.cc:1032) FAIL:

Re: [PATCH v3 1/2]middle-end: expand copysign handling from lockstep to nested iters

2023-11-06 Thread Richard Biener
On Mon, 6 Nov 2023, Tamar Christina wrote: > Hi All, > > various optimizations in match.pd only happened on COPYSIGN in lock step > which means they exclude IFN_COPYSIGN. COPYSIGN however is restricted to only > the C99 builtins and so doesn't work for vectors. > > The patch expands these optim

Re: [PATCH v3 2/2]middle-end match.pd: optimize fneg (fabs (x)) to copysign (x, -1) [PR109154]

2023-11-06 Thread Richard Biener
On Mon, 6 Nov 2023, Tamar Christina wrote: > Hi All, > > This patch transforms fneg (fabs (x)) into copysign (x, -1) which is more > canonical and allows a target to expand this sequence efficiently. Such > sequences are common in scientific code working with gradients. > > There is an existing

Re: [PATCH] RISC-V: VECT: Remember to assert any_known_not_updated_vssa

2023-11-06 Thread Richard Biener
On Mon, Nov 6, 2023 at 2:02 PM Maxim Blinov wrote: > > From: Maxim Blinov > > This patch is based on and intended for the > vendors/riscv/gcc-13-with-riscv-opts branch - please apply if looks OK. > > Fixes the following ICEs that I'm seeing: > > FAIL: gcc.dg/vect/O3-pr49087.c (internal compiler

[PATCH] tree-optimization/112404 - two issues with SLP of .MASK_LOAD

2023-11-06 Thread Richard Biener
The following fixes an oversight in vect_check_scalar_mask when the mask is external or constant. When doing BB vectorization we need to provide a group_size, best via an overload accepting the SLP node as argument. When fixed we then run into the issue that we have not analyzed alignment of the

Re: [PATCH] RISC-V: VECT: Remember to assert any_known_not_updated_vssa

2023-11-06 Thread Maxim Blinov
On Mon, 6 Nov 2023 at 13:07, Richard Biener wrote: > I see > > DEF_INTERNAL_OPTAB_FN (VEC_EXTRACT, ECF_CONST | ECF_NOTHROW, >vec_extract, vec_extract) > > ? Oh, you're right! I should have checked the master branch first... and I was even wondering why it wasn't marked as

[PATCH] tree-optimization/111950 - vectorizer loop copying

2023-11-06 Thread Richard Biener
The following simplifies LC-PHI arg population during epilog peeling, thereby fixing the testcase in this PR. Bootstrapped and tested on x86_64-unknown-linux-gnu, also built SPEC CPU 2017 with and without LTO, pushed. PR tree-optimization/111950 * tre-vect-loop-manip.cc (slpeel_du

Re: [PATCH] RISC-V: VECT: Remember to assert any_known_not_updated_vssa

2023-11-06 Thread Kito Cheng
> Oh, you're right! I should have checked the master branch first... and > I was even wondering why it wasn't marked as such. Should perhaps > cherry pick this for gcc-13-with-riscv-opts? gcc-13-with-riscv-opts mostly maintained by Ventana folks, so maybe ask Jeff if you want to cherry pick into

Re: [PATCH] RISC-V: VECT: Remember to assert any_known_not_updated_vssa

2023-11-06 Thread juzhe.zhong
Not sure who is maintaining this branch. I always developing on the master.  CCing to other riscv folks Replied Message FromMaxim BlinovDate11/06/2023 21:13 ToRichard Biener Ccgcc-patches@gcc.gnu.org,juzhe.zh...@rivai.ai,maxim.bli...@imgtec.comSubjectRe: [PATCH] RISC-V: VECT: Remember to as

Re: [PATCH 5/5] x86: yet more PR target/100711-like splitting

2023-11-06 Thread Hongtao Liu
On Mon, Nov 6, 2023 at 7:10 PM Jan Beulich wrote: > > On 25.06.2023 08:41, Hongtao Liu wrote: > > On Sun, Jun 25, 2023 at 2:35 PM Hongtao Liu wrote: > >> > >> On Sun, Jun 25, 2023 at 2:25 PM Jan Beulich wrote: > >>> > >>> On 25.06.2023 07:12, Hongtao Liu wrote: > On Wed, Jun 21, 2023 at 2:2

[PATCH v2] c-family: Enable -fpermissive for C and ObjC

2023-11-06 Thread Florian Weimer
Future changes will treat some C front end warnings similar to -Wnarrowing. gcc/ * doc/invoke.texi (Warning Options): Mention C diagnostics for -fpermissive. gcc/c-family/ * c.opt (fpermissive): Enable for C and ObjC. * c-opts.cc (set_std_c89): Enable -fpermissiv

Re: [PATCH v2] c-family: Enable -fpermissive for C and ObjC

2023-11-06 Thread Jakub Jelinek
On Mon, Nov 06, 2023 at 03:06:39PM +0100, Florian Weimer wrote: > Future changes will treat some C front end warnings similar to > -Wnarrowing. > > gcc/ > > * doc/invoke.texi (Warning Options): Mention C diagnostics > for -fpermissive. > > gcc/c-family/ > > * c.opt (fpermissiv

[PATCH V2] RISC-V: Early expand DImode vec_duplicate in RV32 system

2023-11-06 Thread Juzhe-Zhong
An ICE was discovered in recent rounding autovec support: config/riscv/riscv-v.cc:4314 65 | } | ^ 0x1fa5223 riscv_vector::validate_change_or_fail(rtx_def*, rtx_def**, rtx_def*, bool) /home/pli/repos/gcc/222/riscv-gnu-toolchain/gcc/__RISC-V_BUILD/../gcc/config/riscv/riscv-v.cc:431

[PATCH v1] RISC-V: Support FP round to i/l/ll diff size autovec

2023-11-06 Thread pan2 . li
From: Pan Li This patch would like to support the FP below API auto vectorization with different type size +--+---+--+ | API | RV64 | RV32 | +--+---+--+ | iround | DF => SI | DF => SI | | iroundf | - | -| | lround

Re: [PATCH v1] RISC-V: Support FP round to i/l/ll diff size autovec

2023-11-06 Thread 钟居哲
LGTM. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-11-06 22:16 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Support FP round to i/l/ll diff size autovec From: Pan Li This patch would like to support the FP below API auto vectorization with

Re: [PATCH v2] c-family: Enable -fpermissive for C and ObjC

2023-11-06 Thread Florian Weimer
* Jakub Jelinek: > On Mon, Nov 06, 2023 at 03:06:39PM +0100, Florian Weimer wrote: >> Future changes will treat some C front end warnings similar to >> -Wnarrowing. >> >> gcc/ >> >> * doc/invoke.texi (Warning Options): Mention C diagnostics >> for -fpermissive. >> >> gcc/c-family/ >>

Re: Re: [PATCH] RISC-V: Early expand DImode vec_duplicate in RV32 system

2023-11-06 Thread 钟居哲
Committed with adding testcase as you suggested in V2: [PATCH V2] RISC-V: Early expand DImode vec_duplicate in RV32 system (gnu.org) juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-11-06 20:46 To: juzhe.zh...@rivai.ai CC: kito.cheng; gcc-patches; jeffreyalaw; Robin Dapp Subject: Re: Re: [PATC

Re: [PATCH v6 0/21]middle-end: Support early break/return auto-vectorization

2023-11-06 Thread Richard Biener
On Mon, 6 Nov 2023, Tamar Christina wrote: > Hi All, > > This patch adds initial support for early break vectorization in GCC. > The support is added for any target that implements a vector cbranch optab, > this includes both fully masked and non-masked targets. > > Depending on the operation, t

[PATCH] tree-optimization/112405 - SIMD clone calls with (loop) mask

2023-11-06 Thread Richard Biener
The following fixes the mask argument generation for SIMD clone calls under either loop masking or when the actual call is not masked but only a inbranch simd clone is available. The issue was that we tried to directly convert the vector mask to the call argument type but SIMD clone masks require

Re: [PATCH v2] c-family: Enable -fpermissive for C and ObjC

2023-11-06 Thread Jakub Jelinek
On Mon, Nov 06, 2023 at 03:19:32PM +0100, Florian Weimer wrote: > * Jakub Jelinek: > > > On Mon, Nov 06, 2023 at 03:06:39PM +0100, Florian Weimer wrote: > >> Future changes will treat some C front end warnings similar to > >> -Wnarrowing. > >> > >> gcc/ > >> > >>* doc/invoke.texi (Warning Op

Re: [PATCH] RISC-V: VECT: Remember to assert any_known_not_updated_vssa

2023-11-06 Thread Jeff Law
On 11/6/23 06:18, Kito Cheng wrote: Oh, you're right! I should have checked the master branch first... and I was even wondering why it wasn't marked as such. Should perhaps cherry pick this for gcc-13-with-riscv-opts? gcc-13-with-riscv-opts mostly maintained by Ventana folks, so maybe ask

Re: [PATCH 14/21]middle-end: Change loop analysis from looking at at number of BB to actual cfg

2023-11-06 Thread Richard Biener
On Mon, 6 Nov 2023, Tamar Christina wrote: > Hi All, > > The vectorizer at the moment uses a num_bb check to check for control flow. > This rejects a number of loops with no reason. Instead this patch changes it > to check the destination of the exits instead. > > This also allows early break t

nvptx: Use the usual '#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)' (was: libstdc++ "freestanding" ('--disable-hosted-libstdcxx') with '-fno-rtti', '-fno-exceptions': 'libstdc++-v3/libsupc+

2023-11-06 Thread Thomas Schwinge
Hi! On 2022-07-14T19:39:40+0100, Jonathan Wakely wrote: > On Thu, 14 Jul 2022 at 19:14, Thomas Schwinge wrote: >> I'm looking into building GCN, nvptx offloading libstdc++ [...] >> While there is some experimental/incomplete/not-to-be-relied-on support >> for PTX symbol aliases, we're currently

[committed] c: Add -std=c23, -std=gnu23, -Wc11-c23-compat options [PR107954]

2023-11-06 Thread Joseph Myers
At the June WG14 meeting, WG14 decided it preferred to keep C23 as the informal name for the next revision of the C standard, despite publication not being before 2024 (publication is due in 2024 whether or not technical changes at the January meeting result in an FDIS ballot being needed). At the

RE: [PATCH v6 0/21]middle-end: Support early break/return auto-vectorization

2023-11-06 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Monday, November 6, 2023 2:25 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd > Subject: Re: [PATCH v6 0/21]middle-end: Support early break/return auto- > vectorization > > On Mon, 6 Nov 2023, Tamar Christina wrote: > > > H

[committed] i386: Use "addr" attribute to limit address regclass to non-REX regs

2023-11-06 Thread Uros Bizjak
Use "addr" attribute with "gpr8" value to limit address register class to non-REX registers in instructions with high registers, where REX registers can not be used in the address. gcc/ChangeLog: * config/i386/constraints.md (Bc): Remove constraint. (Bn): Rewrite to use x86_extended_reg_m

Re: [PATCH v2] c-family: Enable -fpermissive for C and ObjC

2023-11-06 Thread Florian Weimer
* Jakub Jelinek: > On Mon, Nov 06, 2023 at 03:19:32PM +0100, Florian Weimer wrote: >> * Jakub Jelinek: >> >> > On Mon, Nov 06, 2023 at 03:06:39PM +0100, Florian Weimer wrote: >> >> Future changes will treat some C front end warnings similar to >> >> -Wnarrowing. >> >> >> >> gcc/ >> >> >> >> *

[patch] libgomp.texi: Update OpenMP 6.0-preview implementation-status list

2023-11-06 Thread Tobias Burnus
This commit updates the OpenMP 6.0 implementation status, https://gcc.gnu.org/onlinedocs/libgomp/OpenMP-Implementation-Status.html Besides some reordering and adding a bunch of 'N' entries, it also adds 'Y' for the recent C23 attribute changes. Comments? If not, I will commit it later... Tobias

[PATCH] Fix configure script comments(!?!) (Was: Re: [PATCH] genemit: Split insn-emit.cc into ten files)

2023-11-06 Thread Martin Jambor
Hello, On Thu, Oct 12 2023, Robin Dapp wrote: > [...] > gcc/ChangeLog: > > PR bootstrap/84402 > PR target/111600 > > * Makefile.in: Handle split insn-emit.cc. > * configure: Regenerate. > * configure.ac: Add --with-insnemit-partitions. > * genemit.cc (output_pee

Re: [PATCH] Fix configure script comments(!?!)

2023-11-06 Thread Andreas Schwab
On Nov 06 2023, Martin Jambor wrote: > Following this commit, our buildbot script which checks that configure > scripts where re-generated correctly is unhappy because it insists > comments are wrong, it wants to them to be like this: > > ---

[ARC PATCH] Improved DImode rotates and right shifts by one bit.

2023-11-06 Thread Roger Sayle
This patch improves the code generated for DImode right shifts (both arithmetic and logical) by a single bit, and also for DImode rotates (both left and right) by a single bit. In approach, this is similar to the recently added DImode left shift by a single bit patch, but also builds upon i386.md

Re: [PING][PATCH 2/2] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2023-11-06 Thread Stamatis Markianos-Wright
On 06/11/2023 11:24, Richard Sandiford wrote: Stamatis Markianos-Wright writes: One of the main reasons for reading the arm bits was to try to answer the question: if we switch to a downcounting loop with a GE condition, how do we make sure that the start value is not a large unsigned number

[PATCH] c-family: Enable -fpermissive for C and ObjC

2023-11-06 Thread Florian Weimer
Future changes will treat some C front end warnings similar to -Wnarrowing. gcc/ * doc/invoke.texi (Warning Options): Mention C diagnostics for -fpermissive. gcc/c-family/ * c.opt (fpermissive): Enable for C and ObjC. * c-opts.cc (c_common_post_options): Enable -

[PATCH] Avoid undeclared use of abort in gcc.dg/cpp/wchar-1.c

2023-11-06 Thread Florian Weimer
This should be safe because this is a preprocessor test; it should not exercise implicit function declarations. * gcc.dg/cpp/wchar-1.c (main): Call __builtin_abort instead of abort. --- gcc/testsuite/gcc.dg/cpp/wchar-1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH] Fix configure script comments(!?!) (Was: Re: [PATCH] genemit: Split insn-emit.cc into ten files)

2023-11-06 Thread Robin Dapp
> I'm not sure what that means, whether a wrong version of > autoconf/automake was used (though when I accidentally tried that, it > has always complained loudly) or if some environment difference can > cause this. Perhaps I should change the script not to care about > commits though that won't ha

Re: [PATCH] Avoid undeclared use of abort in gcc.dg/cpp/wchar-1.c

2023-11-06 Thread Jakub Jelinek
On Mon, Nov 06, 2023 at 06:38:04PM +0100, Florian Weimer wrote: > This should be safe because this is a preprocessor test; it > should not exercise implicit function declarations. > > * gcc.dg/cpp/wchar-1.c (main): Call __builtin_abort instead of > abort. Ok. > diff --git a/gcc/tests

Re: [PATCH 1/2] libgfortran: Remove early return if extent is zero [PR112371]

2023-11-06 Thread Harald Anlauf
Hi Mikael, Am 06.11.23 um 12:43 schrieb Mikael Morin: Remove the early return present in function templates for transformational functions doing a (masked) reduction of an array along a dimension. This early return, which triggered if the extent in the reduction dimension was zero, was wrong bec

[PATCH][GCC13] PR tree-optimization/105834 - Choose better initial values for ranger.

2023-11-06 Thread Andrew MacLeod
As requested porting this patch from trunk resolves this PR in GCC 13. Bootstraps on x86_64-pc-linux-gnu with no regressions.  OK for the gcc 13 branch? Andrew From 0182a25607fa353274c27ec57ca497c00f1d1b76 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Mon, 6 Nov 2023 11:33:32 -0500 S

Re: [PATCH 2/2] libgfortran: Remove empty array descriptor first dimension overwrite [PR112371]

2023-11-06 Thread Harald Anlauf
Hi Mikael, Am 06.11.23 um 12:43 schrieb Mikael Morin: Remove the forced overwrite of the first dimension of the result array descriptor to set it to zero extent, in the function templates for transformational functions doing an array reduction along a dimension. This overwrite, which happened b

[ARC PATCH] Consistent use of whitespace in assembler templates.

2023-11-06 Thread Roger Sayle
This minor clean-up patch tweaks arc.md to use whitespace consistently in output templates, always using a TAB between the mnemonic and its operands, and avoiding spaces after commas between operands. There should be no functional changes with this patch, though several test cases' scan-assembler

Re: [PATCH 1/2] libgfortran: Remove early return if extent is zero [PR112371]

2023-11-06 Thread Mikael Morin
Le 06/11/2023 à 19:12, Harald Anlauf a écrit : Hi Mikael, Am 06.11.23 um 12:43 schrieb Mikael Morin: Remove the early return present in function templates for transformational functions doing a (masked) reduction of an array along a dimension. This early return, which triggered if the extent i

Re: [PATCH 2/2] libgfortran: Remove empty array descriptor first dimension overwrite [PR112371]

2023-11-06 Thread Mikael Morin
Le 06/11/2023 à 19:20, Harald Anlauf a écrit : Hi Mikael, Am 06.11.23 um 12:43 schrieb Mikael Morin: Remove the forced overwrite of the first dimension of the result array descriptor to set it to zero extent, in the function templates for transformational functions doing an array reduction alon

[PATCH] RISC-V: Add ABI requirement for XTheadFMemIdx tests

2023-11-06 Thread Christoph Muellner
From: Christoph Müllner The XTheadFMemIdx tests set the required ABI for RV32, but not for RV64, which has the effect that the tests are expected to succeed for RV64/LP64. Let's set the ABI to LP64D in these tests to clarify the requirements. Signed-off-by: Christoph Müllner gcc/testsuite/Cha

[pushed 2/4] diagnostics: make diagnostic_context::m_urlifier private

2023-11-06 Thread David Malcolm
No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-5167-ga526cc6ff32e22. gcc/ChangeLog: * diagnostic.cc (diagnostic_context::set_urlifier): New. * diagnostic.h (diagnostic_context::set_urlifier): New decl. (

[pushed 1/4] diagnostics: eliminate diagnostic_kind_count

2023-11-06 Thread David Malcolm
No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-5166-g579bb65cdd35a4. gcc/ChangeLog: * diagnostic.cc (diagnostic_context::check_max_errors): Replace uses of diagnostic_kind_count with simple field acesss.

[pushed 3/4] diagnostics: introduce class diagnostic_option_classifier

2023-11-06 Thread David Malcolm
This patch gathers the 6 fields in diagnostic_context relating to keeping track of overriding the severity of warnings, and pushing/popping those severities, moving them all into a new class diagnostic_option_classifier. No functional change intended. Successfully bootstrapped & regrtested on x86

[pushed 4/4] diagnostics: split out struct diagnostic_source_printing_options

2023-11-06 Thread David Malcolm
This patch removes almost all use of diagnostic_context from the source-printing code. No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-5169-g54da47f9459890. gcc/ChangeLog: * diagnostic-show-locus.cc (class colorizer): T

Re: [PATCH 2/2] libgfortran: Remove empty array descriptor first dimension overwrite [PR112371]

2023-11-06 Thread Harald Anlauf
Hi Mikael, Am 06.11.23 um 20:19 schrieb Mikael Morin: This change to the testcase: diff --git a/gcc/testsuite/gfortran.dg/bound_11.f90 b/gcc/testsuite/gfortran.dg/bound_11.f90 index 170eba4ddfd..2e96f843476 100644 --- a/gcc/testsuite/gfortran.dg/bound_11.f90 +++ b/gcc/testsuite/gfortran.dg/bou

[committed] hppa: Enable generation of GNU stack notes on Linux

2023-11-06 Thread John David Anglin
I think we have waited long enough for everone to switch to a kernel build with VDSO support. Committed to trunk. Dave --- Enable generation of GNU stack notes on Linux 2023-11-06 John David Anglin * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 1. diff --git a/gcc/con

[committed] hppa: Fix typo in PA 2.0 trampoline template

2023-11-06 Thread John David Anglin
Noticed in glibc testsuite. Committed to active branches. Dave --- hppa: Fix typo in PA 2.0 trampoline template 2023-11-06 John David Anglin * config/pa/pa.cc (pa_asm_trampoline_template): Fix typo. diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc index 2e906cff7ff..218c48b4a

[PATCH][_Hashtable] Add missing destructor call

2023-11-06 Thread François Dumont
Noticed looking for other occasion to replace __try/__catch with RAII helper.     libstdc++: [_Hashtable] Add missing node destructor call     libstdc++-v3/ChangeLog:     * include/bits/hashtable_policy.h     (_Hashtable_alloc<>::_M_allocate_node): Add missing call to node des

Re: [PATCH][_Hashtable] Add missing destructor call

2023-11-06 Thread Sam James
François Dumont writes: > Noticed looking for other occasion to replace __try/__catch with RAII > helper. > >     libstdc++: [_Hashtable] Add missing node destructor call > >     libstdc++-v3/ChangeLog: > >     * include/bits/hashtable_policy.h >     (_Hashtable_alloc<>::_M_allo

[PATCH/RFC] libdiagnostics: a shared library for emitting diagnostics

2023-11-06 Thread David Malcolm
It's fairly easy for tools to implement simple diagnostics via fprintf of FILE:LINE:COLUMN: error: message to stderr, but as diagnostics get more featureful, using a shared library makes sense. This patch kit extends GCC to add a new "libdiagnostics" shared library on the host, built around GCC

[PATCH 1/2] libdiagnostics: header and examples

2023-11-06 Thread David Malcolm
Here's a work-in-progress patch for GCC that adds a libdiagnostics.h header describing the public interface, along with various testcases that show usage examples for the API. Various aspects of this need work; posting now for early feedback on overall direction. How does the interface look? gcc

[PATCH 2/2] libdiagnostics: work-in-progress implementation

2023-11-06 Thread David Malcolm
Here's a work-in-progress patch for GCC that adds the implementation of libdiagnostics. Various aspects of this need work; posting now for early feedback on overall direction. For example, the testsuite doesn't yet check the output from the test client programs (and I'm not quite sure of the best

[PATCH] binutils: experimental use of libdiagnostics in gas

2023-11-06 Thread David Malcolm
Here's a patch for gas in binutils that makes it use libdiagnostics (with some nasty hardcoded paths to specific places on my hard drive to make it easier to develop the API). For now this hardcodes adding two sinks: a text sink on stderr, and also a SARIF output to stderr (which happens after all

  1   2   >