Re: [PATCH] [i386] APX EGPR: fix missing pattern that prohibits egpr

2023-10-08 Thread Hongtao Liu
On Mon, Oct 9, 2023 at 10:05 AM Hongyu Wang wrote: > > For vec_concatv2di, m constraint in alternative 0 and 1 could result in > egpr allocated on operand 2 under -mapxf. Should use jm instead. > > Bootstrapped/regtested on x86-64-linux-gnu. > > Ok for trunk? Ok. > > gcc/ChangeLog: > > *

RE: [PATCH v4] [tree-optimization/110279] Consider FMA in get_reassociation_width

2023-10-08 Thread Di Zhao OS
Attached is a new version of the patch. > -Original Message- > From: Richard Biener > Sent: Friday, October 6, 2023 5:33 PM > To: Di Zhao OS > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH v4] [tree-optimization/110279] Consider FMA in > get_reassociation_width > > On Thu, Sep 14,

[ARC PATCH] Improved SImode shifts and rotates on !TARGET_BARREL_SHIFTER.

2023-10-08 Thread Roger Sayle
This patch completes the ARC back-end's transition to using pre-reload splitters for SImode shifts and rotates on targets without a barrel shifter. The core part is that the shift_si3 define_insn is no longer needed, as shifts and rotates that don't require a loop are split before reload, and

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix

2023-10-08 Thread François Dumont
I think we can do the same without the symbol alias feature. It's even simpler cause do not require any maintenance when version symbol bump. Here is what I'm testing, at least exported symbol is fine. François On 08/10/2023 16:06, Iain Sandoe wrote: Hi François, On 21 Sep 2023, at 05:41,

Re: [PATCH 1/6] aarch64: Sync system register information with Binutils

