[PATCH v2] RISC-V: Refactor RVV frm_mode attr for rounding mode intrinsic

2023-08-07 Thread Pan Li via Gcc-patches
From: Pan Li The frm_mode attr has some assumptions for each define insn as below. 1. The define insn has at least 9 operands. 2. The operands[9] must be frm reg. 3. The operands[9] must be const int. Actually, the frm operand can be operands[8], operands[9] or operands[10], and not all the

[PATCH V1] RISC-V: Fix a bug that causes an error insn.

2023-08-07 Thread shiyulong
From: yulong I test the following rvv intrinsics. vint64m1_t test_vslide1up_vx_i64m1_m(vbool64_t mask, vint64m1_t src, int64_t value, size_t vl) { return __riscv_vslide1up_vx_i64m1_m(mask, src, value, vl);} And I got an error info,that is error: unrecognizable insn:(insn 17 16 18 2 (set

Re: [PATCH] RISC-V: Support neg VLS auto-vectorization

2023-08-07 Thread Lehua Ding
Committed to the trunk, thanks Kito and Juzhe.

RE: [PATCH v1] Mode-Switching: Fix SET_SRC ICE when only one operand

2023-08-07 Thread Li, Pan2 via Gcc-patches
Thanks Jeff. > Or just ignore the case of an insn that is a toplevel USE/CLOBBER? I > bet we even have a function for that somewhere given how commonly we > need to do that. I found there are something like "GET_CODE(x) == USE || GET_CODE(x) == CLOBBER" everywhere but lack of a function or

Re: [PATCH] RISC-V: Support neg VLS auto-vectorization

2023-08-07 Thread Kito Cheng via Gcc-patches
LGTM :) Juzhe-Zhong 於 2023年8月8日 週二 11:10 寫道: > #include "riscv_vector.h" > > #define DEF_OP_V(PREFIX, NUM, TYPE, OP) > \ > void __attribute__ ((noinline, noclone)) > \ > PREFIX##_##TYPE##NUM (TYPE *restrict a, TYPE *restrict b) > \ > { > \ > for (int i = 0; i < NUM;

[PATCH] RISC-V: Support neg VLS auto-vectorization

2023-08-07 Thread Juzhe-Zhong
#include "riscv_vector.h" #define DEF_OP_V(PREFIX, NUM, TYPE, OP)\ void __attribute__ ((noinline, noclone)) \ PREFIX##_##TYPE##NUM (TYPE *restrict a, TYPE *restrict b)\ {

[PATCH v2] Mode-Switching: Fix SET_SRC ICE when USE or CLOBBER

2023-08-07 Thread Pan Li via Gcc-patches
From: Pan Li In same cases, like gcc/testsuite/gcc.dg/pr78148.c in RISC-V, there will be only 1 operand when SET_SRC in create_pre_exit. For example as below. (insn 13 9 14 2 (clobber (reg/i:TI 10 a0)) "gcc/testsuite/gcc.dg/pr78148.c":24:1 -1 (expr_list:REG_UNUSED (reg/i:TI 10 a0)

[PATCH] c++: Report invalid id-expression in decltype [PR100482]

2023-08-07 Thread Nathaniel Shead via Gcc-patches
Sorry, noticed I provided the wrong version of the test. Here is the correct version (not relying on 'namespace std' being implicitly defined). Bootstrapped + regtested on x86_64-pc-linux-gnu. -- 8< -- This patch ensures that any errors raised by finish_id_expression when parsing a decltype

[PATCH] c++: Report invalid id-expression in decltype [PR100482]

2023-08-07 Thread Nathaniel Shead via Gcc-patches
Ping for https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622681.html. -- 8< -- This patch ensures that any errors raised by finish_id_expression when parsing a decltype expression are properly reported, rather than potentially going ignored and causing invalid code to be accepted. We can

Re: [PATCH v2] LoongArch:Implement 128-bit floating point functions in gcc.

2023-08-07 Thread Xi Ruoyao via Gcc-patches
On Tue, 2023-08-08 at 10:24 +0800, Xi Ruoyao wrote: And I think this way to implement these functions (using libgcc calls) is not the best. On 64-bit LoongArch a __float128 is stored in a pair of GPR, so operations like copysignq and absq can be implemented much more efficiently by expanding

Re: [PATCH] RISC-V: Support VLS shift vectorization

2023-08-07 Thread Lehua Ding
Committed to the trunk, thanks Kito and Juzhe.

Re: [PATCH v2] LoongArch:Implement 128-bit floating point functions in gcc.

2023-08-07 Thread Xi Ruoyao via Gcc-patches
On Tue, 2023-08-08 at 10:09 +0800, chenxiaolong wrote: > +/* Count the number of functions with "q" as the suffix.  */ > +const int MATHQ_NUMS=(int)LARCH_MAX_FTYPE_MAX-(int)LARCH_BUILTIN_HUGE_VALQ; Format issue still not fixed. > +__float128 nanq (const char * str) > +{ > + union

Re: [PATCH] RISC-V: Support VLS shift vectorization

2023-08-07 Thread Kito Cheng via Gcc-patches
Lgtm Juzhe-Zhong 於 2023年8月8日 週二,09:37寫道: > After this patch, this following case will be well optimized: > #include "riscv_vector.h" > > #define DEF_OP_VV(PREFIX, NUM, TYPE, OP) > \ > void __attribute__ ((noinline, noclone)) > \ > PREFIX##_##TYPE##NUM (TYPE *restrict a, TYPE

[PATCH v2] LoongArch:Implement 128-bit floating point functions in gcc.

2023-08-07 Thread chenxiaolong
In the implementation process, the "q" suffix function is Re-register and associate the "__float128" type with the "long double" type so that the compiler can handle the corresponding function correctly. The functions implemented include __builtin_{huge_valq

[PATCH v2] LoongArch:Implement 128-bit floating point functions in gcc.

2023-08-07 Thread chenxiaolong
In the implementation process, the "q" suffix function is Re-register and associate the "__float128" type with the "long double" type so that the compiler can handle the corresponding function correctly. The functions implemented include __builtin_{huge_valq

[PATCH] RISC-V: Support VLS shift vectorization

2023-08-07 Thread Juzhe-Zhong
After this patch, this following case will be well optimized: #include "riscv_vector.h" #define DEF_OP_VV(PREFIX, NUM, TYPE, OP) \ void __attribute__ ((noinline, noclone)) \ PREFIX##_##TYPE##NUM (TYPE *restrict a, TYPE

[PATCH] MATCH: [PR110937/PR100798] (a ? ~b : b) should be optimized to b ^ -(a)

2023-08-07 Thread Andrew Pinski via Gcc-patches
This adds a simple match pattern for this case. I noticed it a couple of different places. One while I was looking at code generation of a parser and also while I was looking at locations where bitwise_inverted_equal_p should be used more. OK? Bootstrapped and tested on x86_64-linux-gnu with no

Re: [committed][RISC-V]Don't reject constants in cmov condition

2023-08-07 Thread Vineet Gupta
On 8/7/23 13:36, Jeff Law wrote: Fixes several missed conditional moves with the trunk. I'm curious, how do you know what's missing. Does ifc have some stats like autovec which explicitly reports missed opportunities ? -Vineet

RE: Re: [PATCH] RISC-V: Support VLS basic operation auto-vectorization

2023-08-07 Thread Li, Pan2 via Gcc-patches
Committed, thanks Robin. Pan -Original Message- From: Gcc-patches On Behalf Of ??? Sent: Tuesday, August 8, 2023 5:15 AM To: rdapp.gcc ; gcc-patches Cc: rdapp.gcc ; kito.cheng ; kito.cheng ; Jeff Law Subject: Re: Re: [PATCH] RISC-V: Support VLS basic operation auto-vectorization

Re: [PATCH 00/24] Sync shared build infrastructure with binutils-gdb

2023-08-07 Thread Arsen Arsenović via Gcc-patches
Eric Gallager writes: > Hi, with the updates to libtool.m4 and pkg.m4, those files originally > come from upstream libtool and pkg-config, correct? Won't patching > GCC's local copies make re-syncing them with upstream > libtool/pkg-config more difficult, or have these patches already been >

Re: [PATCH 14/24] libtool.m4: fix nm BSD flag detection

2023-08-07 Thread Nick Alcock via Gcc-patches
On 7 Aug 2023, Jeff Law uttered the following: > On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: >> From: Nick Alcock >> Libtool needs to get BSD-format (or MS-format) output out of the system >> nm, so that it can scan generated object files for symbol names for >> -export-symbols-regex

Re: [committed] i386: Fix grammar typo in diagnostic

2023-08-07 Thread Marek Polacek via Gcc-patches
On Mon, Aug 07, 2023 at 10:12:35PM +0100, Jonathan Wakely via Gcc-patches wrote: > Committed as obvious. > > Less obvious (to me) is whether it's correct to say "GCC V13" here. I > don't think we refer to a version that way anywhere else, do we? > > Would "since GCC 13.1.0" be better?

[committed] libstdc++: Constrain __format::_Iter_sink for contiguous iterators [PR110917]

2023-08-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. gcc-13 backport to follow. -- >8 -- We can't write to a span<_CharT> if the contiguous iterator has a value type that isn't _CharT. libstdc++-v3/ChangeLog: PR libstdc++/110917 * include/std/format (__format::_Iter_sink): Constrain

Re: Re: [PATCH] RISC-V: Support VLS basic operation auto-vectorization

2023-08-07 Thread 钟居哲
Thanks Robin. Yes, we should not allow vsetvli rd,rs1 which is generated by SELECT_VL for partial vector auto-vectorzation. But I believe scan-assembler-not csrr is enough. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-08-08 03:46 To: Juzhe-Zhong; gcc-patches CC: rdapp.gcc; kito.cheng;

[committed] libstdc++: Fix incorrect use of abs and log10 in std::format [PR110860]

2023-08-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. gcc-13 backport to follow. -- >8 -- The std::formatter implementation for floating-point types uses __builtin_abs and __builtin_log10 to avoid including all of , but those functions are not generic. The result of abs(2e304) is -INT_MIN which is undefined,

[committed] i386: Fix grammar typo in diagnostic

2023-08-07 Thread Jonathan Wakely via Gcc-patches
Committed as obvious. Less obvious (to me) is whether it's correct to say "GCC V13" here. I don't think we refer to a version that way anywhere else, do we? Would "since GCC 13.1.0" be better? -- >8 -- gcc/ChangeLog: * config/i386/i386.cc (ix86_invalid_conversion): Fix grammar. ---

[committed] libstdc++: Fix past-the-end increment in std::format [PR110862]

2023-08-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. gcc-13 backport to follow. -- >8 -- At the end of a replacement field we should check that the closing brace is actually present before incrementing past it. libstdc++-v3/ChangeLog: PR libstdc++/110862 * include/std/format

Re: [PATCH 24/24] toplevel: Makefile.def: add install-strip dependency on libsframe

2023-08-07 Thread Arsen Arsenović via Gcc-patches
Jeff Law writes: > OK. > > I know I skipped over a few. I'll try to get those wrapped up shortly. Thanks, I've pushed all of those (since I received all the reviews). > While I strongly dislike git submodules, this may be one of those occasions > where their use might be justified.

[committed][RISC-V]Don't reject constants in cmov condition

2023-08-07 Thread Jeff Law
This test is too aggressive. Constants have VOIDmode, so we need to let the through this phase of conditional move support. Fixes several missed conditional moves with the trunk. Committed to the trunk, Jeff commit 18c453f0e633abb9b317947b011ec6e07780fba8 Author: Jeff Law Date: Mon Aug

[PATCH] vect: Add a popcount fallback.

2023-08-07 Thread Robin Dapp via Gcc-patches
Hi, This patch adds a fallback when the backend does not provide a popcount implementation. The algorithm is the same one libgcc uses, as well as match.pd for recognizing a popcount idiom. __builtin_ctz and __builtin_ffs can also rely on popcount so I used the fallback for them as well.

Re: [PATCH 06/24] toplevel: Recover tilegx/tilepro targets

2023-08-07 Thread Eric Gallager via Gcc-patches
On Mon, Aug 7, 2023 at 1:43 PM Jeff Law via Gcc-patches wrote: > On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: > > These are still supported in Binutils. > > > > ChangeLog: > > > > * configure: Regenerate. > > * configure.ac: Recover tilegx/tilepro targets. > OK. Good

Re: [PATCH 03/24] gcc-4.5 build fixes

2023-08-07 Thread Eric Gallager via Gcc-patches
On Mon, Aug 7, 2023 at 7:22 AM Arsen Arsenović via Gcc-patches wrote: > > From: Alan Modra > > Trying to build binutils with an older gcc currently fails. Working > around these gcc bugs is not onerous so let's fix them. > > include/ChangeLog: > > * xtensa-dynconfig.h

Re: [PATCH 00/24] Sync shared build infrastructure with binutils-gdb

2023-08-07 Thread Eric Gallager via Gcc-patches
On Mon, Aug 7, 2023 at 7:19 AM Arsen Arsenović via Gcc-patches wrote: > > Hello, > > This patch set, combined with a sibling patch set sent on the binutils > and GDB MLs, bring up the shared infrastructure between the two projects > in sync again. > > It largely consists of cherry-picks from

Re: [PATCH] RISC-V: Support VLS basic operation auto-vectorization

2023-08-07 Thread Robin Dapp via Gcc-patches
Hi Juzhe, thanks, looks good from my side. > +/* { dg-final { scan-assembler-times {vand\.vi\s+v[0-9]+,\s*v[0-9]+,\s*-16} > 42 } } */ > +/* { dg-final { scan-assembler-not {csrr} } } */ I was actually looking for a scan-assembler-not vsetvli... but the csrr will do as well. Regards Robin

Re: [PATCH 02/24] PR29961, plugin-api.h: "Could not detect architecture endianess"

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Alan Modra Found when attempting to build binutils on sparc sunos-5.8 where sys/byteorder.h defines _BIG_ENDIAN but not any of the BYTE_ORDER variants. This patch adds the extra tests to cope with the old machine, and tidies the

Re: [PATCH 04/24] Sync with binutils: GCC: Pass --plugin to AR and RANLIB

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: "H.J. Lu" Sync with binutils for building binutils with LTO: 50ad1254d50 GCC: Pass --plugin to AR and RANLIB Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support LTO build. ChangeLog: * Makefile.tpl (AR):

Re: [PATCH 14/24] libtool.m4: fix nm BSD flag detection

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Nick Alcock Libtool needs to get BSD-format (or MS-format) output out of the system nm, so that it can scan generated object files for symbol names for -export-symbols-regex support. Some nms need specific flags to turn on

Re: [PATCH 15/24] libtool.m4: fix the NM="/nm/over/here -B/option/with/path" case

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Nick Alcock My previous nm patch handled all cases but one -- if the user set NM in the environment to a path which contained an option, libtool's nm detection tries to run nm against a copy of nm with the options in it: e.g. if

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-07 Thread Bradley Lucier via Gcc-patches
Thank you for your comments. I have a few questions. I don't think this specific case qualifies for -Wdisabled-optimization. The diagnostic is for cases the user can control and was invented for limits we put up for compile-time and memory-usage issues where there exist --param XYZ to adjust

[PATCH] _BitInt to _Decimal* conversion support [PR102989]

2023-08-07 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch on top of the _Decimal* to _BitInt conversion support patch (and obviously the _BitInt patch series) implements the _BitInt to _Decimal{32,64,128} conversions. These functions do at most two divisions, one possibly by very large power of 10 for which the code just checks

Re: [PATCH 22/24] libtool.m4: augment symcode for Solaris 11

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:33, Arsen Arsenović via Gcc-patches wrote: From: Nick Alcock This reports common symbols like GNU nm, via a type code of 'C'. ChangeLog: * libtool.m4 (lt_cv_sys_global_symbol_pipe): Augment symcode for Solaris 11. gcc/ChangeLog: * configure:

Re: [PATCH 19/24] Deprecate a.out support for NetBSD targets.

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:33, Arsen Arsenović via Gcc-patches wrote: From: John Ericson As discussed previously, a.out support is now quite deprecated, and in some cases removed, in both Binutils itself and NetBSD, so this legacy default makes little sense. `netbsdelf*` and `netbsdaout*` still work

Re: [PATCH 24/24] toplevel: Makefile.def: add install-strip dependency on libsframe

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:33, Arsen Arsenović via Gcc-patches wrote: From: Indu Bhagat As noted in PR libsframe/30014 - FTBFS: install-strip fails because bfdlib relinks and fails to find libsframe, the install time dependencies of libbfd need to be updated. ChangeLog: * Makefile.def: Reflect

Re: [PATCH 23/24] bfd: linker: merge .sframe sections

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:33, Arsen Arsenović via Gcc-patches wrote: From: Indu Bhagat The linker merges all the input .sframe sections. When merging, the linker verifies that all the input .sframe sections have the same abi/arch. The linker uses libsframe library to perform key actions on the .sframe

Re: [PATCH 21/24] PKG_CHECK_MODULES: Properly check if $pkg_cv_[]$1[]_LIBS works

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:33, Arsen Arsenović via Gcc-patches wrote: From: "H.J. Lu" There is no need to check $pkg_cv_[]$1[]_LIBS works if package check failed. config/ChangeLog: * pkg.m4 (PKG_CHECK_MODULES): Use AC_TRY_LINK only if $pkg_failed = no. OK. jeff

Re: [PATCH 20/24] PKG_CHECK_MODULES: Check if $pkg_cv_[]$1[]_LIBS works

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:33, Arsen Arsenović via Gcc-patches wrote: From: "H.J. Lu" It is quite normal to have headers without library on multilib OSes. Add AC_TRY_LINK to PKG_CHECK_MODULES to check if $pkg_cv_[]$1[]_LIBS works. config/ChangeLog: * pkg.m4 (PKG_CHECK_MODULES): Add AC_TRY_LINK

Re: [PATCH 09/24] add --enable-default-compressed-debug-sections-algorithm configure option

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Martin Liska ChangeLog: * configure.ac: Add --enable-default-compressed-debug-sections-algorithm. * configure: Regenerate. OK jeff

Re: [PATCH 2/2] libstdc++: Replace all manual FTM definitions and use

2023-08-07 Thread Arsen Arsenović via Gcc-patches
Jonathan Wakely writes: > On Sat, 29 Apr 2023 at 11:24, Arsen Arsenović via Libstdc++ < > libstd...@gcc.gnu.org> wrote: > >> libstdc++-v3/ChangeLog: >> >> * libsupc++/typeinfo: Switch to bits/version.h for >> __cpp_lib_constexpr_typeinfo. >> >> > Does this change have an impact

Re: [PATCH 18/24] PR27116, Spelling errors found by Debian style checker

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:33, Arsen Arsenović via Gcc-patches wrote: From: Alan Modra config/ChangeLog: * override.m4: Correct comment grammar. OK jeff

Re: [PATCH 17/24] egrep in binutils

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Alan Modra Apparently some distros have a nagging egrep that helpfully tells you egrep is deprecated and to use "grep -E". The nag message causes a ld testsuite failure. What's more the advice isn't that good. The "-E" flag

[PATCH ver 3] rs6000: Fix __builtin_altivec_vcmpne{b,h,w} implementation

2023-08-07 Thread Carl Love via Gcc-patches
GCC maintainers: Ver 3: Updated description to make it clear the patch fixes the confusion on the availability of the builtins. Fixed the dg-require- effective-target on the test cases and the dg-options. Change the test case so the for loop for the test will not be unrolled. Fixed a

Re: [PATCH 16/24] Add support for the haiku operating system

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Alexander von Gluck IV These are the os support patches we have been grooming and maintaining for quite a few years over on git.haiku-os.org. All of these architectures are working and most have been stable for quite some time.

Re: [PATCH 13/24] configure: reinstate 32b PA-RISC HP-UX target in toplevel

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: The Binutils still support this target. ChangeLog: * configure.ac: Reinstate 32b PA-RISC HP-UX targets * configure: Regenerate. OK. Though I could fix this by removing SOM support in BFD? :-) Though in reality it

Re: [PATCH 12/24] Pass PKG_CONFIG_PATH down from top-level Makefile

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Simon Marchi [Sending to binutils, gdb-patches and gcc-patches, since it touches the top-level Makefile/configure] I have my debuginfod library installed in a non-standard location (/opt/debuginfod), which requires me to set

Re: [PATCH 11/24] Disable year 2038 support on 32-bit hosts by default

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Luis Machado With a recent import of gnulib, code has been pulled that tests and enables 64-bit time_t by default on 32-bit hosts that support it. Although gdb can use the gnulib support, bfd doesn't use gnulib and currently

Re: [PATCH 10/24] gprofng: a new GNU profiler

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Vladimir Mezentsev ChangeLog: * Makefile.def: Add gprofng module. * configure.ac: Add --enable-gprofng option. * Makefile.in: Regenerate. * configure: Regenerate. include/ChangeLog: *

Re: [PATCH 08/24] configure: require libzstd >= 1.4.0

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Christophe Lyon gas uses ZSTD_compressStream2 which is only available with libzstd >= 1.4.0, leading to build errors when an older version is installed. This patch updates the check libzstd presence to check its version is =

Re: [PATCH 07/24] binutils, gdb: support zstd compressed debug sections

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Fangrui Song PR29397 PR29563: Add new configure option --with-zstd which defaults to auto. If pkgconfig/libzstd.pc is found, define HAVE_ZSTD and support zstd compressed debug sections for most tools. * bfd: for addr2line,

Re: [PATCH 06/24] toplevel: Recover tilegx/tilepro targets

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: These are still supported in Binutils. ChangeLog: * configure: Regenerate. * configure.ac: Recover tilegx/tilepro targets. OK. Good reminder that if we deprecate/remove something from GCC, we probably want to keep the

Re: [PATCH 05/24] GCC: Check if AR works with --plugin and rc

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: "H.J. Lu" AR from older binutils doesn't work with --plugin and rc: [hjl@gnu-cfl-2 bin]$ touch foo.c [hjl@gnu-cfl-2 bin]$ ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c [hjl@gnu-cfl-2

Re: [PATCH 2/2] libstdc++: Replace all manual FTM definitions and use

2023-08-07 Thread Arsen Arsenović via Gcc-patches
Jonathan Wakely writes: > On Sat, 29 Apr 2023 at 11:24, Arsen Arsenović via Libstdc++ < > libstd...@gcc.gnu.org> wrote: > >> libstdc++-v3/ChangeLog: >> >> * libsupc++/typeinfo: Switch to bits/version.h for >> __cpp_lib_constexpr_typeinfo. >> >> > Does this change have an impact

Re: [PATCH v2] rs6000: Fix __builtin_altivec_vcmpne{b,h,w} implementation

2023-08-07 Thread Carl Love via Gcc-patches
On Mon, 2023-08-07 at 17:18 +0800, Kewen.Lin wrote: > Hi Carl, > > Sorry for the late review. > > on 2023/8/2 02:29, Carl Love wrote: > > GCC maintainers: > > > > Ver 2: Re-worked the test vec-cmpne.c to create a compile only > > test > > verify the instruction generation and a runnable test

Re: [PATCH 4/5] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to non-zero

2023-08-07 Thread Jeff Law via Gcc-patches
On 7/19/23 04:11, Xiao Zeng wrote: This patch completes the recognition of Zicond when the select pattern with condition eq or neq to non-zero (using equality as an example), namely: 1 rd = (rs2 == non-imm) ? 0 : rs1 2 rd = (rs2 == reg) ? 0 : rs1 At the same time, more Zicond non basic

Re: [PATCH 1/2] libstdc++: Implement more maintainable header

2023-08-07 Thread Arsen Arsenović via Gcc-patches
Jonathan Wakely writes: > [...snip...] > It looks like this will regenerate the bits/version.h file if it's older > than the definitions or the autogen template, right? > > Generally we don't want to touch anything in the source tree as part of a > normal build. It's OK to do that when

Re: [PATCH] cprop_hardreg: Allow more propagation of the stack pointer.

2023-08-07 Thread Philipp Tomsich
Applied to master, thanks! --Philipp. On Mon, 7 Aug 2023 at 19:20, Jeff Law wrote: > > > > On 8/7/23 05:31, Manolis Tsamis wrote: > > The stack pointer propagation fix 736f8fd3 turned out to be more restrictive > > than needed by rejecting propagation of the stack pointer when REG_POINTER > >

Re: [PATCH 03/24] gcc-4.5 build fixes

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: From: Alan Modra Trying to build binutils with an older gcc currently fails. Working around these gcc bugs is not onerous so let's fix them. include/ChangeLog: * xtensa-dynconfig.h (xtensa_isa_internal): Delete unnecessary

Re: [PATCH 01/24] toplevel: Substitute GDCFLAGS instead of using CFLAGS

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: r14-2875-g1ed21e23d6d4da ("Use substituted GDCFLAGS") already implemented this change, but only on the generated file rather than in the template it is generated from. ChangeLog: * Makefile.tpl: Substitute @GDCFLAGS@ instead of

[RFC] GCC Security policy

2023-08-07 Thread David Edelsohn via Gcc-patches
FOSS Best Practices recommends that projects have an official Security policy stated in a SECURITY.md or SECURITY.txt file at the root of the repository. GLIBC and Binutils have added such documents. Appended is a prototype for a Security policy file for GCC based on the Binutils document

[COMMITTED] MAINTAINERS: Add myself as a BPF port reviewer

2023-08-07 Thread David Faust via Gcc-patches
ChangeLog: * MAINTAINERS: Add the BPF port to my reviewer listing. --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6cac5ac6671..1e54844c905 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -273,7 +273,7 @@ arc port

Re: [PATCH] cprop_hardreg: Allow more propagation of the stack pointer.

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 05:31, Manolis Tsamis wrote: The stack pointer propagation fix 736f8fd3 turned out to be more restrictive than needed by rejecting propagation of the stack pointer when REG_POINTER didn't match. This commit removes this check: When the stack pointer is propagated it is fine for

Re: [PATCH] rtl-optimization/110869 Fix tests cmp-mem-const-*.c for sparc

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 07:32, Stefan Schulze Frielinghaus via Gcc-patches wrote: This fixes the rather new tests cmp-mem-const-{1,2,3,4,5,6}.c for sparc. For -1 and -2 we need at least optimization level 2 on sparc. For the sake of homogeneity, change all test cases to -O2. For -3 and -4 we do not end

Re: [PATCH v3] Implement new RTL optimizations pass: fold-mem-offsets.

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 08:44, Manolis Tsamis wrote: I have sent out a new v4 of this (https://gcc.gnu.org/pipermail/gcc-patches/2023-August/626502.html). In the new version I both restore the INSN_CODE as mentioned here and I also call recog when I commit the offset change (because there may be a change

Re: [V2][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-08-07 Thread Qing Zhao via Gcc-patches
> On Aug 7, 2023, at 12:16 PM, Kees Cook wrote: > > On Fri, Aug 04, 2023 at 07:44:28PM +, Qing Zhao wrote: >> This is the 2nd version of the patch, per our discussion based on the >> review comments for the 1st version, the major changes in this version >> are: > > Thanks for the update!

Re: [PATCH v1] Mode-Switching: Fix SET_SRC ICE when only one operand

2023-08-07 Thread Jeff Law via Gcc-patches
On 8/7/23 07:13, Richard Biener wrote: On Mon, Aug 7, 2023 at 2:30 PM Pan Li via Gcc-patches wrote: From: Pan Li In same cases, like gcc/testsuite/gcc.dg/pr78148.c in RISC-V, there will be only 1 operand when SET_SRC in create_pre_exit. For example as below. (insn 13 9 14 2 (clobber

Re: [V2][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-08-07 Thread Kees Cook via Gcc-patches
On Fri, Aug 04, 2023 at 07:44:28PM +, Qing Zhao wrote: > This is the 2nd version of the patch, per our discussion based on the > review comments for the 1st version, the major changes in this version > are: Thanks for the update! > > 1. change the name "element_count" to "counted_by"; > 2.

Re: [RFC PATCH] i386: Do not sanitize upper part of V2SFmode reg with -fno-trapping-math [PR110832]

2023-08-07 Thread Uros Bizjak via Gcc-patches
On Mon, Jul 31, 2023 at 11:40 AM Richard Biener wrote: > > On Sun, 30 Jul 2023, Uros Bizjak wrote: > > > Also introduce -m[no-]mmxfp-with-sse option to disable trapping V2SF > > named patterns in order to avoid generation of partial vector V4SFmode > > trapping instructions. > > > > The new

[committed] [RISC-V] Handle more cases in riscv_expand_conditional_move

2023-08-07 Thread Jeff Law via Gcc-patches
As I've mentioned in the main zicond thread, Ventana has had patches that support more cases by first emitting a suitable scc instruction essentially as a canonicalization step of the condition for zicond. For example if we have (set (target) (if_then_else (op (reg1) (reg2))

[PATCH] VR-VALUES [PR28794]: optimize compare assignments also

2023-08-07 Thread Andrew Pinski via Gcc-patches
This patch fixes the oldish (2006) bug where VRP was not optimizing the comparison for assignments while handling them for GIMPLE_COND only. It just happens to also solves PR 103281 due to allowing to optimize `c < 1` to `c == 0` and then we get `(c == 0) == c` (which was handled by

Re: [PATCH v3] Implement new RTL optimizations pass: fold-mem-offsets.

2023-08-07 Thread Manolis Tsamis
I have sent out a new v4 of this (https://gcc.gnu.org/pipermail/gcc-patches/2023-August/626502.html). In the new version I both restore the INSN_CODE as mentioned here and I also call recog when I commit the offset change (because there may be a change from no offset to some offsets). I have also

[PATCH v4] Implement new RTL optimizations pass: fold-mem-offsets.

2023-08-07 Thread Manolis Tsamis
This is a new RTL pass that tries to optimize memory offset calculations by moving them from add immediate instructions to the memory loads/stores. For example it can transform this: addi t4,sp,16 add t2,a6,t4 shl t3,t2,1 ld a2,0(t3) addi a2,1 sd a2,8(t2) into the following

[V2][PATCH] gcc-14/changes.html: Deprecate a GCC C extension on flexible array members.

2023-08-07 Thread Qing Zhao via Gcc-patches
Hi, This is the 2nd version of the patch. Comparing to the 1st version, the only change is to address Richard's comment on refering a warning option for diagnosing deprecated behavior. Okay for committing? thanks. Qing == *htdocs/gcc-14/changes.html (Caveats): Add notice about

[PATCH, OpenACC 2.7, v2] readonly modifier support in front-ends

2023-08-07 Thread Chung-Lin Tang via Gcc-patches
Hi Thomas, Tobias, here's the updated v2 of the readonly modifier front-end patch. On 2023/7/20 11:08 PM, Tobias Burnus wrote: >>> +++ b/gcc/c/c-parser.cc >>> @@ -14059,7 +14059,8 @@ c_parser_omp_variable_list (c_parser *parser, >>> >>> static tree >>> c_parser_omp_var_list_parens (c_parser

[PATCH] rtl-optimization/110869 Fix tests cmp-mem-const-*.c for sparc

2023-08-07 Thread Stefan Schulze Frielinghaus via Gcc-patches
This fixes the rather new tests cmp-mem-const-{1,2,3,4,5,6}.c for sparc. For -1 and -2 we need at least optimization level 2 on sparc. For the sake of homogeneity, change all test cases to -O2. For -3 and -4 we do not end up with a comparison of memory and a constant, and finally for -5 and -6

[PATCH] tree-optimization/49955 - BB reduction with odd number of lanes

2023-08-07 Thread Richard Biener via Gcc-patches
The following enhances BB reduction vectorization to support vectorizing only a subset of the lanes, keeping the rest as scalar ops. For now we try to make the number of lanes even by leaving alone the "last" lane. That's because SLP discovery with all lanes will fail too soon to get us any hint

[PATCH] Use RPO order for sinking

2023-08-07 Thread Richard Biener via Gcc-patches
The following makes us use RPO order instead of walking post-dominators. This ensures we visit a block before any predecessors. I've seen some extra sinking because of this in a larger testcase but failed to reduce a smaller one (processing of post-dominator sons is unordered so I failed to have

RE: [PATCH v1] Mode-Switching: Fix SET_SRC ICE when only one operand

2023-08-07 Thread Li, Pan2 via Gcc-patches
> maybe check that return_copy_pat is a SET instead? You mean something like this? I tried this but I am not sure single_set is good enough here, because it should be "narrow" than GET_RTX_LENGTH. + && single_set (return_copy) Pan -Original Message- From:

Re: [PATCH] rtl-optimization/110587 - speedup find_hard_regno_for_1

2023-08-07 Thread Richard Biener via Gcc-patches
On Wed, 2 Aug 2023, Richard Biener wrote: > On Mon, 31 Jul 2023, Jeff Law wrote: > > > > > > > On 7/31/23 04:54, Richard Biener via Gcc-patches wrote: > > > On Tue, 25 Jul 2023, Richard Biener wrote: > > > > > >> The following applies a micro-optimization to find_hard_regno_for_1, > > >>

[PATCH] Improve -fopt-info-vec for basic-block vectorization

2023-08-07 Thread Richard Biener via Gcc-patches
We currently dump notes like flow_lam.f:65:72: optimized: basic block part vectorized using 32 byte vectors flow_lam.f:65:72: optimized: basic block part vectorized using 32 byte vectors flow_lam.f:65:72: optimized: basic block part vectorized using 32 byte vectors flow_lam.f:65:72: optimized:

Re: [PATCH v1] Mode-Switching: Fix SET_SRC ICE when only one operand

2023-08-07 Thread Richard Biener via Gcc-patches
On Mon, Aug 7, 2023 at 2:30 PM Pan Li via Gcc-patches wrote: > > From: Pan Li > > In same cases, like gcc/testsuite/gcc.dg/pr78148.c in RISC-V, there will > be only 1 operand when SET_SRC in create_pre_exit. For example as below. > > (insn 13 9 14 2 (clobber (reg/i:TI 10 a0)) >

RE: RE: [PATCH v1] RISC-V: Refactor RVV frm_mode attr for rounding mode intrinsic

2023-08-07 Thread Li, Pan2 via Gcc-patches
Got you point, thanks kito and will send patch v2 after test. Pan -Original Message- From: Kito Cheng Sent: Monday, August 7, 2023 2:35 PM To: Li, Pan2 Cc: juzhe.zh...@rivai.ai; gcc-patches ; Wang, Yanzhang Subject: Re: RE: [PATCH v1] RISC-V: Refactor RVV frm_mode attr for rounding

[PATCH v1] Mode-Switching: Fix SET_SRC ICE when only one operand

2023-08-07 Thread Pan Li via Gcc-patches
From: Pan Li In same cases, like gcc/testsuite/gcc.dg/pr78148.c in RISC-V, there will be only 1 operand when SET_SRC in create_pre_exit. For example as below. (insn 13 9 14 2 (clobber (reg/i:TI 10 a0)) "gcc/testsuite/gcc.dg/pr78148.c":24:1 -1 (expr_list:REG_UNUSED (reg/i:TI 10 a0)

Re: [PATCH 1/3] targhooks: Extend legitimate_address_p with code_helper [PR110248]

2023-08-07 Thread Richard Biener via Gcc-patches
On Mon, Aug 7, 2023 at 12:15 PM Kewen.Lin wrote: > > Hi Richi, > > on 2023/6/30 17:13, Kewen.Lin via Gcc-patches wrote: > > Hi Richi, > > > > Thanks for your review! > > > > on 2023/6/30 16:56, Richard Biener wrote: > >> On Fri, Jun 30, 2023 at 7:38 AM Kewen.Lin wrote: > >>> > >>> Hi, > >>> >

Re: [PATCH] Fix ICE in rtl check when bootstrap.

2023-08-07 Thread Hongtao Liu via Gcc-patches
On Mon, Aug 7, 2023 at 4:54 PM liuhongt wrote: > > /var/tmp/portage/sys-devel/gcc-14.0.0_pre20230806/work/gcc-14-20230806/libgfortran/generated/matmul_i1.c: > In function ‘matmul_i1_avx512f’: >

Re: [PATCH] i386: Clear upper bits of XMM register for V4HFmode/V2HFmode operations [PR110762]

2023-08-07 Thread Hongtao Liu via Gcc-patches
On Mon, Aug 7, 2023 at 5:19 PM Uros Bizjak via Gcc-patches wrote: > > On Mon, Aug 7, 2023 at 10:57 AM liuhongt wrote: > > > > Similar like r14-2786-gade30fad6669e5, the patch is for V4HF/V2HFmode. > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > > Ok for trunk? > > > >

[PATCH] cprop_hardreg: Allow more propagation of the stack pointer.

2023-08-07 Thread Manolis Tsamis
The stack pointer propagation fix 736f8fd3 turned out to be more restrictive than needed by rejecting propagation of the stack pointer when REG_POINTER didn't match. This commit removes this check: When the stack pointer is propagated it is fine for this to result in REG_POINTER becoming true

[PATCH 22/24] libtool.m4: augment symcode for Solaris 11

2023-08-07 Thread Arsen Arsenović via Gcc-patches
From: Nick Alcock This reports common symbols like GNU nm, via a type code of 'C'. ChangeLog: * libtool.m4 (lt_cv_sys_global_symbol_pipe): Augment symcode for Solaris 11. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate.

[PATCH 19/24] Deprecate a.out support for NetBSD targets.

2023-08-07 Thread Arsen Arsenović via Gcc-patches
From: John Ericson As discussed previously, a.out support is now quite deprecated, and in some cases removed, in both Binutils itself and NetBSD, so this legacy default makes little sense. `netbsdelf*` and `netbsdaout*` still work allowing the user to be explicit about there choice.

Re: [PATCH] i386: Clear upper bits of XMM register for V4HFmode/V2HFmode operations [PR110762]

2023-08-07 Thread Richard Biener via Gcc-patches
On Mon, Aug 7, 2023 at 11:20 AM Uros Bizjak via Gcc-patches wrote: > > On Mon, Aug 7, 2023 at 10:57 AM liuhongt wrote: > > > > Similar like r14-2786-gade30fad6669e5, the patch is for V4HF/V2HFmode. > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > > Ok for trunk? > > > >

[PATCH 14/24] libtool.m4: fix nm BSD flag detection

2023-08-07 Thread Arsen Arsenović via Gcc-patches
From: Nick Alcock Libtool needs to get BSD-format (or MS-format) output out of the system nm, so that it can scan generated object files for symbol names for -export-symbols-regex support. Some nms need specific flags to turn on BSD-formatted output, so libtool checks for this in its

[PATCH 24/24] toplevel: Makefile.def: add install-strip dependency on libsframe

2023-08-07 Thread Arsen Arsenović via Gcc-patches
From: Indu Bhagat As noted in PR libsframe/30014 - FTBFS: install-strip fails because bfdlib relinks and fails to find libsframe, the install time dependencies of libbfd need to be updated. ChangeLog: * Makefile.def: Reflect that libsframe needs to installed before libbfd.

  1   2   >