Re: [PATCH 1/2] vect: Add costing_for_scalar parameter to init_cost hook

2021-05-13 Thread Kewen.Lin via Gcc-patches
Hi! >>> But in the end the vector code shouldn't end up worse than the >>> scalar code with respect to IVs - the cases where it would should >>> be already costed. So I wonder if you have specific examples >>> where things go worse enough for the heuristic to trigger? >>> >> >> One typical case t

[PATCH][OBVIOUS] testsuite: prune new LTO warning

2021-05-13 Thread Martin Liška
Pushed as obvious. Martin libgomp/ChangeLog: PR testsuite/100569 * testsuite/libgomp.c/omp-nested-3.c: Prune new LTO warning. * testsuite/libgomp.c/pr46032-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c: Likewise. * t

Re: [PATCH] tsan: fix false positive for pthread_cond_clockwait

2021-05-13 Thread Martin Liška
On 5/7/21 7:07 PM, Michael de Lang via Gcc-patches wrote: pthread_cond_clockwait isn't added to TSAN_INTERCEPTORS which leads to false positives regarding double locking of a mutex. This was uncovered by a user reporting an issue to the google sanitizer github: https://github.com/google/sanitizer

Re: [PATCH][OBVIOUS] testsuite: prune new LTO warning

2021-05-13 Thread Eric Botcazou
> gcc/testsuite/ChangeLog: > > PR testsuite/100569 > * gcc.dg/atomic/c11-atomic-exec-2.c: Prune new LTO warning. > * gcc.dg/torture/pr94947-1.c: Likewise. Another one: PR testsuite/100569 * gnat.dg/lto21.adb: Prune new LTO warning. -- Eric Botcazoudiff --git a

[PATCH] Port gnat-style to Sphinx.

2021-05-13 Thread Martin Liška
Hello. Right now, 2/3 of Ada manuals are both in .texi and .rst. I would like to port a small gnat-style manual based on [1]. Ready for master? Thanks, Martin [1] https://github.com/davidmalcolm/texi2rst gcc/ada/ChangeLog: * doc/Makefile: Add gnat-style target. * doc/share/con

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2021-05-13 Thread Martin Liška
@David: PING On 11/3/20 11:13 PM, Antoni Boucher via Gcc-patches wrote: I was missing a check in gcc_jit_struct_get_field, I added it in this new patch. On Thu, Oct 15, 2020 at 05:52:33PM -0400, David Malcolm wrote: On Thu, 2020-10-15 at 13:39 -0400, Antoni Boucher wrote: Thanks. I updated th

Re: [PATCH] libgccjit: Handle truncation and extension for casts [PR 95498]

2021-05-13 Thread Martin Liška
@David: PING On 2/20/21 11:17 PM, Antoni Boucher via Gcc-patches wrote: Hi. Thanks for your feedback! See answers below: On Sat, Feb 20, 2021 at 11:20:35AM -0700, Tom Tromey wrote: "Antoni" == Antoni Boucher via Gcc-patches writes: Antoni> gcc/jit/ Antoni> PR target/95498 Antoni> *

Re: [PATCH 3/3] Use startswith in targets.

2021-05-13 Thread Martin Liška
May I please ping this? Martin On 3/19/21 10:21 AM, Martin Liska wrote: gcc/ChangeLog: * common/config/aarch64/aarch64-common.c (aarch64_parse_extension): Use startswith function instead of strncmp. * common/config/bfin/bfin-common.c (bfin_handle_option): Likewise.

[PATCH] Remove unused variable.

2021-05-13 Thread Martin Liška
Addresses the following clang warning: gcc/tree-ssa-dom.c:652:33: warning: private field 'm_simplifier' is not used [-Wunused-private-field] Ready for master? Thanks gcc/ChangeLog: * tree-ssa-dom.c: Remove m_simplifier. --- gcc/tree-ssa-dom.c | 1 - 1 file changed, 1 deletion(-) diff

[i386] Fix ICE [PR target/100549]

2021-05-13 Thread Hongtao Liu via Gcc-patches
Hi: When arg0 is same as arg1 in __builtin_ia32_pcmpgtw, gimple_build (&stmts, GT_EXPR, cmp_type, arg0, arg1) will simplify the comparison to vector constant 0, no stmts is generated, which causes ICE in gsi_insert_before (gsi, stmts, GSI_SAME_STMT). So don't insert stmts when it's NULL. Boots

[PATCH] i386: Fix up V2SFmode vcond* with -mxop [PR100581]

2021-05-13 Thread Uros Bizjak via Gcc-patches
ix86_expand_sse_movcc has special TARGET_XOP handling and the recent addition of support of v*cond* patterns for V2SFmode results in ICEs because the expected pattern doesn't exist. We can handle it using 128-bit vpcmov (if we ignore the upper 64 bits like we ignore in other TARGET_MMX_WITH_SSE su

[PATCH] [i386] Fix _mm256_zeroupper to notify LRA that vzeroupper will kill sse registers. [PR target/82735]

2021-05-13 Thread Hongtao Liu via Gcc-patches
Hi: When __builtin_ia32_vzeroupper is called explicitly, the corresponding vzeroupper pattern does not carry any CLOBBERS or SETs before LRA, which leads to incorrect optimization in pass_reload. In order to solve this problem, this patch introduces a pre_reload splitter which adds CLOBBERS to vz