2023-10-08 Thread Ramana Radhakrishnan
> On 5 Oct 2023, at 14:04, Victor Do Nascimento > wrote: > > External email: Use caution opening links or attachments > > > On 10/5/23 12:42, Richard Earnshaw wrote: >> >> >> On 03/10/2023 16:18, Victor Do Nascimento wrote: >>> This patch adds the `aarch64-sys-regs.def' file to GCC,

Re: Re: [PATCH] TEST: Fix vect_cond_arith_* dump checks for RVV

2023-10-08 Thread 钟居哲
It can't work. Still failed: spawn -ignore SIGHUP /work/home/jzzhong/work/toolchain/riscv/build/dev-rv64gcv_zfh-lp64d-medany-newlib-spike-debug/build-gcc-newlib-stage2/gcc/xgcc

Re: Re: [PATCH] TEST: Fix dump FAIL of vect-multitypes-16.c for RVV

2023-10-08 Thread 钟居哲
No. They are not the same property. Maybe I should pretend RVV support vect_pack/vect_unpack and enable all the tests in target-supports.exp? juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-10-08 23:09 To: Juzhe-Zhong; gcc-patches CC: rguenther Subject: Re: [PATCH] TEST: Fix dump FAIL of

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-10-08 Thread Iain Sandoe
+ Jeff > On 8 Oct 2023, at 14:07, Nathanael Nerode wrote: > > I hope a global maintainer can step up. I've been on hiatus from GCC work > for some years, and this was never my part of the build system anyway -- and > I don't use Darwin -- so I'm not qualified to review it. It looks fine but

[pushed] libcpp: eliminate LINEMAPS_{,ORDINARY_,MACRO_}CACHE

2023-10-08 Thread David Malcolm
It's simpler to use field access than to go through these inline functions that look as if they are macros. No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-4479-g45bae1809c3919. libcpp/ChangeLog: * include/line-map.h

[pushed] analyzer: improvements to out-of-bounds diagrams [PR111155]

2023-10-08 Thread David Malcolm
Update out-of-bounds diagrams to show existing string values, and the initial write index within a string buffer. For example, given the out-of-bounds write in strcat in: void test (void) { char buf[10]; strcpy (buf, "hello"); strcat (buf, " world!"); } the diagram improves from:

[pushed] libcpp: "const" and other cleanups

2023-10-08 Thread David Malcolm
No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-4475-g25af7c1a806c0c. gcc/ChangeLog: * input.cc (make_location): Move implementation to line_maps::make_location. libcpp/ChangeLog: * include/line-map.h

[pushed] libcpp: eliminate COMBINE_LOCATION_DATA

2023-10-08 Thread David Malcolm
This patch eliminates the function "COMBINE_LOCATION_DATA" (which hasn't been a macro since r6-739-g0501dbd932a7e9) and the function "get_combined_adhoc_loc" in favor of a new line_maps::get_or_create_combined_loc member function. No functional change intended. Successfully bootstrapped &

[pushed] diagnostics: fix ICE on sarif output when source file is unreadable [PR111700]

2023-10-08 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-4474-g94caa6a6b4bd73. gcc/ChangeLog: PR driver/111700 * input.cc (file_cache::add_file): Update leading comment to clarify that it can fail. (file_cache::lookup_or_add_file):

[pushed] libcpp: eliminate LINEMAPS_LAST_ALLOCATED{, _ORDINARY, _MACRO}_MAP

2023-10-08 Thread David Malcolm
Nothing uses these; delete them. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-4478-ga73c80d99736f0. libcpp/ChangeLog: * include/line-map.h (LINEMAPS_LAST_ALLOCATED_MAP): Delete. (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Delete.

[pushed] libcpp: eliminate LINEMAPS_{ORDINARY,MACRO}_MAPS

2023-10-08 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-4480-g0a0ceb7a72fe0b. libcpp/ChangeLog: * include/line-map.h (LINEMAPS_ORDINARY_MAPS): Delete. (LINEMAPS_MACRO_MAPS): Delete. * line-map.cc (linemap_tracks_macro_expansion_locs_p): Update

[PATCH] [i386] APX EGPR: fix missing pattern that prohibits egpr

2023-10-08 Thread Hongyu Wang
For vec_concatv2di, m constraint in alternative 0 and 1 could result in egpr allocated on operand 2 under -mapxf. Should use jm instead. Bootstrapped/regtested on x86-64-linux-gnu. Ok for trunk? gcc/ChangeLog: * config/i386/sse.md (vec_concatv2di): Replace constraint "m" with

Re: [PATCH v14 16/40] c, c++: Use 16 bits for all use of enum rid for more keyword space

2023-10-08 Thread Ken Matsui
On Wed, Sep 27, 2023 at 6:57 AM Jason Merrill wrote: > > On Tue, Sep 19, 2023 at 7:05 PM Ken Matsui wrote: >> >> On Tue, Sep 19, 2023 at 9:59 AM Jason Merrill wrote: >> > >> > On 9/15/23 19:51, Ken Matsui via Gcc-patches wrote: >> > > Now that RID_MAX has reached 255, we need to update the bit

[PATCH] [i386] APX EGPR: fix missing pattern that prohibits egpr

2023-10-08 Thread Hongyu Wang
Thanks, also there is another pattern missed that should use "ja" instead of Bm. Will commit below changes. gcc/ChangeLog: * config/i386/sse.md (vec_concatv2di): Replace constraint "m" with "jm" for alternative 0 and 1 of operand 2. (sse4_1_3): Replace constraint "Bm"

[PATCH-1, expand] Enable vector mode for compare_by_pieces [PR111449]

2023-10-08 Thread HAO CHEN GUI
Hi, Vector mode instructions are efficient on some targets (e.g. ppc64). This patch enables vector mode for compare_by_pieces. The non-member function widest_fixed_size_mode_for_size takes by_pieces_operation as the second argument and decide whether vector mode is enabled or not by the type of

[PATCH-2, rs6000] Enable vector mode for memory equality compare [PR111449]

2023-10-08 Thread HAO CHEN GUI
Hi, This patch enables vector mode for memory equality compare by adding a new expand cbranchv16qi4 and implementing it. Also the corresponding CC reg and compare code is set in rs6000_generate_compare. With the patch, 16-byte equality compare can be implemented by one vector compare

Re: [PATCH] ifcvt/vect: Emit COND_ADD for conditional scalar reduction.

2023-10-08 Thread Richard Sandiford
Robin Dapp writes: > Hi Tamar, > >> The only comment I have is whether you actually need this helper >> function? It looks like all the uses of it are in cases you have, or >> will call conditional_internal_fn_code directly. > removed the cond_fn_p entirely in the attached v3. > > Bootstrapped

Re: [PING^1][PATCH] rs6000: Change bitwise xor to inequality operator [PR106907]

2023-10-08 Thread jeevitha
Ping! please review. Thanks & Regards Jeevitha On 16/06/23 9:55 am, Peter Bergner wrote: > On 6/12/23 6:18 AM, P Jeevitha wrote: >> Bitwise xor performed on bool >> is similar to checking inequality. So changed to inequality >> operator (!=) instead of bitwise xor (^). > [snip' >> - if

[PATCH v4] c++: Check for indirect change of active union member in constexpr [PR101631,PR102286]

2023-10-08 Thread Nathaniel Shead
Ping for https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631203.html Rebased on top of current trunk and bootstrap + regtest on x86_64-pc-linux-gnu now completed without errors. -- >8 -- This patch adds checks for attempting to change the active member of a union by methods other than

Re: [PATCH] LoongArch: Adjust makefile dependency for loongarch headers.

2023-10-08 Thread Jan-Benedict Glaw
On Sat, 2023-10-07 16:50:14 +0800, Yang Yujie wrote: > gcc/ChangeLog: > > * config.gcc: Add loongarch-driver.h to tm_files. > * config/loongarch/loongarch.h: Do not include loongarch-driver.h. > * config/loongarch/t-loongarch: Append loongarch-multilib.h to $(GTM_H) >

Re: [PATCH] TEST: Fix dump FAIL of vect-multitypes-16.c for RVV

2023-10-08 Thread Jeff Law
On 10/8/23 05:35, Juzhe-Zhong wrote: RVV (RISC-V Vector) doesn't enable vect_unpack, but we still vectorize this case well. So, adjust dump check for RVV. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-multitypes-16.c: Fix dump FAIL of RVV. I'd hoped to avoid a bunch of risc-v special

Re: [PATCH] TEST: Fix vect_cond_arith_* dump checks for RVV

2023-10-08 Thread Jeff Law
On 10/7/23 16:02, 钟居哲 wrote: Do you mean change it like this ? /* { dg-final { scan-tree-dump-times { = \.COND_L?E?N?_?RDIV} 1 "optimized" { target vect_double_cond_arith } } } */ I was thinking something more like COND(_LEN)?_ADD The idea being we match _LEN conditionally as a group.

[PATCH] RISC-V: Support movmisalign of RVV VLA modes

2023-10-08 Thread Juzhe-Zhong
Previously, I removed the movmisalign pattern to fix the execution FAILs in this commit: https://github.com/gcc-mirror/gcc/commit/f7bff24905a6959f85f866390db2fff1d6f95520 I was thinking that RVV doesn't allow misaligned at the beginning so I removed that pattern. However, after deep

[PATCH] TEST: Fix dump FAIL for RVV

2023-10-08 Thread Juzhe-Zhong
gcc/testsuite/ChangeLog: * gcc.dg/vect/bb-slp-cond-1.c: Fix dump FAIL for RVV. * gcc.dg/vect/pr57705.c: Ditto. --- gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c | 4 ++-- gcc/testsuite/gcc.dg/vect/pr57705.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH] TEST: Fix XPASS of outer loop vectorization tests for RVV

2023-10-08 Thread Juzhe-Zhong
Even though RVV doesn't enable vec_unpack/vec_pack, it succeed on outer loop vectorizations. Fix these following XPASS FAILs: XPASS: gcc.dg/vect/no-scevccp-outer-16.c scan-tree-dump-times vect "OUTER LOOP VECTORIZED." 1 XPASS: gcc.dg/vect/no-scevccp-outer-17.c scan-tree-dump-times vect "OUTER

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

2023-10-08 Thread Kwok Cheung Yeung
Hello This patch adds support for the 'indirect' clause in the 'declare target' directive in C/C++ (Fortran to follow) and adds the necessary infrastructure to support indirect calls in target regions. This allows one to pass in pointers to functions that have been declared as indirect from

Re: [PATCH] Fix coroutine tests for libstdc++ gnu-version-namespace mode

2023-10-08 Thread Iain Sandoe
Hi François, > On 23 Sep 2023, at 21:10, François Dumont wrote: > > I'm eventually fixing those tests the same way we manage this problem in > libstdc++ testsuite. > >testsuite: Add optional libstdc++ version namespace in expected diagnostic > > When libstdc++ is build with

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix

2023-10-08 Thread Iain Sandoe
Hi François, > On 21 Sep 2023, at 05:41, François Dumont wrote: > > Tests were successful, ok to commit ? > > On 20/09/2023 19:51, François Dumont wrote: >> libstdc++: [_GLIBCXX_INLINE_VERSION] Add handle_contract_violation symbol >> alias >> >> libstdc++-v3/ChangeLog: >> >> *

[PATCH] TEST: Fix dump FAIL of vect-multitypes-16.c for RVV

2023-10-08 Thread Juzhe-Zhong
RVV (RISC-V Vector) doesn't enable vect_unpack, but we still vectorize this case well. So, adjust dump check for RVV. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-multitypes-16.c: Fix dump FAIL of RVV. --- gcc/testsuite/gcc.dg/vect/vect-multitypes-16.c | 4 ++-- 1 file changed, 2

Ping: [PATCH v5] C, ObjC: Add -Wunterminated-string-initialization

2023-10-08 Thread Alejandro Colomar
Hi, Gentle ping here. Thanks, Alex On Sun, Oct 01, 2023 at 06:24:00PM +0200, Alejandro Colomar wrote: > Warn about the following: > > char s[3] = "foo"; > > Initializing a char array with a string literal of the same length as > the size of the array is usually a mistake. Rarely is the

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-10-08 Thread Nathanael Nerode
I hope a global maintainer can step up. I've been on hiatus from GCC work for some years, and this was never my part of the build system anyway -- and I don't use Darwin -- so I'm not qualified to review it. It looks fine but it should be reviewed by someone who knows what they're doing. On

Re: [PATCH] Support g++ 4.8 as a host compiler.

2023-10-08 Thread Iain Sandoe
> On 8 Oct 2023, at 05:40, Jeff Law wrote: > On 10/7/23 15:30, Sam James wrote: >> Jeff Law writes: >>> On 10/4/23 16:19, Roger Sayle wrote: The recent patch to remove poly_int_pod triggers a bug in g++ 4.8.5's C++ 11 support which mistakenly believes poly_uint16 has a

[PATCH] TEST: Fix dump FAIL for RVV (RISCV-V vector)

2023-10-08 Thread Juzhe-Zhong
As this showed: https://godbolt.org/z/3K9oK7fx3 ARM SVE 2 times for FOLD_EXTRACT_LAST wheras RVV 4 times. This is because RISC-V doesn't enable vec_pack_trunc so we will failed conversion and fold_extract_last at the first time analysis. Then we succeed at the second time. So RVV has 4 times