Re: [PATCH 3/3] RISC-V:Cache Management Operation instructions testcases

2022-03-17 Thread Kito Cheng via Gcc-patches
I would suggest rename those __builtin_riscv_* to __builtin_riscv_cmo_*, that's less confusing, __builtin_riscv_zero just seems like it will return a zero value. On Fri, Mar 4, 2022 at 10:52 AM wrote: > > From: yulong-plct > > This commit adds testcases about CMO instructions. > 7 > 8 gcc/t

Re: [PATCH] RISC-V: Implement ZTSO extension.

2022-03-17 Thread Kito Cheng via Gcc-patches
Hi Shi-Hua: Thanks, this patch is LGTM, but I would defer that until stage 1, because the binutils part isn't merget yet. On Tue, Mar 15, 2022 at 5:10 PM wrote: > > From: LiaoShihua > > ZTSO is the extension of tatol store order model. > This extension adds no new instructions to th

[r12-7693 Regression] FAIL: gcc.target/i386/pr90356.c scan-assembler pxor on Linux/x86_64

2022-03-17 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, c482c28ba4c549006deb70dead90fe8ab34dcbcf is the first bad commit commit c482c28ba4c549006deb70dead90fe8ab34dcbcf Author: Roger Sayle Date: Thu Mar 17 21:56:32 2022 + PR 90356: Use xor to load const_double 0.0 on SSE (always) caused FAIL: gcc.target/i386/pr86722.c sca

[PATCH] x86: Correct march=sapphirerapids to base on icelake server

2022-03-17 Thread Cui,Lili via Gcc-patches
Hi Hongtao, This patch is to correct march=sapphirerapids to base on icelake server. and update sapphirerapids in the documentation. OK for master and backport to GCC 11? gcc/Changelog: PR target/104963 * config/i386/i386.h (PTA_SAPPHIRERAPIDS): change it to base on ICX.

Re: [PATCH] Ignore (possible) signed zeros in operands of FP comparisons.

2022-03-17 Thread Andrew MacLeod via Gcc-patches
On 3/17/22 19:27, Jeff Law via Gcc-patches wrote: On 3/15/2022 2:03 AM, Roger Sayle wrote: Speaking of tree-ssa passes that could be improved, I was wondering whether you could review my EVRP patch to fix regression PR/102950. Pretty please? https://gcc.gnu.org/pipermail/gcc-patches/2022-

Re: [PATCH] Ignore (possible) signed zeros in operands of FP comparisons.

2022-03-17 Thread Jeff Law via Gcc-patches
On 3/15/2022 2:03 AM, Roger Sayle wrote: -Original Message- From: Richard Biener Sent: 15 March 2022 07:29 To: Roger Sayle Cc: GCC Patches Subject: Re: [PATCH] Ignore (possible) signed zeros in operands of FP comparisons. On Mon, Mar 14, 2022 at 8:26 PM Roger Sayle wrote: I've be

[committed] analyzer: fixes to -fdump-analyzer-state-purge

2022-03-17 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r12-7695-g79e210f0c8e1fa gcc/analyzer/ChangeLog: * state-purge.cc (state_purge_annotator::add_node_annotations): Avoid duplicate before-supernode annotations when returning from an interproced

[committed] analyzer: fix program_point::get_next for PK_BEFORE_STMT

2022-03-17 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r12-7694-g2b3404357a1f99. gcc/analyzer/ChangeLog: * program-point.cc (program_point::get_next): Fix missing increment of index. Signed-off-by: David Malcolm --- gcc/analyzer/program-point.cc | 2 +-

Re: [PATCHv2, rs6000] Add V1TI into vector comparison expand [PR103316]