Re: [PATCH] [i386] Fix _mm256_zeroupper to notify LRA that vzeroupper will kill sse registers. [PR target/82735]

2021-05-13 Thread Uros Bizjak via Gcc-patches
On Thu, May 13, 2021 at 11:18 AM Hongtao Liu wrote: > > Hi: > When __builtin_ia32_vzeroupper is called explicitly, the corresponding > vzeroupper pattern does not carry any CLOBBERS or SETs before LRA, > which leads to incorrect optimization in pass_reload. > In order to solve this problem, this

Re: [PATCH] [i386] Fix _mm256_zeroupper to notify LRA that vzeroupper will kill sse registers. [PR target/82735]

2021-05-13 Thread Uros Bizjak via Gcc-patches
On Thu, May 13, 2021 at 11:40 AM Uros Bizjak wrote: > > On Thu, May 13, 2021 at 11:18 AM Hongtao Liu wrote: > > > > Hi: > > When __builtin_ia32_vzeroupper is called explicitly, the corresponding > > vzeroupper pattern does not carry any CLOBBERS or SETs before LRA, > > which leads to incorrect

Re: [PATCH] [i386] Fix _mm256_zeroupper to notify LRA that vzeroupper will kill sse registers. [PR target/82735]

2021-05-13 Thread Jakub Jelinek via Gcc-patches
On Thu, May 13, 2021 at 11:43:19AM +0200, Uros Bizjak wrote: > > > Bootstrapped and regtested on X86_64-linux-gnu{-m32,} > > > Ok for trunk? > > > > Some time ago a support for CLOBBER_HIGH RTX was added (and later > > removed for some reason). Perhaps we could resurrect the patch for the > > p

Re: [PATCH] testsuite/arm: Improve unsigned-float.c

2021-05-13 Thread Richard Earnshaw via Gcc-patches
On 22/04/2021 14:32, Christophe Lyon via Gcc-patches wrote: The test requires an FPU, so use -march=armv7-a+fp -mfpu=auto instead of -march=armv7-a. We also remove dg-require-effective-target arm_fp_ok, but keep dg-add-options arm_fp: this enables the test to pass on arm-eabi configured with

Re: RFC: Sphinx for GCC documentation

2021-05-13 Thread Martin Liška
On 4/7/21 7:40 PM, Joseph Myers wrote: On Wed, 7 Apr 2021, Michael Matz wrote: Random snippet for what I mean: the .texi contains: "The @code{access} attribute specifies that a function to whose by-reference arguments the attribute applies accesses the referenced object according to @var{acces

[committed] arm: correctly handle inequality comparisons against max constants [PR100563]

