Re: [PATCH] LoongArch: Add fcopysign instructions

2022-11-05 Thread Xi Ruoyao via Gcc-patches
On Sun, 2022-11-06 at 09:57 +0800, Lulu Cheng wrote: > > 在 2022/11/4 下午10:37, Xi Ruoyao 写道: > > Add fcopysign.{s,d} with the names copysign{sf,df}3 so GCC will expand > > __builtin_copysign{f,} to a single instruction. > > > > Link: https://sourceware.org/pipermail/libc-alpha/2022-November/143177

Re: [PATCH] LoongArch: Add fcopysign instructions

2022-11-05 Thread Lulu Cheng
在 2022/11/4 下午10:37, Xi Ruoyao 写道: Add fcopysign.{s,d} with the names copysign{sf,df}3 so GCC will expand __builtin_copysign{f,} to a single instruction. Link: https://sourceware.org/pipermail/libc-alpha/2022-November/143177.html gcc/ChangeLog: * config/loongarch/loongarch.md (UNSPEC

Re: [PATCH] LoongArch: fix signed overflow in loongarch_emit_int_compare

2022-11-05 Thread Lulu Cheng
在 2022/11/4 下午2:39, Xi Ruoyao 写道: Signed overflow is an undefined behavior, so we need to prevent it from happening, instead of "checking" the result. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_emit_int_compare): Avoid signed overflow. --- Bootstrapped and regt

Re: Re: [PATCH] RISC-V: Fix RVV testcases.

2022-11-05 Thread Kito Cheng via Gcc-patches
Alternative fix for those testcase has posted: https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605126.html On Tue, Nov 1, 2022 at 11:36 AM Palmer Dabbelt wrote: > > On Mon, 31 Oct 2022 16:52:25 PDT (-0700), juzhe.zh...@rivai.ai wrote: > > These cases actually doesn't care about -mabi, th

[PATCH] RISC-V: Fix RVV related testsuite

2022-11-05 Thread Kito Cheng
Use wrapper of riscv_vector.h for RVV related testcases, more detail see https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603140.html gcc/testsuite/ChangeLog: * gcc/testsuite/gcc.target/riscv/rvv/base/mov-1.c: Use double quotes to include riscv_vector.h rather than angle br

[committed] wwwdocs: gcc-4.8: Move three links from http to https

2022-11-05 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/gcc-4.8/changes.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/gcc-4.8/changes.html b/htdocs/gcc-4.8/changes.html index 39557435..cb30a5e9 100644 --- a/htdocs/gcc-4.8/changes.html +++ b/htdocs/gcc-4.8/changes.html @@ -258,7 +258,7 @

[committed] wwwdocs: codingrationale: Switch www.open-std.org links to https

2022-11-05 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/codingrationale.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/codingrationale.html b/htdocs/codingrationale.html index 900f6c53..6cc76885 100644 --- a/htdocs/codingrationale.html +++ b/htdocs/codingrationale.html @@ -197,11 +197,11 @

[Patch] Fortran: Fix reallocation on assignment for kind=4 strings [PR107508]

2022-11-05 Thread Tobias Burnus
Prior to the attached patch, there is a problem with realloc on assignment with kind=4 characters as the string length was compared with the byte size, which was always true. I initially thought, looking at the code, that scalars have the same issues, but they don't; hence, I ended up with a comm

[committed] d: Adjust attr_register2.d to pass when compiling with -m32