2022-03-17 Thread will schmidt via Gcc-patches
On Thu, 2022-03-17 at 13:35 +0800, HAO CHEN GUI via Gcc-patches wrote: > Hi, >This patch adds V1TI mode into a new mode iterator used in vector > comparison expands.With the patch, both built-ins and direct > comparison > could generate P10 new V1TI comparison instructions. Hi, -/* We de

Re: [PATCH] libstdc++: Reduce header dependencies from PSTL headers [PR92546]

2022-03-17 Thread Thomas Rodgers via Gcc-patches
Looks ok to me. I just am curious, does the change to src/c++17/fs_path.cc need to be part of this change (It's not obvious to me that it is related to the other changes in the patch). On Thu, Mar 17, 2022 at 12:01 PM Jonathan Wakely wrote: > Tested x86_64-linux. Tom, any objection? > > -- >8 --

Re: [PATCH] PR tree-optimization/102943 - Always use dominators in the cache when available.

2022-03-17 Thread Richard Biener via Gcc-patches
> Am 17.03.2022 um 18:35 schrieb Andrew MacLeod : > > As discussed in the PR, this patch adjusts rangers cache query to *always* > use dominators to lookup ranges in the cache. > > It use to give up if it encountered a block with outgoing edge ranges. This > patch changes that to continue l

Re: [x86_64 PATCH] PR 90356: Use xor to load const_double 0.0 on SSE (always)

2022-03-17 Thread Uros Bizjak via Gcc-patches
On Thu, Mar 17, 2022 at 8:50 PM Uros Bizjak wrote: > > On Thu, Mar 17, 2022 at 8:41 PM Roger Sayle > wrote: > > > > > > Implementations of the x87 floating point instruction set have always > > had some pretty strange characteristics. For example on the original > > Intel Pentium the FLDPI inst

Re: [x86_64 PATCH] PR 90356: Use xor to load const_double 0.0 on SSE (always)

2022-03-17 Thread Uros Bizjak via Gcc-patches
On Thu, Mar 17, 2022 at 8:41 PM Roger Sayle wrote: > > > Implementations of the x87 floating point instruction set have always > had some pretty strange characteristics. For example on the original > Intel Pentium the FLDPI instruction (to load 3.14159... into a register) > took 5 cycles, and the

[x86_64 PATCH] PR 90356: Use xor to load const_double 0.0 on SSE (always)

2022-03-17 Thread Roger Sayle
Implementations of the x87 floating point instruction set have always had some pretty strange characteristics. For example on the original Intel Pentium the FLDPI instruction (to load 3.14159... into a register) took 5 cycles, and the FLDZ instruction (to load 0.0) took 2 cycles, when a regular F

[PATCH] libstdc++: Reduce header dependencies from PSTL headers [PR92546]

2022-03-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Tom, any objection? -- >8 -- This avoids including the whole of in , as the header only actually needs std::pair. This also avoids including in , which only needs , std::bad_alloc, and std::terminate (which can be repalced with std::__terminate). This matters less, becaus

Re: [PATCH v2] middle-end/104854: Limit strncmp overread warnings

2022-03-17 Thread Martin Sebor via Gcc-patches
On 3/17/22 12:02, Siddhesh Poyarekar wrote: On 17/03/2022 23:21, Martin Sebor wrote: On 3/17/22 11:22, Siddhesh Poyarekar wrote: On 17/03/2022 22:16, Jeff Law wrote:     #include     char a[] = "abc";     char b[] = "abcd";     int f (void)     {   return strncmp (a, b, 8);     }     w

[r12-7687 Regression] FAIL: gcc.target/i386/bt-5.c scan-assembler-times bt[lq][ \t] 7 on Linux/x86_64

2022-03-17 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 3a7ba8fd0cda387809e4902328af2473662b6a4a is the first bad commit commit 3a7ba8fd0cda387809e4902328af2473662b6a4a Author: Richard Biener Date: Thu Mar 17 08:10:59 2022 +0100 tree-optimization/104960 - unsplit edges after late sinking caused FAIL: gcc.target/i386/bt-5.c sc

Re: [PATCH v2] middle-end/104854: Limit strncmp overread warnings

2022-03-17 Thread Siddhesh Poyarekar
On 17/03/2022 23:21, Martin Sebor wrote: On 3/17/22 11:22, Siddhesh Poyarekar wrote: On 17/03/2022 22:16, Jeff Law wrote:     #include     char a[] = "abc";     char b[] = "abcd";     int f (void)     {   return strncmp (a, b, 8);     }     where I get     t.c:7:10: warning: ‘strncmp’

[committed] libstdc++: Avoid including in [PR92546]

2022-03-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, x86_64-mingw, pushed to trunk. -- >8 -- This only affects Windows, but reduces the preprocessed size of significantly. libstdc++-v3/ChangeLog: PR libstdc++/92546 * include/bits/fs_path.h (path::make_preferred): Use handwritten loop instead of std::r

[committed] libstdc++: Rewrite __moneypunct_cache::_M_cache [PR104966]

2022-03-17 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- GCC thinks the following can lead to a buffer overflow when __ns.size() equals zero: const basic_string<_CharT>& __ns = __mp.negative_sign(); _M_negative_sign_size = __ns.size(); __negative_sign = new _CharT[_M_neg

Re: [PATCH v2] middle-end/104854: Limit strncmp overread warnings

2022-03-17 Thread Martin Sebor via Gcc-patches
On 3/17/22 11:22, Siddhesh Poyarekar wrote: On 17/03/2022 22:16, Jeff Law wrote:     #include     char a[] = "abc";     char b[] = "abcd";     int f (void)     {   return strncmp (a, b, 8);     }     where I get     t.c:7:10: warning: ‘strncmp’ specified bound 8 exceeds source size 5   

Re: Patch ping (Re: [PATCH] libatomic: Improve 16-byte atomics on Intel AVX [PR104688])

2022-03-17 Thread Uros Bizjak via Gcc-patches
On Wed, Mar 16, 2022 at 6:50 PM Jakub Jelinek wrote: > > Hi! > > I'd like to ping this patch: > https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590960.html > > Thanks. > > On Mon, Feb 28, 2022 at 07:06:30AM +0100, Jakub Jelinek wrote: > > As mentioned in the PR, the latest Intel SDM has ad

[PATCH] PR tree-optimization/102943 - Always use dominators in the cache when available.

2022-03-17 Thread Andrew MacLeod via Gcc-patches
As discussed in the PR, this patch adjusts rangers cache query to *always* use dominators to lookup ranges in the cache. It use to give up if it encountered a block with outgoing edge ranges. This patch changes that to continue looking back until a value is found, then applies any outgoing ran

Re: [PATCH v2] middle-end/104854: Limit strncmp overread warnings

2022-03-17 Thread Siddhesh Poyarekar
On 17/03/2022 22:16, Jeff Law wrote: #include char a[] = "abc"; char b[] = "abcd"; int f (void) {   return strncmp (a, b, 8); } where I get t.c:7:10: warning: ‘strncmp’ specified bound 8 exceeds source size 5 [-Wstringop-overread]     7 |   return

Re: [PATCH v2] middle-end/104854: Limit strncmp overread warnings

2022-03-17 Thread Andreas Schwab
On Mär 17 2022, Jeff Law via Gcc-patches wrote: > On Thu, Mar 17, 2022 at 9:32 AM Marek Polacek via Gcc-patches < > gcc-patches@gcc.gnu.org> wrote: >> I think I agree, I've tried >> >> #include >> char a[] = "abc"; >> char b[] = "abcd"; >> >> int f (void) >> { >> return strncmp (a, b, 8); >> }

Re: [PATCH v2] middle-end/104854: Limit strncmp overread warnings

2022-03-17 Thread Jeff Law via Gcc-patches
On Thu, Mar 17, 2022 at 9:32 AM Marek Polacek via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > On Wed, Mar 16, 2022 at 06:54:51AM +0530, Siddhesh Poyarekar wrote: > > On 16/03/2022 02:06, Martin Sebor wrote: > > > The intended use of the strncmp bound is to limit the comparison to > > > at most

[PATCH] openmp: Fix up gomp_affinity_init_numa_domains

2022-03-17 Thread Jakub Jelinek via Gcc-patches
Hi! On Thu, Nov 11, 2021 at 02:14:05PM +0100, Thomas Schwinge wrote: > There appears to be yet another issue: there still are quite a number of > 'FAIL: libgomp.c/places-10.c execution test' reports on > . Also in my testing testing, on a system > where '/sys/devices/system/node/online' contains

Re: [PATCH v2] middle-end/104854: Limit strncmp overread warnings

2022-03-17 Thread Marek Polacek via Gcc-patches
On Wed, Mar 16, 2022 at 06:54:51AM +0530, Siddhesh Poyarekar wrote: > On 16/03/2022 02:06, Martin Sebor wrote: > > The intended use of the strncmp bound is to limit the comparison to > > at most the size of the arrays or (in a subset of cases) the length > > of an initial substring. Providing an ar

Re: [PATCH] c++: memory corruption during name lookup w/ modules [PR99479]

2022-03-17 Thread Patrick Palka via Gcc-patches
On Tue, Mar 1, 2022 at 8:13 AM Patrick Palka wrote: > > On Thu, Feb 17, 2022 at 3:24 PM Patrick Palka wrote: > > > > name_lookup::search_unqualified uses a statically allocated vector > > in order to avoid repeated reallocation, under the assumption that > > the function can't be called recursive

[PING^2][PATCH][final] Handle compiler-generated asm insn

2022-03-17 Thread Tom de Vries via Gcc-patches
On 3/9/22 13:50, Tom de Vries wrote: On 2/22/22 14:55, Tom de Vries wrote: Hi, For the nvptx port, with -mptx-comment we have in pr53465.s: ... // #APP // 9 "gcc/testsuite/gcc.c-torture/execute/pr53465.c" 1 // Start: Added by -minit-regs=3: // #NO_APP

Re: [PATCH v2] x86: Also check _SOFT_FLOAT in

2022-03-17 Thread H.J. Lu via Gcc-patches
On Mon, Mar 14, 2022 at 7:31 AM H.J. Lu wrote: > > Push target("general-regs-only") in if x87 is enabled. > > gcc/ > > PR target/104890 > * config/i386/x86gprintrin.h: Also check _SOFT_FLOAT before > pushing target("general-regs-only"). > > gcc/testsuite/ > > PR ta

Re: [PATCH v2] middle-end/104854: Limit strncmp overread warnings

2022-03-17 Thread Aldy Hernandez via Gcc-patches
I agree with Siddhesh (and Jonathan). Is there a release manager that can either review his patch, or provide feedback as to what the course of action should be here? Thanks. Aldy On Thu, Mar 17, 2022 at 2:44 AM Siddhesh Poyarekar wrote: > > On 17/03/2022 05:11, Martin Sebor wrote: > > As the G

Re: [PATCH v2] middle-end/104854: Limit strncmp overread warnings

2022-03-17 Thread David Malcolm via Gcc-patches
On Tue, 2022-03-15 at 22:10 +0530, Siddhesh Poyarekar wrote: > On 15/03/2022 21:09, Martin Sebor wrote: > > The strncmp function takes arrays as arguments (not necessarily > > strings).  The main purpose of the -Wstringop-overread warning > > for calls to it is to detect calls where one of the arra

[committed] libstdc++: Fix comment in testsuite utility

2022-03-17 Thread Jonathan Wakely via Gcc-patches
Pushed as obvious. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/util/testsuite_character.h: Fix comment. --- libstdc++-v3/testsuite/util/testsuite_character.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/testsuite/util/testsuite_character.h b/li

[PATCH RFC] Fix ICE due to shared BLOCK node in coroutine generation [PR103328]

2022-03-17 Thread Benno Evers via Gcc-patches
The coroutine transformation moves the original function body into a newly created actor function, but the block of the `current_binding_level` still points into the original function, causing the block to be shared between the two functions if it is subsequently used. This may cause havoc later on

[PATCH] [GIMPLE FE] allow to unit test loop passes

2022-03-17 Thread Richard Biener via Gcc-patches
The following arranges for the GIMPLE frontend to parse an additional loops(...) specification, currently consisting of 'normal' and 'lcssa'. The intent is to allow unit testing of passes inside the GIMPLE loop optimization pipeline where we keep the IL in loop-closed SSA and have SCEV initialized

[PATCH]rs6000: optimize li+rldicr+cmpd==>rotldi+cmpldi for 16bits

2022-03-17 Thread Jiufu Guo via Gcc-patches
When checking eq/neq with a constant which has only 16bits, then it can be optimized to check the rotated data. By this, the constant building is optimized. As the example in PR103743: For "in == 0x8000LL", this patch generates: rotldi %r3,%r3,16 cmpldi %cr0,%r3,32768

Re: [PATCH v2] middle-end/104854: Limit strncmp overread warnings

2022-03-17 Thread Jonathan Wakely via Gcc-patches
On 15/03/22 14:36 -0600, Martin Sebor wrote: On 3/15/22 10:40, Siddhesh Poyarekar wrote: On 15/03/2022 21:09, Martin Sebor wrote: The strncmp function takes arrays as arguments (not necessarily strings).? The main purpose of the -Wstringop-overread warning for calls to it is to detect calls whe

Re: [PATCH v2] x86: Also check _SOFT_FLOAT in

2022-03-17 Thread Marc Poulhiès via Gcc-patches
"H.J. Lu" writes: Hello, > I am checking it in. Are you planning on also applying this patch in the gcc-11 branch? Thanks, Marc

[PATCH] testsuite: fixup pr97521.c and pr96713.c on i686-*

2022-03-17 Thread Marc Poulhiès via Gcc-patches
On targets that do not have MXX/SSE enabled by default, pr97521 and pr96713 fail because they emit warnings: pr97521.c:12:1: warning: MMX vector return without MMX enabled changes the ABI [-Wpsabi] pr97521.c:11:1: note: the ABI for passing parameters with 16-byte al

Re: [PATCH] gcc-12: Re-enable split-stack support for GNU/Hurd.

2022-03-17 Thread Svante Signell via Gcc-patches
ping On Wed, 2022-02-23 at 11:13 +0100, Svante Signell wrote: > Hello, > > In line of porting the latest build of libgo/go with gcc-12 to GNU/Hurd, > support > of split-stack was found to be removed. > > After patching the files in libgo the build of gotools fails: > go1: error: '-fsplit-stack'

Re: [PATCH] doc: Document Solaris D bootstrap requirements [PR 103528]

2022-03-17 Thread Rainer Orth
Hi Iain, >> I suspected that the 32-bit issue might be due to several stdint types >> being wrong, which was just fixed on master. At least the issue seemed >> similar to PR d/104738. I'm building a 64-bit trunk gdc as we speak in >> order to try that as a bootstrap compiler for a 32-bit build.

[PATCH] tree-optimization/104960 - unsplit edges after late sinking

2022-03-17 Thread Richard Biener via Gcc-patches
Something went wrong when testing the earlier patch to move the late sinking to before the late phiopt for PR102008. The following makes sure to unsplit edges after the late sinking since the split edges confuse the following phiopt leading to missed optimizations. I've went for a new pass parame

Enhance further testcases to verify Openacc 'kernels' decomposition

2022-03-17 Thread Thomas Schwinge
Hi! Pushed to master branch commit c43cb355f25dd22133d15819bd6ec03d3d3939fd "Enhance further testcases to verify Openacc 'kernels' decomposition", see attached. Kwok, this ought to resolve some testsuite noise from your upcoming og12 branch. Please let me know if there are any more such issues.

Enhance further testcases to verify handling of OpenACC privatization level [PR90115]

2022-03-17 Thread Thomas Schwinge
Hi! On 2021-05-21T21:29:19+0200, I wrote: > I've pushed "[OpenACC privatization] Largely extend diagnostics and > corresponding testsuite coverage [PR90115]" to master branch in commit > 11b8286a83289f5b54e813f14ff56d730c3f3185 Pushed to master branch commit 004fc4f2fc686d3366c9e1a2d8b91837960738

Re: [PATCH] gimplify: Emit clobbers for TARGET_EXPR_SLOT vars later [PR103984]

2022-03-17 Thread Richard Biener via Gcc-patches
On Wed, 16 Mar 2022, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, we emit a bogus uninitialized warning but > easily could emit wrong-code for it or similar testcases too. > The bug is that we emit clobber for a TARGET_EXPR_SLOT too early: > D.2499.e = B::qux (&h); [return slo

Re: [PATCH] [i386] Add extra cost for unsigned_load which may have stall forward issue.

2022-03-17 Thread Hongtao Liu via Gcc-patches
On Wed, Mar 16, 2022 at 5:54 PM Richard Biener via Gcc-patches wrote: > > On Wed, Mar 16, 2022 at 3:19 AM liuhongt wrote: > > > > This patch only handle pure-slp for by-value passed parameter which > > has nothing to do with IPA but psABI. For by-reference passed > > parameter IPA is required. >