2021-05-13 Thread Richard Earnshaw via Gcc-patches
Normally we expect the gimple optimizers to fold away comparisons that are always true, but at some lower optimization levels this is not always the case, so the back-end has to be able to generate correct code in these cases. In this example, we have a comparison of the form (unsigned long lo

Re: [PATCH] rs6000: Fix wrong code generation for vec_sel [PR94613]

2021-05-13 Thread Segher Boessenkool
Hi! On Fri, Apr 30, 2021 at 01:32:58AM -0500, Xionghu Luo wrote: > The vsel instruction is a bit-wise select instruction. Using an > IF_THEN_ELSE to express it in RTL is wrong and leads to wrong code > being generated in the combine pass. Per element selection is a > subset of per bit-wise selec

Re: [PATCH] [i386] Fix _mm256_zeroupper to notify LRA that vzeroupper will kill sse registers. [PR target/82735]

2021-05-13 Thread Richard Sandiford via Gcc-patches
Jakub Jelinek writes: > On Thu, May 13, 2021 at 11:43:19AM +0200, Uros Bizjak wrote: >> > > Bootstrapped and regtested on X86_64-linux-gnu{-m32,} >> > > Ok for trunk? >> > >> > Some time ago a support for CLOBBER_HIGH RTX was added (and later >> > removed for some reason). Perhaps we could res

Re: [PATCH] [i386] Fix _mm256_zeroupper to notify LRA that vzeroupper will kill sse registers. [PR target/82735]

2021-05-13 Thread Jakub Jelinek via Gcc-patches
On Thu, May 13, 2021 at 12:32:26PM +0100, Richard Sandiford wrote: > Jakub Jelinek writes: > > On Thu, May 13, 2021 at 11:43:19AM +0200, Uros Bizjak wrote: > >> > > Bootstrapped and regtested on X86_64-linux-gnu{-m32,} > >> > > Ok for trunk? > >> > > >> > Some time ago a support for CLOBBER_HI

Re: RFC: Sphinx for GCC documentation

2021-05-13 Thread Martin Liška
On 4/1/21 3:30 PM, Martin Liška wrote: That said, I'm asking the GCC community for a green light before I invest more time on it? Hello. So far, I've received just a small feedback about the transition. In most cases positive. May I understand it as green light for the transition? Thanks, M

[PATCH] LTO: merge -flto=foo both from IL and linker cmdline

2021-05-13 Thread Martin Liška
Hello. In g:3835aa0eb90292d652dd6b200f302f3cac7e643f, I changed logic that the output -flto=foo argument is taken from IL file command lines. However, it should be also merged with linker command line. One can use -flto for compilation and -flto=16 for linking. Ready after it finishes tests? T

Re: [PATCH] [i386] Fix _mm256_zeroupper to notify LRA that vzeroupper will kill sse registers. [PR target/82735]

2021-05-13 Thread Richard Sandiford via Gcc-patches
Jakub Jelinek writes: > On Thu, May 13, 2021 at 12:32:26PM +0100, Richard Sandiford wrote: >> Jakub Jelinek writes: >> > On Thu, May 13, 2021 at 11:43:19AM +0200, Uros Bizjak wrote: >> >> > > Bootstrapped and regtested on X86_64-linux-gnu{-m32,} >> >> > > Ok for trunk? >> >> > >> >> > Some ti

[PATCH] attributes: target_clone expects a string argument

2021-05-13 Thread Martin Liška
Hello. The change is about error handling. Ready to be installed? Thanks, Martin PR middle-end/100504 gcc/c-family/ChangeLog: * c-attribs.c (handle_target_clones_attribute): Expect a string argument to target_clone argument. gcc/testsuite/ChangeLog: * gcc.tar

[PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-13 Thread Martin Jambor
Hi, When SRA transforms an assignment where the RHS is an aggregate decl that it creates replacements for, the (least efficient) fallback method of dealing with them is to store all the replacements back into the original decl and then let the original assignment takes its course. That of course

[PATCH][pushed] mklog: Put detected PR entries before ChangeLogs

2021-05-13 Thread Martin Liška
contrib/ChangeLog: * mklog.py: Put PR entries before all ChangeLog entries (will be added to all ChangeLog locations by Daily bump script). * test_mklog.py: Test the new behavior. --- contrib/mklog.py | 10 -- contrib/test_mklog.py | 7 +-- 2 files chang

[PATCH] Warn for excessive argument alignment in main

2021-05-13 Thread H.J. Lu via Gcc-patches
Warn for excessive argument alignment in main instead of ICE. gcc/ PR c/100575 * cfgexpand.c (expand_stack_alignment): Add a bool argument for expanding main. Warn for excessive argument alignment in main. (pass_expand::execute): Pass true to expand_stack_alignmen

Re: [PATCH] Remove unused variable.

2021-05-13 Thread Jeff Law via Gcc-patches
On 5/13/2021 3:06 AM, Martin Liška wrote: Addresses the following clang warning: gcc/tree-ssa-dom.c:652:33: warning: private field 'm_simplifier' is not used [-Wunused-private-field] Ready for master? Thanks gcc/ChangeLog: * tree-ssa-dom.c: Remove m_simplifier. I wonder if Aldy's ref

[committed] testsuite: suppress cast warnings in pr100563.c [PR100563]

2021-05-13 Thread Richard Earnshaw via Gcc-patches
Fix a warning when building on machines that don't have 32-bit pointers gcc/testsuite: PR target/100563 * gcc.dg/pr100563.c (dg-options): Add -wno-pointer-to-int-cast. --- gcc/testsuite/gcc.dg/pr100563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tes

Re: [GCC-11 backport][PATCH] arm: Remove duplicate definitions from arm_mve.h (pr100419).

2021-05-13 Thread Richard Earnshaw via Gcc-patches
On 12/05/2021 10:56, Srinath Parvathaneni via Gcc-patches wrote: Hi, This is a backport to GCC-11 branch, this patch got applied cleanly on the branch. This patch removes several duplicated intrinsic definitions from arm_mve.h mentioned in PR100419 and also fixes the wrong arguments in few

Re: [GCC-10 backport][PATCH] arm: Remove duplicate definitions from arm_mve.h (pr100419).

2021-05-13 Thread Richard Earnshaw via Gcc-patches
On 12/05/2021 10:56, Srinath Parvathaneni via Gcc-patches wrote: Hi, This is a backport to GCC-10 branch, this patch got applied cleanly on the branch. This patch removes several duplicated intrinsic definitions from arm_mve.h mentioned in PR100419 and also fixes the wrong arguments in few

Re: [PATCH] attributes: target_clone expects a string argument

2021-05-13 Thread Martin Sebor via Gcc-patches
On 5/13/21 6:05 AM, Martin Liška wrote: Hello. The change is about error handling. Ready to be installed? Thanks, Martin PR middle-end/100504 gcc/c-family/ChangeLog: * c-attribs.c (handle_target_clones_attribute): Expect a string argument to target_clone argument. gcc/testsui

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-13 Thread Jeff Law via Gcc-patches
On 5/13/2021 6:23 AM, Martin Jambor wrote: Hi, When SRA transforms an assignment where the RHS is an aggregate decl that it creates replacements for, the (least efficient) fallback method of dealing with them is to store all the replacements back into the original decl and then let the origina

Re: [PATCH] attributes: target_clone expects a string argument

2021-05-13 Thread Jeff Law via Gcc-patches
On 5/13/2021 6:05 AM, Martin Liška wrote: Hello. The change is about error handling. Ready to be installed? Thanks, Martin PR middle-end/100504 gcc/c-family/ChangeLog: * c-attribs.c (handle_target_clones_attribute): Expect a string argument to target_clone argument. gcc/testsu

[committed] openmp: Add testcases to verify OpenMP 5.0 2.14 and OpenMP 5.1 2.17 rules [PR99928]

2021-05-13 Thread Jakub Jelinek via Gcc-patches
Hi! In preparation of PR99928 patch review, I've prepared testcases with clauses that need more interesting handling on combined/composite constructs, in particular firstprivate, lastprivate, firstprivate+lastprivate, linear (explicit on non-iv, explicit on simd iv, implicit on simd iv, implicit o

Re: [PATCH] config: delete unused sim macros

2021-05-13 Thread Jeff Law via Gcc-patches
On 5/11/2021 10:28 PM, Mike Frysinger via Gcc-patches wrote: Nothing in gcc or binutils or gdb or anything anywhere uses these. config/ * acinclude.m4 (CYG_AC_PATH_SIM, CYG_AC_PATH_DEVO): Delete. "DEVO", yea, that's old.  I had a slight concern CYG might refer to Cygwin rather than

Re: [PATCH] regcprop: Fix another cprop_hardreg bug [PR100342]

2021-05-13 Thread Jakub Jelinek via Gcc-patches
On Tue, May 11, 2021 at 11:59:24AM +0100, Richard Sandiford via Gcc-patches wrote: > > I wrote the following patch (originally against 10 branch because that is > > where Uros has been debugging it) and bootstrapped/regtested it on 11 > > branch successfully. > > It effectively implements your (2)

Re: [PATCH] libsanitizer: merge from master

2021-05-13 Thread H.J. Lu via Gcc-patches
On Thu, May 13, 2021 at 09:28:01AM +0200, Martin Liška wrote: > I'm planning to do merge from master twice a year. > This merge was tested on x86_64-linux-gnu and ppc64le-linux-gnu > and survives regression tests. > > Pushed to master. > Thanks, > Martin > > Merged revision: f58e0513dd95944b81ce7

Re: [PATCH] Warn for excessive argument alignment in main

2021-05-13 Thread Bernd Edlinger
On 5/13/21 3:37 PM, H.J. Lu via Gcc-patches wrote: > Warn for excessive argument alignment in main instead of ICE. > > gcc/ > > PR c/100575 > * cfgexpand.c (expand_stack_alignment): Add a bool argument for > expanding main. Warn for excessive argument alignment in main. >

Re: [PATCH] regcprop: Fix another cprop_hardreg bug [PR100342]

2021-05-13 Thread Jakub Jelinek via Gcc-patches
On Thu, May 13, 2021 at 05:37:36PM +0200, Jakub Jelinek wrote: > So, do you want something like (I've deleted the old comment as I think > the new one is enough, but am open to keep both) the patch below, where > it REG_CAN_CHANGE_MODE_P is false, we punt (return), otherwise call > set_value_regno?

Re: [PATCH] tsan: fix false positive for pthread_cond_clockwait

2021-05-13 Thread Michael de Lang via Gcc-patches
Thanks for updating LLVM to upstream. I've added the rebased patch below. Met vriendelijke groet, Michael de Lang gcc/ChangeLog * g++.dg/tsan/pthread_cond_clockwait.C: new testcase diff --git a/gcc/testsuite/g++.dg/tsan/pthread_cond_clockwait.C b/gcc/testsuite/g++.dg/tsan/pthread_cond_clockwai

Re: [PATCH] avoid using an incompletely populated struct (PR 100574)

2021-05-13 Thread Bernd Edlinger
On 5/13/21 3:55 AM, Martin Sebor via Gcc-patches wrote: > A logic bug in the handling of PHI arguments in compute_objsize > that are all null pointers lets an incompletely populated struct > be used in a way that triggers an assertion causing an ICE. > > The attached patch corrects that by having

[committed] libphobos: Fix static asserts on NetBSD, FreeBSD, DragonflyBSD

2021-05-13 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a number of static asserts that were failing on NetBSD, and the same would have been the case for FreeBSD and DragonFlyBSD as well. The function declarations were updated to use `const scope', but the static asserts were not. Bootstrapped and regression tested on x86_64-linu

Re: [PATCH] libsanitizer: merge from master

2021-05-13 Thread Martin Liška
On 5/13/21 5:54 PM, H.J. Lu wrote: On Thu, May 13, 2021 at 09:28:01AM +0200, Martin Liška wrote: I'm planning to do merge from master twice a year. This merge was tested on x86_64-linux-gnu and ppc64le-linux-gnu and survives regression tests. Pushed to master. Thanks, Martin Merged revision: f

Re: [PATCH] attributes: target_clone expects a string argument

2021-05-13 Thread Martin Liška
On 5/13/21 5:12 PM, Martin Sebor wrote: Since errors are higher priority than warnings I'd suggest making this the first check, before the warnings above, (and adding a test to verify that that's how it works). Good idea. I've just pushed such change. Martin

Re: [PATCH] avoid using an incompletely populated struct (PR 100574)

2021-05-13 Thread Martin Sebor via Gcc-patches
On 5/13/21 11:20 AM, Bernd Edlinger wrote: On 5/13/21 3:55 AM, Martin Sebor via Gcc-patches wrote: A logic bug in the handling of PHI arguments in compute_objsize that are all null pointers lets an incompletely populated struct be used in a way that triggers an assertion causing an ICE. The att

Re: [PUSHED] Skip out on processing __builtin_clz when varying.

2021-05-13 Thread Aldy Hernandez via Gcc-patches
On 5/12/21 5:08 PM, Jakub Jelinek wrote: On Wed, May 12, 2021 at 05:01:00PM -0400, Aldy Hernandez via Gcc-patches wrote: PR c/100521 * gimple-range.cc (range_of_builtin_call): Skip out on processing __builtin_clz when varying. --- gcc/gimple-range.cc |

Re: [PUSHED] Skip out on processing __builtin_clz when varying.

2021-05-13 Thread Aldy Hernandez via Gcc-patches
On 5/12/21 5:08 PM, Jakub Jelinek wrote: On Wed, May 12, 2021 at 05:01:00PM -0400, Aldy Hernandez via Gcc-patches wrote: PR c/100521 * gimple-range.cc (range_of_builtin_call): Skip out on processing __builtin_clz when varying. --- gcc/gimple-range.cc |

Re: [PATCH] avoid using an incompletely populated struct (PR 100574)

2021-05-13 Thread Jeff Law via Gcc-patches
On 5/12/2021 7:55 PM, Martin Sebor via Gcc-patches wrote: A logic bug in the handling of PHI arguments in compute_objsize that are all null pointers lets an incompletely populated struct be used in a way that triggers an assertion causing an ICE. The attached patch corrects that by having comp

Re: [PATCH] IBM Z: Avoid bash-specific substitution in configure

2021-05-13 Thread Jeff Law via Gcc-patches
On 5/12/2021 9:12 AM, Marius Hillenbrand via Gcc-patches wrote: Tested configure runs on NetBSD x86-64, Linux on x86-64 (with target s390x), and on s390x. Is the patch ok for master, and for gcc-11? 8<--8<--8<- Fix a bootstrap error observed on NetBSD. 2021-05-12 Marius Hil

Re: [PATCH] avoid a couple of missing -Wuninitialized (PR 98583, 93100)

2021-05-13 Thread Jeff Law via Gcc-patches
On 5/11/2021 1:49 PM, Martin Sebor via Gcc-patches wrote: The attached change teaches the uninitialized pass about __builtin_stack_restore and __builtin___asan_mark to avoid two classes of -Wuninitialized false negatives. Richard, you already approved the __builtin_stack_restore change in the

Re: [PATCH] Fix awk substr invocation in libgo buildsystem

2021-05-13 Thread Jeff Law via Gcc-patches
On 5/10/2021 3:32 AM, Christoph Höger wrote: The awk script used a zero-based index which worked on surprisingly many plattforms. According to the man page, however, the function expects one-based indexing. For reference see this bug in the go git repository: https://github.com/golang/go/issu

Re: [PATCH RFA] tree-iterator: C++11 range-for and tree_stmt_iterator

2021-05-13 Thread Jason Merrill via Gcc-patches
Ping. On 5/1/21 12:29 PM, Jason Merrill wrote: Like my recent patch to add ovl_range and lkp_range in the C++ front end, this patch adds the tsi_range adaptor for using C++11 range-based 'for' with a STATEMENT_LIST, e.g. for (tree stmt : tsi_range (stmt_list)) { ... } This also involves add

Re: [PATCH RFA (diagnostic)] c++: -Wdeprecated-copy and #pragma diagnostic [PR94492]

2021-05-13 Thread Jason Merrill via Gcc-patches
Ping. On 4/28/21 9:32 AM, Jason Merrill wrote: -Wdeprecated-copy was depending only on the state of the warning at the point where we call the function, making it hard to use #pragma diagnostic to suppress the warning for a particular implicitly declared function. But checking whether the war

Re: [PATCH] Remove unused variable.

2021-05-13 Thread Aldy Hernandez via Gcc-patches
On Thu, May 13, 2021 at 9:43 AM Jeff Law via Gcc-patches wrote: > > > On 5/13/2021 3:06 AM, Martin Liška wrote: > > Addresses the following clang warning: > > gcc/tree-ssa-dom.c:652:33: warning: private field 'm_simplifier' is > > not used [-Wunused-private-field] > > > > Ready for master? > > Tha

Re: [PATCH] libsanitizer: merge from master

2021-05-13 Thread H.J. Lu via Gcc-patches
On Thu, May 13, 2021 at 10:27 AM Martin Liška wrote: > > On 5/13/21 5:54 PM, H.J. Lu wrote: > > On Thu, May 13, 2021 at 09:28:01AM +0200, Martin Liška wrote: > >> I'm planning to do merge from master twice a year. > >> This merge was tested on x86_64-linux-gnu and ppc64le-linux-gnu > >> and surviv

Re: [PATCH] libsanitizer: merge from master

2021-05-13 Thread H.J. Lu via Gcc-patches
On Thu, May 13, 2021 at 1:01 PM H.J. Lu wrote: > > On Thu, May 13, 2021 at 10:27 AM Martin Liška wrote: > > > > On 5/13/21 5:54 PM, H.J. Lu wrote: > > > On Thu, May 13, 2021 at 09:28:01AM +0200, Martin Liška wrote: > > >> I'm planning to do merge from master twice a year. > > >> This merge was te

[committed] libgcc: pru: Place mpyll into its own section

2021-05-13 Thread Dimitar Dimitrov
Pushed as obvious. This should help LD's --gc-sections feature to reduce final ELF size. libgcc/ChangeLog: * config/pru/mpyll.S (__pruabi_mpyll): Place into own section. Signed-off-by: Dimitar Dimitrov --- libgcc/config/pru/mpyll.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH] Bail in bounds_of_var_in_loop if scev returns NULL.

2021-05-13 Thread Aldy Hernandez via Gcc-patches
Both initial_condition_in_loop_num and evolution_part_in_loop_num can return NULL. This patch exits if either one is NULL. Presumably this didn't happen before, because adjust_range_with_scev was called far less frequently than in ranger, which can call it for every PHI. OK pending tests? gcc/C

[pushed] libsanitizer, Darwin : Handle missing __builtin_os_log_format.

2021-05-13 Thread Iain Sandoe
Hi, The update to libsanitizer broke bootstrap on Darwin, since the upstream sources assume building with clang on Darwin and make use of a header depending on a builtin that GCC does not currently implement. This patch fixes the build. Whether to implement the missing builtin is something to co

[COMMIT] wwwdocs: Document devel/omp/gcc-11

2021-05-13 Thread Kwok Cheung Yeung
Hello I have pushed the devel/omp/gcc-11 branch to the git repo as the development branch for new OpenMP, OpenACC and offloading functionality, based on the GCC 11 branch. I have committed this patch to update the git doc page to point to the new branch as the active OMP develepment branch,

Re: [GOVERNANCE] Where to file complaints re project-maintainers?

2021-05-13 Thread abebeos via Gcc-patches
On Sat, 8 May 2021 at 18:49, abebeos wrote: > (failed to join gcc, so posting here) > > Is there any private email where one can file complaints re > project-maintainers (or "those who are supervising the maintainers") ? > > Is there any information about the process for such complaints? > > Rela

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2021-05-13 Thread David Malcolm via Gcc-patches
On Tue, 2020-11-03 at 17:13 -0500, Antoni Boucher wrote: > I was missing a check in gcc_jit_struct_get_field, I added it in this > new patch. > Sorry about the long delay in reviewing this patch. The main high-level points are: - currently the get_*_count functions return "ssize_t" - why? Only

[wwwdocs, patch] gcc-12/changes.html: Document -mptx for nvptx

2021-05-13 Thread Tobias Burnus
Document this new flag, added in https://gcc.gnu.org/g:2a1586401a21dcd43e0f904bb6eec26c8b2f366b + https://gcc.gnu.org/onlinedocs/gcc/Nvidia-PTX-Options.html#index-mptx Any wording suggestions? Tobias PS: Some background remarks: (PTX ISA 3.1 is supported since NVidia's CUDA 5 while 6.3 is supp

Re: [PATCH v2] c++: Check attributes on friend declarations [PR99032]

2021-05-13 Thread Marek Polacek via Gcc-patches
On Wed, May 12, 2021 at 08:27:18PM -0400, Jason Merrill wrote: > On 5/12/21 8:03 PM, Marek Polacek wrote: > > diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c > > index 89f874a32cc..2bcefb619aa 100644 > > --- a/gcc/cp/decl2.c > > +++ b/gcc/cp/decl2.c > > @@ -1331,6 +1331,20 @@ any_dependent_type_attrib

[PATCH] c++: Prune dead functions.

2021-05-13 Thread Marek Polacek via Gcc-patches
[ Repost from GCC 11 stage 3. Rebased onto current trunk. ] I was looking at the LCOV coverage report for the C++ FE and found a bunch of unused functions that I think we can remove. Obviously, I left alone various dump_* and debug_* routines. I haven't removed cp_build_function_call although it

Re: [PATCH] libgccjit: Handle truncation and extension for casts [PR 95498]

2021-05-13 Thread David Malcolm via Gcc-patches
On Sat, 2021-02-20 at 17:17 -0500, Antoni Boucher via Gcc-patches wrote: > Hi. > Thanks for your feedback! > Sorry about the delay in responding. In the past I was hesitant about adding more cast support to libgccjit since I felt that the user could always just create a union to do the cast. Th

Re: [PATCH] avoid a couple of missing -Wuninitialized (PR 98583, 93100)

2021-05-13 Thread Martin Sebor via Gcc-patches
On 5/13/21 1:03 PM, Jeff Law wrote: On 5/11/2021 1:49 PM, Martin Sebor via Gcc-patches wrote: The attached change teaches the uninitialized pass about __builtin_stack_restore and __builtin___asan_mark to avoid two classes of -Wuninitialized false negatives. Richard, you already approved the __

Re: [PATCH] avoid using an incompletely populated struct (PR 100574)

2021-05-13 Thread Martin Sebor via Gcc-patches
On 5/13/21 11:36 AM, Martin Sebor wrote: On 5/13/21 11:20 AM, Bernd Edlinger wrote: On 5/13/21 3:55 AM, Martin Sebor via Gcc-patches wrote: A logic bug in the handling of PHI arguments in compute_objsize that are all null pointers lets an incompletely populated struct be used in a way that trig

Re: [PATCH RFA] tree-iterator: C++11 range-for and tree_stmt_iterator

2021-05-13 Thread Martin Sebor via Gcc-patches
On 5/13/21 1:26 PM, Jason Merrill via Gcc-patches wrote: Ping. On 5/1/21 12:29 PM, Jason Merrill wrote: Like my recent patch to add ovl_range and lkp_range in the C++ front end, this patch adds the tsi_range adaptor for using C++11 range-based 'for' with a STATEMENT_LIST, e.g.    for (tree s

Re: [PATCH] libgccjit: Handle truncation and extension for casts [PR 95498]

2021-05-13 Thread Antoni Boucher via Gcc-patches
Thanks for your answer. See my answers below: Le jeudi 13 mai 2021 à 18:13 -0400, David Malcolm a écrit : > On Sat, 2021-02-20 at 17:17 -0500, Antoni Boucher via Gcc-patches > wrote: > > Hi. > > Thanks for your feedback! > > > > Sorry about the delay in responding. > > In the past I was hesita

[PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-13 Thread Thomas Rodgers
From: Thomas Rodgers libstdc++/ChangeLog: * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): loop until value change observed. (__waiter_base::_M_a): Renamed member from _M_addr, changed type to uintptr_t. (__waiter_base::_S_wait_addr): Change return ty

Re: [PATCH RFA (diagnostic)] c++: -Wdeprecated-copy and #pragma diagnostic [PR94492]

2021-05-13 Thread Martin Sebor via Gcc-patches
On 5/13/21 1:28 PM, Jason Merrill via Gcc-patches wrote: Ping. On 4/28/21 9:32 AM, Jason Merrill wrote:   -Wdeprecated-copy was depending only on the state of the warning at the point where we call the function, making it hard to use #pragma diagnostic to suppress the warning for a particular

Re: [PATCH] libgccjit: Handle truncation and extension for casts [PR 95498]

2021-05-13 Thread David Malcolm via Gcc-patches
On Thu, 2021-05-13 at 19:31 -0400, Antoni Boucher wrote: > Thanks for your answer. > > See my answers below: > > Le jeudi 13 mai 2021 à 18:13 -0400, David Malcolm a écrit : > > On Sat, 2021-02-20 at 17:17 -0500, Antoni Boucher via Gcc-patches > > wrote: > > > Hi. > > > Thanks for your feedback! >

Re: [PATCH v2] c++: Check attributes on friend declarations [PR99032]

2021-05-13 Thread Jason Merrill via Gcc-patches
On 5/13/21 6:08 PM, Marek Polacek wrote: On Wed, May 12, 2021 at 08:27:18PM -0400, Jason Merrill wrote: On 5/12/21 8:03 PM, Marek Polacek wrote: diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 89f874a32cc..2bcefb619aa 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1331,6 +1331,20 @@ an

Re: [PATCH RFA (diagnostic)] c++: -Wdeprecated-copy and #pragma diagnostic [PR94492]

2021-05-13 Thread Jason Merrill via Gcc-patches
On 5/13/21 7:38 PM, Martin Sebor wrote: On 5/13/21 1:28 PM, Jason Merrill via Gcc-patches wrote: Ping. On 4/28/21 9:32 AM, Jason Merrill wrote:   -Wdeprecated-copy was depending only on the state of the warning at the point where we call the function, making it hard to use #pragma diagnostic

[PATCH] libsanitizer: cherry-pick from upstream

2021-05-13 Thread H.J. Lu via Gcc-patches
On Thu, May 13, 2021 at 1:11 PM H.J. Lu wrote: > > On Thu, May 13, 2021 at 1:01 PM H.J. Lu wrote: > > > > On Thu, May 13, 2021 at 10:27 AM Martin Liška wrote: > > > > > > On 5/13/21 5:54 PM, H.J. Lu wrote: > > > > On Thu, May 13, 2021 at 09:28:01AM +0200, Martin Liška wrote: > > > >> I'm plannin

Re: [PATCH RFA] tree-iterator: C++11 range-for and tree_stmt_iterator

2021-05-13 Thread Jason Merrill via Gcc-patches
On 5/13/21 7:21 PM, Martin Sebor wrote: On 5/13/21 1:26 PM, Jason Merrill via Gcc-patches wrote: Ping. On 5/1/21 12:29 PM, Jason Merrill wrote: Like my recent patch to add ovl_range and lkp_range in the C++ front end, this patch adds the tsi_range adaptor for using C++11 range-based 'for' wit

[PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-13 Thread Thomas Rodgers
From: Thomas Rodgers Please ignore the previous patch. This one removes the need to carry any extra state in the case of a 'laundered' atomic wait. libstdc++/ChangeLog: * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): loop until value change observed. (__waiter_base

Re: [PATCH] libgccjit: add some reflection functions in the jit C api

2021-05-13 Thread Antoni Boucher via Gcc-patches
Thanks for your reviews. I attached the new patch to this email. See answers below: Le jeudi 13 mai 2021 à 17:30 -0400, David Malcolm a écrit : > On Tue, 2020-11-03 at 17:13 -0500, Antoni Boucher wrote: > > I was missing a check in gcc_jit_struct_get_field, I added it in > > this > > new patch.

Re: [PATCH] [i386] Fix _mm256_zeroupper to notify LRA that vzeroupper will kill sse registers. [PR target/82735]

2021-05-13 Thread Hongtao Liu via Gcc-patches
On Thu, May 13, 2021 at 7:52 PM Richard Sandiford wrote: > > Jakub Jelinek writes: > > On Thu, May 13, 2021 at 12:32:26PM +0100, Richard Sandiford wrote: > >> Jakub Jelinek writes: > >> > On Thu, May 13, 2021 at 11:43:19AM +0200, Uros Bizjak wrote: > >> >> > > Bootstrapped and regtested on X86

[PATCH] go/100537 - Bootstrap-O3 and bootstrap-debug fail

2021-05-13 Thread Jiufu Guo via Gcc-patches
As discussed in the PR, Richard mentioned the method to figure out which VAR was not set TREE_ADDRESSABLE, and then cause this failure. It is address_expression which build addr_expr (build_fold_addr_expr_loc), but not set TREE_ADDRESSABLE. I drafted this patch with reference the comments from Ri

[PATCHv2 0/4] ROP support

2021-05-13 Thread Bill Schmidt via Gcc-patches
This is version 2 of the ROP support patch, addressing comments by Will Schmidt and Segher Boessenkool. I've attempted to implement all of your excellent suggestions; otherwise the series is unchanged. I decided to repost the whole series rather than just the patches needing further approval, sinc

[PATCH 1/4] rs6000: Add -mrop-protect and -mprivileged flags

2021-05-13 Thread Bill Schmidt via Gcc-patches
2021-05-13 Bill Schmidt gcc/ * config/rs6000/rs6000.c (rs6000_option_override_internal): Disable shrink wrap when inserting ROP-protect instructions. * config/rs6000/rs6000.opt (mrop-protect): New option. (mprivileged): Likewise. * doc/invoke.texi: Docume

[PATCH 2/4] rs6000: Emit ROP-mitigation instructions in prologue and epilogue

2021-05-13 Thread Bill Schmidt via Gcc-patches
2021-05-13 Bill Schmidt gcc/ * config/rs6000/rs6000-internal.h (rs6000_stack): Add rop_hash_save_offset and rop_hash_size. * config/rs6000/rs6000-logue.c (rs6000_stack_info): Compute rop_hash_size and rop_hash_save_offset. (debug_stack_info): Dump rop_has

[PATCH 3/4] rs6000: Conditionally define __ROP_PROTECT__

2021-05-13 Thread Bill Schmidt via Gcc-patches
2021-05-13 Bill Schmidt gcc/ * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define __ROP_PROTECT__ if -mrop-protect is selected. --- gcc/config/rs6000/rs6000-c.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/r

[PATCH 4/4] rs6000: Add ROP tests

2021-05-13 Thread Bill Schmidt via Gcc-patches
2021-05-13 Bill Schmidt gcc/testsuite/ * gcc.target/powerpc/rop-1.c: New. * gcc.target/powerpc/rop-2.c: New. * gcc.target/powerpc/rop-3.c: New. * gcc.target/powerpc/rop-4.c: New. * gcc.target/powerpc/rop-5.c: New. --- gcc/testsuite/gcc.target/powerpc/rop

Re: [PR66791][ARM] Replace __builtin_neon_vtst*

2021-05-13 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 12 May 2021 at 20:33, Richard Earnshaw wrote: > > On 12/05/2021 12:05, Prathamesh Kulkarni via Gcc-patches wrote: > > On Wed, 12 May 2021 at 16:02, Richard Earnshaw > > wrote: > >> > >> > >> > >> On 12/05/2021 08:46, Prathamesh Kulkarni via Gcc-patches wrote: > >>> On Mon, 10 May 2021 at

Re: [PATCH] avoid using an incompletely populated struct (PR 100574)

2021-05-13 Thread Bernd Edlinger
On 5/14/21 12:35 AM, Martin Sebor wrote: > On 5/13/21 11:36 AM, Martin Sebor wrote: >> On 5/13/21 11:20 AM, Bernd Edlinger wrote: >>> On 5/13/21 3:55 AM, Martin Sebor via Gcc-patches wrote: A logic bug in the handling of PHI arguments in compute_objsize that are all null pointers lets an

[PATCH, LIBPHOBOS] Cleanup temp files in libphobos unittest at src/std/process.d

2021-05-13 Thread Bernd Edlinger
Hi, I've noticed that a couple temp files are leaked after each full gcc test-suite run. I'd like to fix that by the following patch. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. From 6ad9e8552646e6ff54981cf7102ffcb311b6860f Mon Sep 17 00:00:00 2001 Fr

Re: [PATCH] rs6000: Fix wrong code generation for vec_sel [PR94613]

2021-05-13 Thread Xionghu Luo via Gcc-patches
Hi, On 2021/5/13 18:49, Segher Boessenkool wrote: Hi! On Fri, Apr 30, 2021 at 01:32:58AM -0500, Xionghu Luo wrote: The vsel instruction is a bit-wise select instruction. Using an IF_THEN_ELSE to express it in RTL is wrong and leads to wrong code being generated in the combine pass. Per eleme