2022-11-05 Thread Iain Buclaw via Gcc-patches
Hi, Noticed when running on x86_64-linux-gnu with `-m32', this test triggered a different kind of error. Adjusted the test to use a different register that is common between x86 and x86_64. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline. Regards, Iain.

[committed] d: Add support for vector comparison operators

2022-11-05 Thread Iain Buclaw via Gcc-patches
Hi, The front-end added semantic support to permit comparing two vector expressions. This removes the restriction in the code generator, as well as the intrisics that previously exposed the same operation. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, committed to mainline.

Re: [PATCH 4/6] diagnostics: libcpp: Add LC_GEN linemaps to support in-memory buffers

2022-11-05 Thread Lewis Hyatt via Gcc-patches
Thanks for the comments! I have some replies below. On Sat, Nov 5, 2022 at 12:23 PM David Malcolm wrote: > [...snip...] > > > > diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc > > index 5890c18bdc3..2935d7fb236 100644 > > --- a/gcc/c-family/c-common.cc > > +++ b/gcc/c-family/c-co

Re: [PATCH 4/6] diagnostics: libcpp: Add LC_GEN linemaps to support in-memory buffers

2022-11-05 Thread David Malcolm via Gcc-patches
On Fri, 2022-11-04 at 09:44 -0400, Lewis Hyatt via Gcc-patches wrote: > Add a new linemap reason LC_GEN which enables encoding the location > of data > that was generated during compilation and does not appear in any > source file. > There could be many use cases, such as, for instance, referring t

Re: [PATCH 1/2]middle-end: Add new tbranch optab to add support for bit-test-and-branch operations

2022-11-05 Thread Richard Biener via Gcc-patches
On Wed, 2 Nov 2022, Aldy Hernandez wrote: > On Wed, Nov 2, 2022 at 10:55 AM Tamar Christina > wrote: > > > > Hi Aldy, > > > > I'm trying to use Ranger to determine if a range of an expression is a > > single bit. > > > > If possible in case of a mask then also the position of the bit that's >

Re: [RFC] propgation leap over memory copy for struct

2022-11-05 Thread Richard Biener via Gcc-patches
On Tue, 1 Nov 2022, Jiufu Guo wrote: > Segher Boessenkool writes: > > > On Mon, Oct 31, 2022 at 04:13:38PM -0600, Jeff Law wrote: > >> On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: > >> >We know that for struct variable assignment, memory copy may be used. > >> >And for memcpy, we may load

[committed] libstdc++: Do not use SFINAE for propagate_const conversions [PR107525]

2022-11-05 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- As the PR notes, the current conversion operators are defined as function templates so that we can use SFINAE. But this changes how they are considered for overload resolution. This moves those operators into base classes that can be specialized so t

Re: [PATCH v3] libstdc++: fix pointer type exception catch [PR105387]

2022-11-05 Thread Jonathan Wakely via Gcc-patches
On Tue, 11 Oct 2022 at 16:05, Jakob Hasse via Libstdc++ wrote: > > Hello, is there any update regarding the patch PR105387 for bug 105387? We've > been waiting for some time now, but the bugzilla bug is still open: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105387. If there is any issue > w

Re: [PATCH 2/2] Add assert for type on tree_nonzero_bits

2022-11-05 Thread Richard Biener via Gcc-patches
On Wed, Nov 2, 2022 at 10:48 PM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > Right now anyone could call tree_nonzero_bits with > either complex or vector types and this will return > the wrong thing. So just assert that nobody calls > it with this. > > OK? Bootstrapped and teste

Re: [PATCH 1/2] Fix PR 105532: match.pd patterns calling tree_nonzero_bits with vector types

2022-11-05 Thread Richard Biener via Gcc-patches
On Wed, Nov 2, 2022 at 10:47 PM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > Even though this PR was reported with an ubsan issue, the problem is > tree_nonzero_bits is being called with an expression which is a vector type. It seems to me the semantics for vectors should be cle

Re: [PATCH] vect: Fold LEN_{LOAD, STORE} if it's for the whole vector [PR107412]

2022-11-05 Thread Richard Biener via Gcc-patches
On Wed, Nov 2, 2022 at 8:59 AM Kewen.Lin wrote: > > Hi, > > As the test case in PR107412 shows, we can fold IFN .LEN_{LOAD, > STORE} into normal vector load/store if the given length is known > to be equal to the length of the whole vector. It would help to > improve overall cycles as normally th

Re: [RFC] propgation leap over memory copy for struct

2022-11-05 Thread Richard Biener via Gcc-patches
On Mon, Oct 31, 2022 at 11:14 PM Jeff Law via Gcc-patches wrote: > > > On 10/30/22 20:42, Jiufu Guo via Gcc-patches wrote: > > Hi, > > > > We know that for struct variable assignment, memory copy may be used. > > And for memcpy, we may load and store more bytes as possible at one time. > > While i

Re: [PATCH 1/8]middle-end: Recognize scalar reductions from bitfields and array_refs

2022-11-05 Thread Richard Biener via Gcc-patches
On Mon, Oct 31, 2022 at 1:00 PM Tamar Christina via Gcc-patches wrote: > > Hi All, > > This patch series is to add recognition of pairwise operations (reductions) > in match.pd such that we can benefit from them even at -O1 when the vectorizer > isn't enabled. > > Ths use of these allow for a lot

Re: optabs: Variable index vec_set

2022-11-05 Thread Richard Biener via Gcc-patches
On Wed, Nov 2, 2022 at 1:46 PM Uros Bizjak wrote: > > On Wed, Nov 2, 2022 at 1:45 PM Robin Dapp wrote: > > > > > IIRC, I was trying to "fix" modeless operand by giving it a mode, but > > > since it made no difference for x86, I later dropped the patch. > > > However, operand with a known mode is

Re: [PATCH] Extend optimization for integer bit test on __atomic_fetch_[or|and]_*

2022-11-05 Thread Richard Biener via Gcc-patches
On Wed, Nov 2, 2022 at 8:09 PM H.J. Lu via Gcc-patches wrote: > > Extend optimization for > > _1 = __atomic_fetch_or_4 (ptr_6, 0x8000, _3); > _5 = (signed int) _1; > _4 = _5 >= 0; > > to > > _1 = __atomic_fetch_or_4 (ptr_6, 0x8000, _3); > _5 = (signed int) _1; > if (_5 >= 0) OK. > gcc/ >

Re: [PATCH] Plug memory leak in attribute target_clones

2022-11-05 Thread Richard Biener via Gcc-patches
On Thu, Nov 3, 2022 at 10:01 PM Bernhard Reutner-Fischer via Gcc-patches wrote: > > It looks like there was some memory leak in the handling > of attribute target_clones, introduced in 5928bc2ec06d . > > Ok for trunk if testing passes? OK > gcc/ChangeLog: > > * multiple_target.cc (expand

Re: [PATCH] gcc/file-prefix-map: Fix NULL filename handling

2022-11-05 Thread Richard Biener via Gcc-patches
On Fri, Nov 4, 2022 at 6:26 PM Richard Purdie via Gcc-patches wrote: > > e5c15eb183f17e806ad6b58c9497321ded87866f introduced a regression as > some ada tests end up passing NULL as the filename to remap_filename(). > Handle this as before to fix the tests. OK. > gcc/ChangeLog: > > * file-prefix-

Re: [PATCH] doc: Document correct -fwide-exec-charset defaults [PR41041]

2022-11-05 Thread Richard Biener via Gcc-patches
On Fri, Nov 4, 2022 at 1:18 PM Jonathan Wakely via Gcc-patches wrote: > > OK for trunk and release branches? OK > -- >8 -- > > As shown in the PR, the default is not UTF-32 but rather UTF-32BE or > UTF-32LE, avoiding the need for a byte order mark in literals. > > gcc/ChangeLog: > > PR c

Re: [PATCH] Support multilib-aware target lib flags self-specs overriding

2022-11-05 Thread Alexandre Oliva via Gcc-patches
On Oct 6, 2022, Alexandre Oliva wrote: > I'd much rather we could use -fmultiflags, a far more elegant > arrangement IMHO, so... > Ping? https://gcc.gnu.org/pipermail/gcc-patches/2022-June/597419.html >> for gcc/ChangeLog >> * common.opt (fmultiflags): New. >> * doc/invoke.texi: Document it

RE: [PATCH] [PHIOPT] Add A ? B + CST : B match and simplify optimizations

2022-11-05 Thread Zhongyunde via Gcc-patches
> -Original Message- > From: Andrew Pinski [mailto:pins...@gcc.gnu.org] > Sent: Saturday, November 5, 2022 2:34 PM > To: Zhongyunde > Cc: hongtao@intel.com; gcc-patches@gcc.gnu.org; Zhangwen(Esan) > ; Weiwei (weiwei, Compiler) > ; zhong_1985...@163.com > Subject: Re: [PATCH] [PHIOPT]