Re: [PATCH V2]HIGH part of symbol ref is invalid for constant pool[PR106460]

2022-08-11 Thread Jiufu Guo via Gcc-patches
Hi, Gentle ping: https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598980.html BR, Jeff(Jiufu) Jiufu Guo writes: > Hi, > > As the issue in PR106460, a rtx 'high:DI (symbol_ref:DI ("var_48")' is tried > to store into constant pool. But actually, it indicates partial address, > which to be fo

Re: [GCC13][Patch][PR106457]improve array_at_struct_end_p for array objects (PR106457)

2022-08-11 Thread Richard Biener via Gcc-patches
On Wed, 10 Aug 2022, Qing Zhao wrote: > Hi, > > As mentioned in the bug report, I reopened this bug since the previous patch: > > commit r13-1875-gff26f0ba68fe6e870f315d0601b596f889b89680 > Author: Richard Biener > Date: Thu Jul 28 10:07:32 2022 +0200 > > middle-end/106457 - improve arra

Re: [PATCH] analyzer: fix ICE casued by dup2 in sm-fd.cc[PR106551]

2022-08-11 Thread Mir Immad via Gcc-patches
With the fix for bogus warning in fd-uninit.c, the analyzer now does not warning for the following code for which it would previously emit -Wanalyzer-fd-use-without-check extern int m; test() { int fd = dup2(m, 1); close(fd); } So I had to remove such warnings from fd-dup-1.c test_20,21,22 (in

[PATCH] analyzer: fix ICE casued by dup2 in sm-fd.cc[PR106551]

2022-08-11 Thread Immad Mir via Gcc-patches
This patch fixes the ICE caused by valid_to_unchecked_state, at analyzer/sm-fd.cc by handling the m_start state in check_for_dup. Tested lightly on x86_64. gcc/analyzer/ChangeLog: PR analyzer/106551 * sm-fd.cc (check_for_dup): handle the m_start state when transitioning th

[PATCH] Tame path_range_query::compute_imports

2022-08-11 Thread Richard Biener via Gcc-patches
This avoids going BBs outside of the path when adding def chains to the set of imports. It also syncs the code with range_def_chain::get_def_chain to not miss out on some imports this function would identify. Bootstrap / regtest pending on x86_64-unknown-linux-gnu. The question still stands on w

[PATCH] LoongArch: Get __tls_get_addr address through got table when disable plt.

2022-08-11 Thread Lulu Cheng
thread.c: __attribute__ ((tls_model ("global-dynamic"))) __thread int a; void test (void) { a = 10; } Compile the tests with -fno-plt, error message is as follows: thread.c: In function 'test': thread.c:7:1: error: unrecognizable insn: 7 | } | ^ (call_insn/u 7 6 8 2 (parallel [

Re: [PATCH] rs6000: Enable generate const through pli+pli+rldimi

2022-08-11 Thread Jiufu Guo via Gcc-patches
Hi, Segher Boessenkool writes: > Hi! > > On Wed, Aug 10, 2022 at 03:11:23PM +0800, Jiufu Guo wrote: >> As mentioned in PR106550, since pli could support 34bits immediate, we could >> use less instructions(3insn would be ok) to build 64bits constant with pli. >> >> For example, for constant 0x0

[PATCH][pushed] tree-optimization/106514 - revisit m_import compute in backward threading

2022-08-11 Thread Richard Biener via Gcc-patches
FYI - this is what I pushed after re-testing. Changed from the previous patch is mostly the way imports are computed, see the separate patch to fixup path_range_query::compute_imports. The XFAILed testcase from the previous change is un-XFAILed with this and I added a new testcase covering the

Re: [PATCH] Tame path_range_query::compute_imports

2022-08-11 Thread Aldy Hernandez via Gcc-patches
OK On Thu, Aug 11, 2022, 13:42 Richard Biener wrote: > This avoids going BBs outside of the path when adding def chains > to the set of imports. It also syncs the code with > range_def_chain::get_def_chain to not miss out on some imports > this function would identify. > > Bootstrap / regtest p

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-08-11 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 9 Aug 2022 at 18:42, Richard Biener wrote: > > On Tue, Aug 9, 2022 at 12:10 PM Prathamesh Kulkarni > wrote: > > > > On Mon, 8 Aug 2022 at 14:27, Richard Biener > > wrote: > > > > > > On Mon, Aug 1, 2022 at 5:17 AM Prathamesh Kulkarni > > > wrote: > > > > > > > > On Thu, 21 Jul 2022 at

Re: [GCC13][Patch][PR106457]improve array_at_struct_end_p for array objects (PR106457)

2022-08-11 Thread Qing Zhao via Gcc-patches
> On Aug 11, 2022, at 3:40 AM, Richard Biener wrote: > > On Wed, 10 Aug 2022, Qing Zhao wrote: > >> Hi, >> >> As mentioned in the bug report, I reopened this bug since the previous patch: >> >> commit r13-1875-gff26f0ba68fe6e870f315d0601b596f889b89680 >> Author: Richard Biener >> Date: Th

[PATCH] arm: unified syntax for libgcc clear_cache

2022-08-11 Thread Seija Kijin via Gcc-patches
The patch to convert all thumb1 code in libgcc to unified syntax omitted changing all swi instructions to the current name: svc. This patch fixes this case. --- libgcc/config/arm/lib1funcs.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgcc/config/arm/lib1funcs.S b/libgc

Re: [PATCH] rs6000: Enable generate const through pli+pli+rldimi

2022-08-11 Thread Segher Boessenkool
Hi! On Thu, Aug 11, 2022 at 08:52:49PM +0800, Jiufu Guo wrote: > Segher Boessenkool writes: > > On Wed, Aug 10, 2022 at 03:11:23PM +0800, Jiufu Guo wrote: > >> @@ -9659,7 +9659,7 @@ (define_split > >> ;; When non-easy constants can go in the TOC, this should use > >> ;; easy_fp_constant predica

Re: [PATCH] Tame path_range_query::compute_imports

2022-08-11 Thread Andrew MacLeod via Gcc-patches
On 8/11/22 07:42, Richard Biener wrote: This avoids going BBs outside of the path when adding def chains to the set of imports. It also syncs the code with range_def_chain::get_def_chain to not miss out on some imports this function would identify. Bootstrap / regtest pending on x86_64-unknow

Re: [PATCH] analyzer: fix ICE casued by dup2 in sm-fd.cc[PR106551]

2022-08-11 Thread David Malcolm via Gcc-patches
On Thu, 2022-08-11 at 14:41 +0530, Immad Mir wrote: > This patch fixes the ICE caused by valid_to_unchecked_state, > at analyzer/sm-fd.cc by handling the m_start state in > check_for_dup. > > Tested lightly on x86_64. > > gcc/analyzer/ChangeLog: > PR analyzer/106551 > * sm-fd.cc (

Re: [PATCH] Tame path_range_query::compute_imports

2022-08-11 Thread Aldy Hernandez via Gcc-patches
On Thu, Aug 11, 2022 at 3:59 PM Andrew MacLeod wrote: > > > On 8/11/22 07:42, Richard Biener wrote: > > This avoids going BBs outside of the path when adding def chains > > to the set of imports. It also syncs the code with > > range_def_chain::get_def_chain to not miss out on some imports > > th

Re: [PATCH][AArch64] Implement ACLE Data Intrinsics

2022-08-11 Thread Andre Vieira (lists) via Gcc-patches
OK to backport this to gcc-12? Applies cleanly and did a bootstrat and regression test on aarch64-linux-gnu Regards, Andre On 01/07/2022 12:26, Richard Sandiford wrote: "Andre Vieira (lists)" writes: On 29/06/2022 08:18, Richard Sandiford wrote: + break; +case AARCH64_RBIT: +ca

RE: [PATCH][AArch64] Implement ACLE Data Intrinsics

2022-08-11 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Andre Vieira (lists) > Sent: Thursday, August 11, 2022 4:11 PM > To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov ; > Richard Sandiford ; Richard Biener > > Subject: Re: [PATCH][AArch64] Implement ACLE Data Intrinsics > > OK to backport this to gcc-12? Applies c

[PATCH 1/2 v2] analyzer: consider that realloc could shrink the buffer [PR106539]

2022-08-11 Thread Tim Lange
This patch adds the "shrinks buffer" case to the success_with_move modelling of realloc. Regression-tested on Linux x86-64, further ran the analyzer tests with the -m32 option. 2022-08-11 Tim Lange gcc/analyzer/ChangeLog: PR analyzer/106539 * region-model-impl-calls.cc (regio

[PATCH 2/2 v2] analyzer: out-of-bounds checker [PR106000]

2022-08-11 Thread Tim Lange
This patch adds an experimental out-of-bounds checker to the analyzer. The checker was tested on coreutils, curl, httpd and openssh. It is mostly accurate but does produce false-positives on yacc-generated files and sometimes when the analyzer misses an invariant. These cases will be documented in

Re: [PATCH v3] Modify combine pattern by a pseudo AND with its nonzero bits [PR93453]

2022-08-11 Thread Segher Boessenkool
Hi! On Thu, Aug 11, 2022 at 10:11:45AM +0800, HAO CHEN GUI wrote: > On 11/8/2022 上午 1:38, Segher Boessenkool wrote: > > On Fri, Jul 22, 2022 at 03:07:55PM +0800, HAO CHEN GUI wrote: > >> This patch creates a new function - change_pseudo_and_mask. If recog > >> fails, > >> the function converts

Re: [PATCH] tree-optimization/106514 - revisit m_import compute in backward threading

2022-08-11 Thread Andrew MacLeod via Gcc-patches
On 8/10/22 06:46, Richard Biener wrote: I see the solver itself adds relations from edges on the path so the cruical item here seems to be to add imports for the path entry conditional, but those would likely be GORI imports for that block? Unfortunately that fails to add t[012], the GORI exp

Re: [PATCH 1/2 v2] analyzer: consider that realloc could shrink the buffer [PR106539]

2022-08-11 Thread David Malcolm via Gcc-patches
On Thu, 2022-08-11 at 19:24 +0200, Tim Lange wrote: > This patch adds the "shrinks buffer" case to the success_with_move > modelling of realloc. Thanks for the updated patch. > > Regression-tested on Linux x86-64, further ran the analyzer tests > with > the -m32 option. [...snip...] > --- /dev

Re: [PATCH 2/2 v2] analyzer: out-of-bounds checker [PR106000]

2022-08-11 Thread David Malcolm via Gcc-patches
On Thu, 2022-08-11 at 19:24 +0200, Tim Lange wrote: > This patch adds an experimental out-of-bounds checker to the > analyzer. > > The checker was tested on coreutils, curl, httpd and openssh. It is > mostly > accurate but does produce false-positives on yacc-generated files and > sometimes when t

Re: [PATCH 0/5] IEEE 128-bit built-in overload support.

2022-08-11 Thread Michael Meissner via Gcc-patches
On Wed, Aug 10, 2022 at 12:03:16PM -0500, Segher Boessenkool wrote: > On Wed, Aug 10, 2022 at 02:23:27AM -0400, Michael Meissner wrote: > > On Fri, Aug 05, 2022 at 01:19:05PM -0500, Segher Boessenkool wrote: > > > On Thu, Jul 28, 2022 at 12:43:49AM -0400, Michael Meissner wrote: > > > > These patch

Re: [PATCH 0/5] IEEE 128-bit built-in overload support.

2022-08-11 Thread Joseph Myers
On Thu, 11 Aug 2022, Michael Meissner via Gcc-patches wrote: > In looking at it, I now believe that the type for _Float128 and __float128 > should always be the same within the compiler. Whether we would continue to > use the same type for long double and _Float128/__float128 remains to be seen.

Re: [PATCH v2] c++: Tweak for -Wpessimizing-move in templates [PR89780]

2022-08-11 Thread Jason Merrill via Gcc-patches
On 8/8/22 12:51, Marek Polacek wrote: On Sat, Aug 06, 2022 at 04:02:13PM -0700, Jason Merrill wrote: On 8/4/22 11:46, Marek Polacek wrote: In my previous patches I've been extending our std::move warnings, but this tweak actually dials it down a little bit. As reported in bug 89780, it's quest

Re: [PATCH v2] c++: Extend -Wpessimizing-move for class prvalues [PR106276]

2022-08-11 Thread Jason Merrill via Gcc-patches
On 8/8/22 12:27, Marek Polacek wrote: On Sat, Aug 06, 2022 at 04:07:54PM -0700, Jason Merrill wrote: On 8/6/22 15:49, Jason Merrill wrote: On 7/27/22 17:14, Marek Polacek wrote: We already have a warning that warns about pessimizing std::move in a return statement, when it prevents the NRVO:

Re: [PATCH v2] c-family: Honor -Wno-init-self for cv-qual vars [PR102633]

2022-08-11 Thread Jason Merrill via Gcc-patches
On 8/8/22 12:06, Marek Polacek wrote: On Sat, Aug 06, 2022 at 03:29:05PM -0700, Jason Merrill wrote: On 7/26/22 14:31, Marek Polacek wrote: On Tue, Jul 26, 2022 at 04:24:18PM -0400, Jason Merrill wrote: On 7/26/22 15:03, Marek Polacek wrote: Since r11-5188-g32934a4f45a721, we drop qualifiers

Re: [PATCH 1/1 v2] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics.

2022-08-11 Thread Tom Honermann via Gcc-patches
If there are no further concerns, could a C++ or libcpp maintainer please commit this for me? Thank you! Tom. On 8/4/22 12:42 PM, Tom Honermann via Gcc-patches wrote: Are there any further concerns with this patch? If not, I extend my gratitude to anyone so kind as to commit this for me as I

Re: [PATCH 1/1 v2] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics.

2022-08-11 Thread Jason Merrill via Gcc-patches
Sorry for the delay, I'm travelling with limited internet. I will commit it early next week if no one beats me to it. On Thu, Aug 11, 2022, 2:45 PM Tom Honermann via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > If there are no further concerns, could a C++ or libcpp maintainer > please commit

[COMMITTED] [AARCH64] Remove reference to MD_INCLUDES

2022-08-11 Thread apinski--- via Gcc-patches
From: Andrew Pinski The comment reference to MD_INCLUDES is not needed as it is auto generated for long time now even before aarch64 target was added. MD_INCLUDES has been auto generated since r0-64489. Note some targets still manually set MD_INCLUDES and I suspect those can be changed but I don

[PATCH] c/c++: new warning: -Wxor-used-as-pow [PR90885]

2022-08-11 Thread David Malcolm via Gcc-patches
PR c/90885 notes various places in real-world code where people have written C/C++ code that uses ^ (exclusive or) where presumbably they meant exponentiation. For example https://codesearch.isocpp.org/cgi-bin/cgi_ppsearch?q=2%5E32&search=Search currently finds 11 places using "2^32", and all of

[PATCH] rs6000: avoid ineffective replacement of splitters

2022-08-11 Thread Jiufu Guo via Gcc-patches
Hi, As a comment in https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599556.html Those splitters call rs6000_emit_set_const directly, and the replacements are never used. Using (pc) would be less misleading. This patch pass bootstrap®test on ppc64 BE and LE. Is this ok for trunk. BR, Jeff

Re: [GCC13][Patch][PR106457]improve array_at_struct_end_p for array objects (PR106457)

2022-08-11 Thread Richard Biener via Gcc-patches
On Thu, 11 Aug 2022, Qing Zhao wrote: > > > > On Aug 11, 2022, at 3:40 AM, Richard Biener wrote: > > > > On Wed, 10 Aug 2022, Qing Zhao wrote: > > > >> Hi, > >> > >> As mentioned in the bug report, I reopened this bug since the previous > >> patch: > >> > >> commit r13-1875-gff26f0ba68fe6e