[committed][testsuite] Add missing require-effective-target alloca

2020-09-23 Thread Tom de Vries
Hi, Add missing require-effect-target alloca directives. Tested on nvptx. Committed to trunk. Thanks, - Tom [testsuite] Add missing require-effective-target alloca gcc/testsuite/ChangeLog: * gcc.dg/Warray-bounds-63.c: Add require-effective-target alloca. * gcc.dg/Warray-bound

[committed][nvptx] Handle move from DF subreg to DF reg in nvptx_output_mov_insn

2020-09-23 Thread Tom de Vries
Hi, When compiling test-case gcc.dg/atomic/c11-atomic-exec-1.c, we run into these ptxas errors: ... line 100; error: Rounding modifier required for instruction 'cvt' line 105; error: Rounding modifier required for instruction 'cvt' ... The problem is that this move: ... //(insn 13 11 14 2 //

Re: [PATCH][omp, ftracer] Don't duplicate blocks in SIMT region

2020-09-23 Thread Richard Biener
On Tue, 22 Sep 2020, Tom de Vries wrote: > [ was: Re: [Patch] [middle-end & nvptx] gcc/tracer.c: Don't split BB > with SIMT LANE [PR95654] ] > > On 9/16/20 8:20 PM, Alexander Monakov wrote: > > > > > > On Wed, 16 Sep 2020, Tom de Vries wrote: > > > >> [ cc-ing author omp support for nvptx. ] >

Re: [PATCH] vect: Fix epilogue loop handling of partial vectors

2020-09-23 Thread Richard Biener via Gcc-patches
On Tue, Sep 22, 2020 at 4:34 PM Richard Sandiford wrote: > > Richard Sandiford writes: > > I'll try to have a patch ready tomorrow morning European time. > > Well, I totally failed to hit that deadline. When testing on Power, > I saw a couple of extra failures, but I now think they're improvemen

[PATCH] middle-end/97162 - fix ICE when building gamess

2020-09-23 Thread Richard Biener
This appropriately guards the check for a hard register in compare_base_decls which otherwise ICEs when passed a CONST_DECL. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-09-23 Richard Biener PR middle-end/97162 * alias.c (compare_base_decls): Use DECL_HARD

[PATCH] tree-optimization/97151 - improve PTA for C++ operator delete

2020-09-23 Thread Richard Biener
C++ operator delete, when DECL_IS_REPLACEABLE_OPERATOR_DELETE_P, does not cause the deleted object to be escaped. It also has no other interesting side-effects for PTA so skip it like we do for BUILT_IN_FREE. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. Richard. 2020-09-23 Rich

Re: [PING 2][PATCH 2/5] C front end support to detect out-of-bounds accesses to array parameters

2020-09-23 Thread Szabolcs Nagy
The 09/21/2020 12:45, Martin Sebor via Gcc-patches wrote: > On 9/21/20 12:20 PM, Vaseeharan Vinayagamoorthy wrote: > > After this patch, I am seeing this -Warray-parameter error: > > > > In file included from ../include/pthread.h:1, > > from ../sysdeps/nptl/thread_db.h:25, > >

Re: Issue with ggc_delete and finalizers (was Re: New modref/ipa_modref optimization passes)

2020-09-23 Thread Jan Hubicka
> > Summarizing what's going on: > > We have a use-after-ggc_delete happening with the finalizers code. > > analyze_function has: > > summaries = new (ggc_alloc ()) >modref_summaries (symtab); > > ggc_alloc (as opposed to ggc_alloc_no_dtor) uses need_finalization_p > a

Cleanup handling of local/readonly memory in modref and ipa-pure-const

2020-09-23 Thread Jan Hubicka
Hi, this is first of cleanup patches for mod-ref interfaces. It removes code duplication between ipa-pure-const and ipa-modref that both wants to check whether given memory access can interfere with memory acesses before function call or after function return. I pulled the logic out to refs_local

[Patch, committed] gcc/analyzer: Silence -Wpragma warns with GCC < 10

2020-09-23 Thread Tobias Burnus
Do what most other code does (I think ada/* does not): Only set this pragma with GCC >= 10. This silences here 228 warnings of the kind: analyzer.h:305:32: warning: unknown option after '#pragma GCC diagnostic' kind [-Wpragmas] Tobias - Mentor Graphics (Deutschland) GmbH, Arn

Re: Cleanup handling of local/readonly memory in modref and ipa-pure-const

2020-09-23 Thread Richard Biener via Gcc-patches
On Wed, Sep 23, 2020 at 10:44 AM Jan Hubicka wrote: > > Hi, > this is first of cleanup patches for mod-ref interfaces. It removes code > duplication between ipa-pure-const and ipa-modref that both wants to check > whether given memory access can interfere with memory acesses before function > cal

Re: [Patch, committed] gcc/analyzer: Silence -Wpragma warns with GCC < 10

2020-09-23 Thread Tobias Burnus
Now with attached commit log/patch. On 9/23/20 11:12 AM, Tobias Burnus wrote: Do what most other code does (I think ada/* does not): Only set this pragma with GCC >= 10. This silences here 228 warnings of the kind: analyzer.h:305:32: warning: unknown option after '#pragma GCC diagnostic' kind

[PATCH] AArch64: Implement vstrq_p128 intrinsic

2020-09-23 Thread Kyrylo Tkachov
Hi all, This patch implements the missing vstrq_p128 intrinsic. It just performs a store of the poly128_t argument to a memory location. Bootstrapped and tested on aarch64-none-linux-gnu. Committing to trunk and to the active branches later. Thanks, Kyrill 2020-09-21 Kyrylo Tkachov

[PATCH] AArch64: Implement vldrq_p128 intrinsic

2020-09-23 Thread Kyrylo Tkachov
Hi all, This patch implements the missing vldrq_p128 intrinsic that just loads from the appropriate pointer. Bootstrapped and tested on aarch64-none-linux-gnu. Committing to trunk and to the active branches later. Thanks, Kyrill 2020-09-23 Kyrylo Tkachov PR target/71233 *

Re: Cleanup handling of local/readonly memory in modref and ipa-pure-const

2020-09-23 Thread Jan Hubicka
> > +/* Return true if T is a pointer pointing to memory location that is local > > + for the function (that means, dead after return) or read-only. */ > > + > > +bool > > +points_to_local_or_readonly_memory_p (tree t) > > +{ > > + /*if (!POINTER_TYPE_P (TREE_TYPE (t))) > > +return false; *

[PATCH] AArch64: Implement missing _p64 intrinsics for vector permutes

2020-09-23 Thread Kyrylo Tkachov
Hi all, This patch implements some missing vector permute intrinsics operating on poly64x2_t types. They are implemented identically to their uint64x2_t brethren. Bootstrapped and tested on aarch64-none-linux-gnu. Committing to trunk and later the active branches. gcc/ 2020-09-23 Kyrylo Tkach

Re: [PATCH] switch lowering: limit number of cluster attemps

2020-09-23 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 22, 2020 at 02:19:12PM +0200, Richard Biener via Gcc-patches wrote: > On September 22, 2020 1:22:12 PM GMT+02:00, "Martin Liška" > wrote: > >Hi. > > > >The patch is about a bail out limit that needs to be added to switch > >lowering. > >Currently the algorithm is quadratic and needs s

[PATCH] tree-optimization/97173 - extend assert in vectorizable_live_operation

2020-09-23 Thread Richard Biener
The condition we're expecting to eventually run into isn't fully captured by checking for CTORs, instead we can also run into the CTOR element conversion. Bootstrapped / tested on x86_64-unknown-linux-gnu, pushed. 2020-09-23 Richard Biener PR tree-optimization/97173 * tree-vec

Re: Cleanup handling of local/readonly memory in modref and ipa-pure-const

2020-09-23 Thread Richard Biener via Gcc-patches
On Wed, Sep 23, 2020 at 11:55 AM Jan Hubicka wrote: > > > > +/* Return true if T is a pointer pointing to memory location that is > > > local > > > + for the function (that means, dead after return) or read-only. */ > > > + > > > +bool > > > +points_to_local_or_readonly_memory_p (tree t) > > >

Re: [PATCH] aarch64: Do not alter force_reg returned rtx expanding pauth builtins

2020-09-23 Thread Richard Sandiford
Andrea Corallo writes: > Hi all, > > having a look for force_reg returned rtx later on modified I've found > this other case in `aarch64_general_expand_builtin` while expanding > pointer authentication builtins. > > Regtested and bootsraped on aarch64-linux-gnu. > > Okay for trunk? > > Andrea >

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Richard Sandiford
Qing Zhao writes: >> On Sep 22, 2020, at 1:35 PM, H.J. Lu wrote: >> On Tue, Sep 22, 2020 at 11:25 AM Qing Zhao > > wrote: On Sep 22, 2020, at 11:31 AM, Richard Sandiford wrote: Taking each in turn: what is the reason for not clearing mask registers? >

[PATCH] AArch64: Implement missing vrndns_f32 intrinsic

2020-09-23 Thread Kyrylo Tkachov
Hi all, This patch implements the missing vrndns_f32 intrinsic. This operates on a scalar float32_t value. It can be mapped down to a __builtin_aarch64_frintnsf builtin. This patch does that. Bootstrapped and tested on aarch64-none-linux-gnu. Committing to trunk and to active branches later af

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Richard Sandiford
Qing Zhao writes: >> On Sep 22, 2020, at 12:06 PM, Richard Sandiford >> wrote: > > The following is what I see from i386.md: (I didn’t look at how > “UNSPEC_volatile” is used in data flow analysis in GCC yet) > > ;; UNSPEC_VOLATILE is considered to use and clobber all hard

Re: [PATCH] vect: Fix epilogue loop handling of partial vectors

2020-09-23 Thread Richard Sandiford
"Kewen.Lin" writes: > on 2020/9/22 下午10:34, Richard Sandiford wrote: >> Also, while splitting out the logic that handles epilogues with >> constant iterations, I added a check to make sure that we don't >> try to use partial vectors to vectorise a single-scalar loop. >> This required some changes

Re: [PATCH v3 1/2] IFN: Implement IFN_VEC_SET for ARRAY_REF with VIEW_CONVERT_EXPR

2020-09-23 Thread Richard Biener via Gcc-patches
On Tue, Sep 22, 2020 at 5:55 AM xionghu luo wrote: > > Thanks for the review, > > > On 2020/9/21 16:31, Richard Biener wrote: > >> + > >> +static gimple * > >> +gimple_expand_vec_set_expr (gimple_stmt_iterator *gsi) > >> +{ > >> + enum tree_code code; > >> + gcall *new_stmt = NULL; > >> + gassi

[PATCH] Fix UBSAN errors in ipa-cp.

2020-09-23 Thread Martin Liška
I see the following UBSAN errors: ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/ipa/pr96806.C -std=c++11 -O -fipa-cp -fipa-cp-clone --param=ipa-cp-max-recursive-depth=94 --param=logical-op-non-short-circuit=0 /home/marxin/Programming/gcc2/gcc/ipa-cp.c:3866:20: runtime error: sign

Re: [PATCH] VEC_COND_EXPR: fix ICE in gimple_expand_vec_cond_expr

2020-09-23 Thread Richard Biener via Gcc-patches
On Tue, Sep 22, 2020 at 1:28 PM Martin Liška wrote: > > @Richi: May I please ping this? I have commented in the PR and am testing a patch - other PRs may prevail. Richard. > On 9/1/20 4:27 PM, Martin Liška wrote: > > On 8/31/20 10:01 AM, Richard Biener wrote: > >> On Fri, Aug 28, 2020 at 4:18 P

Re: [PATCH] Fix UBSAN errors in ipa-cp.

2020-09-23 Thread Jan Hubicka
> I see the following UBSAN errors: > > ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/ipa/pr96806.C > -std=c++11 -O -fipa-cp -fipa-cp-clone --param=ipa-cp-max-recursive-depth=94 > --param=logical-op-non-short-circuit=0 > /home/marxin/Programming/gcc2/gcc/ipa-cp.c:3866:20: runtime

Re: Cleanup handling of local/readonly memory in modref and ipa-pure-const

2020-09-23 Thread Jan Hubicka
> On Wed, Sep 23, 2020 at 11:55 AM Jan Hubicka wrote: > > > > > > +/* Return true if T is a pointer pointing to memory location that is > > > > local > > > > + for the function (that means, dead after return) or read-only. */ > > > > + > > > > +bool > > > > +points_to_local_or_readonly_memory_

Re: Cleanup handling of local/readonly memory in modref and ipa-pure-const

2020-09-23 Thread Richard Biener via Gcc-patches
On Wed, Sep 23, 2020 at 2:32 PM Jan Hubicka wrote: > > > On Wed, Sep 23, 2020 at 11:55 AM Jan Hubicka wrote: > > > > > > > > +/* Return true if T is a pointer pointing to memory location that is > > > > > local > > > > > + for the function (that means, dead after return) or read-only. */ > >

Re: [PATCH] Fix UBSAN errors in ipa-cp.

2020-09-23 Thread Martin Liška
On 9/23/20 2:32 PM, Jan Hubicka wrote: Perhaps it is time to turn the profile count scaled valued to sreals like we do in inline heuristics and other places? Yep, I'll try to come up with a patch. Martin

[Patch] lto-wrapper.c: Use -flto-partition=none with offloading (PR97179)

2020-09-23 Thread Tobias Burnus
(Pre-remark: the following applies to the host; the offloading is only involved as otherwise the (.gnu.)offload_{vars,funcs} global variable/table wouldn't exist.) Due to partitioning, it can happen that the offloading table and the functions and variables (which it contains as pointer), end up i

Re: [Patch] lto-wrapper.c: Use -flto-partition=none with offloading (PR97179)

2020-09-23 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 23, 2020 at 02:53:54PM +0200, Tobias Burnus wrote: > (Pre-remark: the following applies to the host; the offloading > is only involved as otherwise the (.gnu.)offload_{vars,funcs} > global variable/table wouldn't exist.) > > Due to partitioning, it can happen that the offloading table

[PATCH] middle-end/96466 - fix VEC_COND isel/expansion issue

2020-09-23 Thread Richard Biener
We need to avoid forcing BLKmode for truth vectors, instead do as other code and use VOIDmode so layout_type can pick a suitable and consistent mode. RTL expansion of vect_cond_mask also needs to deal with CONST_INT operands which means passing the mode explicitely. Bootstrapped on x86_64-unknown

[PATCH] middle-end/96453 - relax gimple_expand_vec_cond_expr

2020-09-23 Thread Richard Biener
This relaxes the condition under which we also try NE_EXPR for a fake generated compare in addition to LT_EXPR given the fact the verification ICEd when it failed but obviously was only implemented for constants. Thus the patch removes the verification and the restriction to constant operands. Bo

Re: [Patch] lto-wrapper.c: Use -flto-partition=none with offloading (PR97179)

2020-09-23 Thread Richard Biener
On Wed, 23 Sep 2020, Tobias Burnus wrote: > (Pre-remark: the following applies to the host; the offloading > is only involved as otherwise the (.gnu.)offload_{vars,funcs} > global variable/table wouldn't exist.) > > Due to partitioning, it can happen that the offloading table > and the functions

Re: [Patch] lto-wrapper.c: Use -flto-partition=none with offloading (PR97179)

2020-09-23 Thread Richard Biener
On Wed, 23 Sep 2020, Richard Biener wrote: > On Wed, 23 Sep 2020, Tobias Burnus wrote: > > > (Pre-remark: the following applies to the host; the offloading > > is only involved as otherwise the (.gnu.)offload_{vars,funcs} > > global variable/table wouldn't exist.) > > > > Due to partitioning, it

Minor modref optimization and statistics fix

2020-09-23 Thread Jan Hubicka
Hi, this patch fixes bug in tracking memory stats and also I have noticed that while the pass takes care to stop traking things when things are obviously out of hand it still keeps summaries that have no useful info for loads or stores and also many summaries are just copying const/pure attributes.

Re: [PATCH] Fix UBSAN errors in ipa-cp.

2020-09-23 Thread Martin Liška
There's patch that does that. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin >From ff5f78110684ed9aedde15d19e856b3acf649971 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 23 Sep 2020 15:10:43 +0200 Subject: [PATCH] Port IPA C

Re: [Patch] OpenMP: Handle cpp_implicit_alias in declare-target discovery (PR96390)

2020-09-23 Thread Tobias Burnus
And another try :-) This time avoiding the ultimate_alias_target completely and just using: + if (node->cpp_implicit_alias) + node = node->get_alias_target (); OK? On 9/22/20 5:39 PM, Tobias Burnus wrote: On 9/22/20 4:24 PM, Jakub Jelinek wrote: On Tue, Sep 22, 202

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Qing Zhao via Gcc-patches
> On Sep 23, 2020, at 5:43 AM, Richard Sandiford > wrote: > > Qing Zhao writes: >>> On Sep 22, 2020, at 1:35 PM, H.J. Lu wrote: >>> On Tue, Sep 22, 2020 at 11:25 AM Qing Zhao >> > wrote: > On Sep 22, 2020, at 11:31 AM, Richard Sandiford > wrote: >

Re: [PATCH] Fix UBSAN errors in ipa-cp.

2020-09-23 Thread Jan Hubicka
> There's patch that does that. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > From ff5f78110684ed9aedde15d19e856b3acf649971 Mon Sep 17 00:00:00 2001 > From: Martin Liska > Date: Wed, 23 Sep 2020 15:10:43 +0200 > Subjec

[PATCH 1/2] aarch64: Add support for Neoverse V1 CPU

2020-09-23 Thread Alex Coplan
This patch adds support for Arm's Neoverse V1 CPU to the AArch64 backend. Testing: * Bootstrapped and regtested on aarch64-none-linux-gnu. OK for trunk? Thanks, Alex --- gcc/ChangeLog: * config/aarch64/aarch64-cores.def: Add Neoverse V1. * config/aarch64/aarch64-tune.md: Rege

[PATCH 2/2] arm: Add support for Neoverse V1 CPU

2020-09-23 Thread Alex Coplan
This patch adds support for Arm's Neoverse V1 CPU to the AArch32 backend. Testing: * Bootstrapped and regtested on arm-none-linux-gnueabihf. OK for trunk? Thanks, Alex --- gcc/ChangeLog: * config/arm/arm-cpus.in (neoverse-v1): New. * config/arm/arm-tables.opt: Regenerate.

Re: [PATCH] c: Fix -Wduplicated-branches ICE [PR97125]

2020-09-23 Thread Marek Polacek via Gcc-patches
On Tue, Sep 22, 2020 at 08:18:09PM -0600, Sandra Loosemore wrote: > On 9/20/20 5:08 PM, Marek Polacek via Gcc-patches wrote: > > We crash here because since r11-3302 the C FE uses codes like SWITCH_STMT > > in the else branches in the attached test, and inchash::add_expr in > > do_warn_duplicated_b

Re: [Patch] OpenMP: Handle cpp_implicit_alias in declare-target discovery (PR96390)

2020-09-23 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 23, 2020 at 03:52:12PM +0200, Tobias Burnus wrote: > + if (TREE_CODE (*tp) == FUNCTION_DECL) > { > + tree decl = *tp; >tree id = get_identifier ("omp declare target"); > - if (!DECL_EXTERNAL (*tp) && DECL_SAVED_TREE (*tp)) > - ((vec *) data)->safe_push (*tp);

Re: [PATCH] c: Fix -Wduplicated-branches ICE [PR97125]

2020-09-23 Thread Jakub Jelinek via Gcc-patches
On Sun, Sep 20, 2020 at 07:08:09PM -0400, Marek Polacek via Gcc-patches wrote: > We crash here because since r11-3302 the C FE uses codes like SWITCH_STMT > in the else branches in the attached test, and inchash::add_expr in > do_warn_duplicated_branches doesn't handle these front-end codes. In >

RE: [PATCH 1/2] aarch64: Add support for Neoverse V1 CPU

2020-09-23 Thread Kyrylo Tkachov
Hi Alex, > -Original Message- > From: Alex Coplan > Sent: 23 September 2020 15:01 > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw ; Richard Sandiford > ; Kyrylo Tkachov > Subject: [PATCH 1/2] aarch64: Add support for Neoverse V1 CPU > > This patch adds support for Arm's Neoverse V1

RE: [PATCH 2/2] arm: Add support for Neoverse V1 CPU

2020-09-23 Thread Kyrylo Tkachov
Hi Alex, > -Original Message- > From: Alex Coplan > Sent: 23 September 2020 15:03 > To: gcc-patches@gcc.gnu.org > Cc: ni...@redhat.com; Richard Earnshaw ; > Ramana Radhakrishnan ; Kyrylo > Tkachov > Subject: [PATCH 2/2] arm: Add support for Neoverse V1 CPU > > This patch adds support fo

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Qing Zhao via Gcc-patches
> On Sep 23, 2020, at 6:05 AM, Richard Sandiford > wrote: > > Qing Zhao mailto:qing.z...@oracle.com>> writes: >>> On Sep 22, 2020, at 12:06 PM, Richard Sandiford >>> wrote: >> >> The following is what I see from i386.md: (I didn’t look at how >> “UNSPEC_volatile” is used in da

c++: dependent local extern decl ICE [PR97171]

2020-09-23 Thread Nathan Sidwell
I'd missed the piece of substutution for the uses of a local extern decl. Just grab the local specialization. We need to do this regardless of dependentness because we always cloned the local extern. PR c++/97171 gcc/cp/ * pt.c (tsubst_copy) [FUNCTION_DECL,VAR_DECL]: Re

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Richard Sandiford
Qing Zhao writes: >> On Sep 23, 2020, at 5:43 AM, Richard Sandiford >> wrote: >> >> Qing Zhao writes: On Sep 22, 2020, at 1:35 PM, H.J. Lu wrote: On Tue, Sep 22, 2020 at 11:25 AM Qing Zhao >>> > wrote: >> On Sep 22, 2020, at 11:31 AM, Richard Sandifo

[Patch] LTO: Force externally_visible for offload_vars/funcs (PR97179) (was: lto-wrapper.c: Use -flto-partition=none with offloading (PR97179))

2020-09-23 Thread Tobias Burnus
On 9/23/20 3:10 PM, Richard Biener wrote: On Wed, 23 Sep 2020, Richard Biener wrote: LTRANS usually makes the symbols hidden, not local. Could also be – whatever the 'nm' output means. So are you sure this isn't a target bug (hidden symbols not implemented but the host compiler obviously havi

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Qing Zhao via Gcc-patches
> On Sep 22, 2020, at 5:37 PM, Segher Boessenkool > wrote: > > Hi! > > On Tue, Sep 22, 2020 at 06:06:30PM +0100, Richard Sandiford wrote: >> Qing Zhao writes: >>> Okay, thanks for the info. >>> then, what’s the current definition of UNSPEC_VOLATILE? >> >> I'm not sure it's written down a

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Richard Sandiford
Qing Zhao writes: >> On Sep 23, 2020, at 6:05 AM, Richard Sandiford >> wrote: >> >> Qing Zhao mailto:qing.z...@oracle.com>> writes: On Sep 22, 2020, at 12:06 PM, Richard Sandiford wrote: >>> >>> The following is what I see from i386.md: (I didn’t look at how >>> “UNSPE

Re: [PATCH] Fix UBSAN errors in ipa-cp.

2020-09-23 Thread Martin Jambor
Hi, On Wed, Sep 23 2020, Jan Hubicka wrote: >> There's patch that does that. >> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >> >> Ready to be installed? >> Thanks, >> Martin > >> From ff5f78110684ed9aedde15d19e856b3acf649971 Mon Sep 17 00:00:00 2001 >> From: Martin

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Qing Zhao via Gcc-patches
> On Sep 23, 2020, at 9:22 AM, Richard Sandiford > wrote: > > Qing Zhao mailto:qing.z...@oracle.com>> writes: >>> On Sep 23, 2020, at 5:43 AM, Richard Sandiford >>> wrote: >>> >>> Qing Zhao writes: > On Sep 22, 2020, at 1:35 PM, H.J. Lu wrote: > On Tue, Sep 22, 2020 at 11:25 AM Q

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Richard Sandiford
Qing Zhao writes: Dropping them is fine with me FWIW. That seems like a natural use for the new hook: drop zeroing that isn't actively wrong, but isn't likely to be useful either. >>> >>> Okay, I will add a new hook for this purpose. >> >> It doesn't need to be a new hook. The

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Qing Zhao via Gcc-patches
> On Sep 23, 2020, at 9:32 AM, Richard Sandiford > wrote: > > Qing Zhao writes: >>> On Sep 23, 2020, at 6:05 AM, Richard Sandiford >>> wrote: >>> >>> Qing Zhao mailto:qing.z...@oracle.com>> writes: > On Sep 22, 2020, at 12:06 PM, Richard Sandiford > wrote: The

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Qing Zhao via Gcc-patches
> On Sep 23, 2020, at 9:40 AM, Richard Sandiford > wrote: > > Qing Zhao writes: > Dropping them is fine with me FWIW. That seems like a natural use > for the new hook: drop zeroing that isn't actively wrong, but isn't > likely to be useful either. Okay, I will add a

[PATCH] libiberty: Add get_DW_UT_name and update include/dwarf2.{def, h}

2020-09-23 Thread Mark Wielaard
This adds a get_DW_UT_name function to dwarfnames using dwarf2.def for use in binutils readelf to show the unit types in a DWARF5 header. Also remove DW_CIE_VERSION which was already removed in binutils/gdb and is not used in gcc. include/ChangeLog: * dwarf2.def: Add DWARF5 Unit type hea

Re: [PATCH] Fix UBSAN errors in ipa-cp.

2020-09-23 Thread Martin Jambor
Hi, On Wed, Sep 23 2020, Martin Liška wrote: > There's patch that does that. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > From ff5f78110684ed9aedde15d19e856b3acf649971 Mon Sep 17 00:00:00 2001 > From: Martin Liska > Dat

c++: Remove some gratuitous typedefing

2020-09-23 Thread Nathan Sidwell
This is C++, we don't need 'typedef struct foo foo;'. Oh, and bool bitfields are a thing. gcc/cp/ * name-lookup.h (typedef cxx_binding): Delete tdef. (typedef cp_binding_level): Likewise. (struct cxx_binding): Flags are bools. pushing to trunk nathan -- Nathan Si

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Richard Sandiford
Qing Zhao writes: >> On Sep 23, 2020, at 9:32 AM, Richard Sandiford >> wrote: >> >> Qing Zhao writes: On Sep 23, 2020, at 6:05 AM, Richard Sandiford wrote: Qing Zhao mailto:qing.z...@oracle.com>> writes: >> On Sep 22, 2020, at 12:06 PM, Richard Sandiford >> wro

Re: [PING 2][PATCH 2/5] C front end support to detect out-of-bounds accesses to array parameters

2020-09-23 Thread Szabolcs Nagy
The 09/23/2020 09:22, Szabolcs Nagy wrote: > The 09/21/2020 12:45, Martin Sebor via Gcc-patches wrote: > > On 9/21/20 12:20 PM, Vaseeharan Vinayagamoorthy wrote: > > > After this patch, I am seeing this -Warray-parameter error: > > > > > > In file included from ../include/pthread.h:1, > > >

Re: [Patch] OpenMP: Handle cpp_implicit_alias in declare-target discovery (PR96390)

2020-09-23 Thread Tobias Burnus
On 9/23/20 4:06 PM, Jakub Jelinek wrote: What I really meant was: I did now something based on this. + gcc_assert (node->alias && node->analyzed); I believe from previous testing that node->analyzed is 0 for the testcase at hand — and, hence, ultimate_alias_target() did not walk

Re: [Patch] LTO: Force externally_visible for offload_vars/funcs (PR97179)

2020-09-23 Thread Tobias Burnus
I think I screwed up with testing – it seem now as if does not work like this, but I need to recheck. Tobias On 9/23/20 4:23 PM, Tobias Burnus wrote: On 9/23/20 3:10 PM, Richard Biener wrote: On Wed, 23 Sep 2020, Richard Biener wrote: LTRANS usually makes the symbols hidden, not local. Coul

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Qing Zhao via Gcc-patches
> On Sep 23, 2020, at 10:21 AM, Richard Sandiford > wrote: > > Qing Zhao mailto:qing.z...@oracle.com>> writes: >>> On Sep 23, 2020, at 9:32 AM, Richard Sandiford >>> wrote: >>> >>> Qing Zhao writes: > On Sep 23, 2020, at 6:05 AM, Richard Sandiford > wrote: > > Qing Zhao

[PATCH] AArch64: Implement missing p128<->f64 reinterpret intrinsics

2020-09-23 Thread Kyrylo Tkachov
Hi all, This patch implements the missing reinterprets to and from poly128_t and float64x2_t. I've plugged in the appropriate testing in the advsimd-intrinsics.exp too. Bootstrapped and tested on aarch64-none-linux-gnu. Tested advsimd-intrinsics.exp on arm-none-eabi too to make sure arm testing

Re: [PATCH][omp, ftracer] Don't duplicate blocks in SIMT region

2020-09-23 Thread Tom de Vries
On 9/23/20 9:28 AM, Richard Biener wrote: > On Tue, 22 Sep 2020, Tom de Vries wrote: > >> [ was: Re: [Patch] [middle-end & nvptx] gcc/tracer.c: Don't split BB >> with SIMT LANE [PR95654] ] >> >> On 9/16/20 8:20 PM, Alexander Monakov wrote: >>> >>> >>> On Wed, 16 Sep 2020, Tom de Vries wrote: >>> >

[PATCH] rs6000: Add 'd' for doubleword variant of vector insert

2020-09-23 Thread Paul A. Clarke via Gcc-patches
When the "Vector Insert" section was added to the documentation, the doubleword ('d') variant was omitted. Add it. 2020-09-23 Paul A. Clarke gcc/ * doc/extend.texi: Add 'd' for doubleword variant of vector insert instruction. --- gcc/doc/extend.texi | 8 1 file chang

[committed] analyzer: fix member call on null seen with ubsan [PR97178]

2020-09-23 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as r11-3403-gf65ebb5210e2fded0f7b339219685f4480124f0c. gcc/analyzer/ChangeLog: PR analyzer/97178 * engine.cc (impl_run_checkers): Update for change to ext_state ctor. * program-state.cc

Re: [PING 2][PATCH 2/5] C front end support to detect out-of-bounds accesses to array parameters

2020-09-23 Thread Martin Sebor via Gcc-patches
On 9/23/20 9:44 AM, Szabolcs Nagy wrote: The 09/23/2020 09:22, Szabolcs Nagy wrote: The 09/21/2020 12:45, Martin Sebor via Gcc-patches wrote: On 9/21/20 12:20 PM, Vaseeharan Vinayagamoorthy wrote: After this patch, I am seeing this -Warray-parameter error: In file included from ../include/pth

Re: [PATCH] tree-optimization/97151 - improve PTA for C++ operator delete

2020-09-23 Thread Jason Merrill via Gcc-patches
On 9/23/20 4:14 AM, Richard Biener wrote: C++ operator delete, when DECL_IS_REPLACEABLE_OPERATOR_DELETE_P, does not cause the deleted object to be escaped. It also has no other interesting side-effects for PTA so skip it like we do for BUILT_IN_FREE. Hmm, this is true of the default implementa

[PATCH] x86: Add

2020-09-23 Thread H.J. Lu via Gcc-patches
For sources which can't use any vector instructions, and cannot be included for compiler intrinsics: $ echo "#include " | gcc -S -O2 -mno-sse -mno-mmx -x c - In file included from /usr/include/stdlib.h:1013, from /usr/lib/gcc/x86_64-redhat-linux/10/include/mm_malloc.h:27,

[PATCH] arm: Fix canary address calculation for non-PIC

2020-09-23 Thread Richard Sandiford
For non-PIC, the stack protector patterns did: rtx mem = XEXP (force_const_mem (SImode, operands[1]), 0); emit_move_insn (operands[2], mem); Here, operands[1] is the address of the canary (&__stack_chk_guard) and operands[2] is the register that we want to move that address in

[committed] aarch64: Add a couple of extra stack-protector tests

2020-09-23 Thread Richard Sandiford
These tests were inspired by corresponding arm ones. They already pass. Tested on aarch64-linux-gnu and aarch64_be-elf, pushed to master. Richard gcc/testsuite/ * gcc.target/aarch64/stack-protector-3.c: New test. * gcc.target/aarch64/stack-protector-4.c: Likewise. --- .../gcc.

[committed] aarch64: Prevent canary address being spilled to stack

2020-09-23 Thread Richard Sandiford
This patch fixes the equivalent of arm bug PR85434/CVE-2018-12886 for aarch64: under high register pressure, the -fstack-protector code might spill the address of the canary onto the stack and reload it at the test site, giving an attacker the opportunity to change the expected canary value. This

[PATCH] arm: Add a couple of extra stack-protector tests

2020-09-23 Thread Richard Sandiford
These tests were inspired by the corresponding aarch64 ones that I just committed. They already pass. Tested on arm-linux-gnueabi, arm-linux-gnueabihf and armeb-eabi. OK for trunk? Richard gcc/testsuite/ * gcc.target/arm/stack-protector-5.c: New test. * gcc.target/arm/stack-pro

Re: [PATCH] tree-optimization/97151 - improve PTA for C++ operator delete

2020-09-23 Thread Richard Biener
On September 23, 2020 7:53:18 PM GMT+02:00, Jason Merrill wrote: >On 9/23/20 4:14 AM, Richard Biener wrote: >> C++ operator delete, when DECL_IS_REPLACEABLE_OPERATOR_DELETE_P, >> does not cause the deleted object to be escaped. It also has no >> other interesting side-effects for PTA so skip it

[committed][nvptx] Split up function ref plus const

2020-09-23 Thread Tom de Vries
Hi, With test-case gcc.c-torture/compile/pr92231.c, we run into: ... nvptx-as: ptxas terminated with signal 11 [Segmentation fault], core dumped^M compiler exited with status 1 FAIL: gcc.c-torture/compile/pr92231.c -O0 (test for excess errors) ... due to using a function reference plus constant

Re: [PATCH] tree-optimization/97151 - improve PTA for C++ operator delete

2020-09-23 Thread Jason Merrill via Gcc-patches
On 9/23/20 2:42 PM, Richard Biener wrote: On September 23, 2020 7:53:18 PM GMT+02:00, Jason Merrill wrote: On 9/23/20 4:14 AM, Richard Biener wrote: C++ operator delete, when DECL_IS_REPLACEABLE_OPERATOR_DELETE_P, does not cause the deleted object to be escaped. It also has no other interest

[committed] also test for null in addition to error_mark_node (PR c/97131)

2020-09-23 Thread Martin Sebor via Gcc-patches
The new warn_parm_ptrarray_mismatch() function can be called even for invalid source code. It tries to handle some of it by checking for error_mark_node but that's not enough since some invalid input can apparently result in nodes being null. I have committed the patch below to avoid the ICE tha

Re: [Patch] LTO: Force externally_visible for offload_vars/funcs (PR97179)

2020-09-23 Thread Tobias Burnus
Actually working patch attached. As mentioned, just using TREE_PUBLIC in input_offload_tables works for functions but for variables this gets overridden. The externally_visible is set to avoid running into the promote_symbol code (→ visibility hidden) later in the function. On 9/23/20 5:47 PM,

[committed] build a zero element array type that renders as T[0] in diagnostics

2020-09-23 Thread Martin Sebor via Gcc-patches
One of the recently added -Warray-bounds tests fails in ILP32 because the warning code calls build_array_type_nelts(type, zero) and naively expects it to create an array type that renders as type[0] in warnings. While that works in LP64, it apparently isn't enough to produce such a type in other

[committed] check for a DECL or EXPRESSION before using its location (PR 97175)

2020-09-23 Thread Martin Sebor via Gcc-patches
Using DECL_SOURCE_LOCATION() with a tree node that's not a DECL isn't a good idea, and neither is using EXPR_LOCATION() with a node that is a DECL. Both trigger an ICE when presented with a node they don't expect. Until a TREE_LOCATION() that's safe to use with either is introduced, the attached

[PATCH 1/2] rs6000: Support _mm_insert_epi{8,32,64}

2020-09-23 Thread Paul A. Clarke via Gcc-patches
Add compatibility implementations for SSE4.1 intrinsics _mm_insert_epi8, _mm_insert_epi32, _mm_insert_epi64. 2020-09-23 Paul A. Clarke gcc/ * config/rs6000/smmintrin.h (_mm_insert_epi8): New. (_mm_insert_epi32): New. (_mm_insert_epi64): New. --- gcc/config/rs6000/smmin

[PATCH 2/2] rs6000: Add tests for _mm_insert_epi{8,32,64}

2020-09-23 Thread Paul A. Clarke via Gcc-patches
Copied from gcc.target/i386. 2020-09-23 Paul A. Clarke gcc/testsuite/ChangeLog: * gcc.target/powerpc/sse4_1-pinsrb.c: New test. * gcc.target/powerpc/sse4_1-pinsrd.c: New test. * gcc.target/powerpc/sse4_1-pinsrq.c: New test. --- .../gcc.target/powerpc/sse4_1-pinsrb.c

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Segher Boessenkool
On Wed, Sep 23, 2020 at 09:28:33AM -0500, Qing Zhao wrote: > > On Sep 22, 2020, at 5:37 PM, Segher Boessenkool > > wrote: > >> which is very similar to the unspec_volatile case we're talking about. > > > > So just like volatile memory accesses, they have an (unknown) side > > effect, which means

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-23 Thread Segher Boessenkool
Hi! On Wed, Sep 23, 2020 at 12:05:22PM +0100, Richard Sandiford wrote: > Qing Zhao writes: > > (But I do feel that the design for UNSPEC_volatile is not clean) > > Agreed. But I think that's partly because what it's trying to achieve > isn't clean either. It's a catch-all for “something is hap

Re: [PATCH] generalized range_query class for multiple contexts

2020-09-23 Thread Martin Sebor via Gcc-patches
On 9/18/20 12:38 PM, Aldy Hernandez via Gcc-patches wrote: As part of the ranger work, we have been trying to clean up and generalize interfaces whenever possible.  This not only helps in reducing the maintenance burden going forward, but provides mechanisms for backwards compatibility between

Re: [PATCH] rs6000: Add 'd' for doubleword variant of vector insert

2020-09-23 Thread Segher Boessenkool
On Wed, Sep 23, 2020 at 11:59:26AM -0500, Paul A. Clarke wrote: > When the "Vector Insert" section was added to the documentation, > the doubleword ('d') variant was omitted. Add it. > > 2020-09-23 Paul A. Clarke > > gcc/ > * doc/extend.texi: Add 'd' for doubleword variant of > ve

libgo patch committed: Update to Go1.15.2 release

2020-09-23 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the Go1.15.2 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 928fa8ccc0e1ef8f3861a28b5ad2d2d220f7219d diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 5d26b7e2da1..f51dac55365 100644 --- a/gcc/go/gofron

[committed] analyzer: add -fno-analyzer-feasibility

2020-09-23 Thread David Malcolm via Gcc-patches
This patch provides a new option "-fno-analyzer-feasibility" as a way to disable feasibility-checking of the constraints along the control flow paths for -fanalyzer diagnostics. I'm adding this in the hope of making it easier to debug issues involving the feasibility-checking logic. The patch add

[committed] analyzer: add testcases for PR 93355 (intl/localealias.c leak)

2020-09-23 Thread David Malcolm via Gcc-patches
PR analyzer/93355 reports a missing diagnostic about a FILE leak in intl/localealias.c. This appears to be due to a issue in the feasibility-checking code, though there is also a state explosion. This patch adds test cases that I've been using when investigating this, two of them currently requir

Re: [PATCH] vect: Fix epilogue loop handling of partial vectors

2020-09-23 Thread Kewen.Lin via Gcc-patches
on 2020/9/23 下午7:33, Richard Sandiford wrote: > "Kewen.Lin" writes: >> on 2020/9/22 下午10:34, Richard Sandiford wrote: >>> Also, while splitting out the logic that handles epilogues with >>> constant iterations, I added a check to make sure that we don't >>> try to use partial vectors to vectorise

Re: [PATCH v3 1/2] IFN: Implement IFN_VEC_SET for ARRAY_REF with VIEW_CONVERT_EXPR

2020-09-23 Thread xionghu luo via Gcc-patches
Hi, On 2020/9/23 19:33, Richard Biener wrote: >> The first loop is for rhs stmt process, this loop is for lhs stmt process. >> I thought vec_extract also need to generate IFN before, but seems not >> necessary now? And that the first loop needs to update the lhs stmt while >> then second doesn't.

Re: [RS6000] Power10 libffi fixes

2020-09-23 Thread Alan Modra via Gcc-patches
On Tue, Sep 22, 2020 at 07:16:57PM -0500, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 22, 2020 at 10:00:11AM +0930, Alan Modra wrote: > > gcc/ > > * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): > > Conditionally define __PCREL__. > > Please do that as a separate (earlier) p

Re: PR97107, libgo fails to build for power10

2020-09-23 Thread Alan Modra via Gcc-patches
On Tue, Sep 22, 2020 at 07:52:53PM -0500, Segher Boessenkool wrote: > It isn't obvious that the outer sequence is always what we want. If > there is some nicer way to get at the info you want, that would help. > > But, this is the expander only -- so I guess we are okay here, it is > much limited

Re: [PING 2][PATCH 2/5] C front end support to detect out-of-bounds accesses to array parameters

2020-09-23 Thread Jeff Law via Gcc-patches
On 9/23/20 11:45 AM, Martin Sebor via Gcc-patches wrote: On 9/23/20 9:44 AM, Szabolcs Nagy wrote: The 09/23/2020 09:22, Szabolcs Nagy wrote: The 09/21/2020 12:45, Martin Sebor via Gcc-patches wrote: On 9/21/20 12:20 PM, Vaseeharan Vinayagamoorthy wrote: After this patch, I am seeing this -W

  1   2   >