Re: [PATCH] Fix unrecognizable insn of pr92865

2019-12-10 Thread Jakub Jelinek
On Tue, Dec 10, 2019 at 01:47:50PM +0800, Hongtao Liu wrote: > This patch is to enable integer mask cmp/cmov under AVX512F even > with TARGET_XOP . > Bootstrap and regression test on i386/x86_64 backend is ok. > > Changelog: > PR target/92865 > * gcc/config/i386/i386-expand.c (ix86_val

Re: [PATCH] Refactor IPA devirt a bit.

2019-12-10 Thread Martin Liška
On 12/9/19 1:24 PM, Richard Sandiford wrote: Martin Liška writes: diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index a884a465a5d..e53461b1f5c 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -1036,20 +1036,13 @@ warn_types_mismatch (tree t1, tree t2, location_t loc1, location_t loc2

Re: [RFC] ipa-cp: Fix PGO regression caused by r278808

2019-12-10 Thread Martin Liška
CC'ing Martin and Honza. Martin

PR92881 "[OpenACC] In async context, need to use 'gomp_remove_var_async' instead of 'gomp_remove_var'" (was: [PATCH] OpenACC reference count overhaul)

2019-12-10 Thread Thomas Schwinge
Hi Julian! On 2019-12-09T15:04:15+, Julian Brown wrote: > On Mon, 9 Dec 2019 15:44:25 +0100 > Thomas Schwinge wrote: >> On 2019-10-03T09:35:04-0700, Julian Brown >> wrote: >> > --- a/libgomp/oacc-mem.c >> > +++ b/libgomp/oacc-mem.c >> >> > @@ -715,48 +684,34 @@ delete_copyout (unsigned f

Re: [RFC] ipa-cp: Fix PGO regression caused by r278808

2019-12-10 Thread Jan Hubicka
Hi, I think the updating should treat self recursive edges as loops: that is calculate SUM of counts incomming edges which are not self recursive, calculate probability of self recursing and then set count as SUM * (1/(1-probability_of_recursion)) we do same thing when computing counts withing loop

Re: [PATCH] Refactor IPA devirt a bit.

2019-12-10 Thread Jan Hubicka
> > > > 2019-12-09 Richard Sandiford > > > > gcc/ > > * ipa-utils.h (get_odr_name_for_type): Check for a TYPE_DECL. > > * ipa-devirt.c (warn_types_mismatch): Don't call xstrdup for the > > second demangled name. > > > > gcc/testsuite/ > > * gcc.dg/lto/tag-1_0.c, gcc.dg/lto/tag

Re: Fwd: [PATCH, GCC, Vect] Fix costing for vector shifts

2019-12-10 Thread Christophe Lyon
Hi, On Mon, 9 Dec 2019 at 11:23, Sudakshina Das wrote: > > Hi Jeff > > On 07/12/2019 17:44, Jeff Law wrote: > > On Fri, 2019-12-06 at 14:05 +, Sudakshina Das wrote: > >> Hi > >> > >> While looking at the vectorization for following example, we > >> realized > >> that even though vectorizable_

[committed] Fix some i386.c comment typos

2019-12-10 Thread Jakub Jelinek
Hi! Last night when working on -fstack-protector* improvement to be posted, I've noticed a few typos. Fixed thusly, committed to trunk as obvious. 2019-12-10 Jakub Jelinek * config/i386/i386.c (IX86_LEA_PRIORITY): Fix comment typos. --- gcc/config/i386/i386.c.jj 2019-12-09 11:12:3

Re: [PATCH] Fix unrecognizable insn of pr92865

2019-12-10 Thread Eric Botcazou
> No gcc/ or gcc/testsuite/ prefixes in ChangeLog. And 2 different ChangeLogs: ChangeLog and testsuite/ChangeLog. -- Eric Botcazou

[committed] Fix up i386/avx512f-vmovntp?-2.c tests

2019-12-10 Thread Jakub Jelinek
Hi! I've noticed these two tests FAIL execution with -fstack-protector-strong, without it we are just lucky. _mm512_stream_* requires the destination to be 64-byte aligned and without stack protector the s vars were allocated next to res and ensured the right alignment, but with -fstack-protector

RE: [PATCH] PR 92846: [ARC] generate signaling FDCMPF for hard float comparisons

2019-12-10 Thread Claudiu Zissulescu
Hi, Thank you for your contribution, I'll push it asap. As far as I understand, you need this patch both in gcc9 branch and mainline. Cheers, Claudiu > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Monday, December 09, 2019 8:02 PM > To: gcc-patches@gcc.gn

Re: [RFC] ipa-cp: Fix PGO regression caused by r278808

2019-12-10 Thread Martin Jambor
Hi, On Tue, Dec 10 2019, Jan Hubicka wrote: > Hi, > I think the updating should treat self recursive edges as loops: that is > calculate SUM of counts incomming edges which are not self recursive, > calculate probability of self recursing and then set count as > SUM * (1/(1-probability_of_recursio

[PATCH] Improve -fstack-protector-strong (PR middle-end/92825)

2019-12-10 Thread Jakub Jelinek
Hi! As mentioned in the PR, -fstack-protector-strong in some cases instruments even functions which except for the stack canary setup and later testing of that don't touch the stack at all. This is because for -fstack-protector-strong we setup the canary whenever stack_protect_decl_p returns true

[PATCH] Oprimize stack_protect_set_1_ followed by a move to the same register (PR target/92841)

2019-12-10 Thread Jakub Jelinek
Hi! The stack_protect_set_1_ pattern intentionally clears the register it used as a temporary to read the canary from the register and push it back on the stack for security reasons, to make sure the stack canary isn't spilled somewhere else etc. On the following testcase, we end up with a weird:

Re: [PATCH] Oprimize stack_protect_set_1_ followed by a move to the same register (PR target/92841)

2019-12-10 Thread Andreas Schwab
On Dez 10 2019, Jakub Jelinek wrote: > --- gcc/testsuite/gcc.target/i386/pr92841.c.jj2019-12-09 > 19:38:29.572759215 +0100 > +++ gcc/testsuite/gcc.target/i386/pr92841.c 2019-12-09 19:40:59.642492417 > +0100 > @@ -0,0 +1,17 @@ > +/* PR target/92841 */ > +/* { dg-do compile { target fsta

Re: [PATCH] Oprimize stack_protect_set_1_ followed by a move to the same register (PR target/92841)

2019-12-10 Thread Jakub Jelinek
On Tue, Dec 10, 2019 at 11:02:39AM +0100, Andreas Schwab wrote: > On Dez 10 2019, Jakub Jelinek wrote: > > > --- gcc/testsuite/gcc.target/i386/pr92841.c.jj 2019-12-09 > > 19:38:29.572759215 +0100 > > +++ gcc/testsuite/gcc.target/i386/pr92841.c 2019-12-09 19:40:59.642492417 > > +0100 > > @@

[patch, committed, Fortran] PR 92872 – Fix get_CFI_desc

2019-12-10 Thread Tobias Burnus
Fix the condition; the DECL_LANG_SPECIFIC can be used for much more than just to save the decl. Committed as Rev. 279160. Tobias 2019-12-10 Tobias Burnus PR fortran/92872 * trans-array.c (get_CFI_desc): Fix cond whether saved desc exists. PR fortran/92872 * gfortran.dg/bind_c_optional

Re: Fwd: [PATCH, GCC, Vect] Fix costing for vector shifts

2019-12-10 Thread Sudakshina Das
Hi Christophe On 10/12/2019 09:01, Christophe Lyon wrote: > Hi, > > On Mon, 9 Dec 2019 at 11:23, Sudakshina Das wrote: >> >> Hi Jeff >> >> On 07/12/2019 17:44, Jeff Law wrote: >>> On Fri, 2019-12-06 at 14:05 +, Sudakshina Das wrote: Hi While looking at the vectorization for fo

Re: [RFC] ipa-cp: Fix PGO regression caused by r278808

2019-12-10 Thread Jan Hubicka
> Hi, > > On Tue, Dec 10 2019, Jan Hubicka wrote: > > Hi, > > I think the updating should treat self recursive edges as loops: that is > > calculate SUM of counts incomming edges which are not self recursive, > > calculate probability of self recursing and then set count as > > SUM * (1/(1-probabi

Fix EXTRACT_LAST_REDUCTION handling of pattern stmts

2019-12-10 Thread Richard Sandiford
Unlike most vector ops, extract-last reductions replace the original scalar code in-situ rather than adding an adjacent vector implementation. I.e.: dest_1 = COND_EXPR <...>; becomes: dest_1 = .EXTRACT_LAST (...); gcc.dg/vect/vect-cond-reduc-4.c was ICEing for SVE because we tried to repl

[committed] Disallow EXTRACT_LAST_REDUCTION for reduction chains

2019-12-10 Thread Richard Sandiford
gcc.dg/vect/vect-cond-reduc-5.c was ICEing for SVE because we tried to use an extract-last reduction for a chain of COND_EXPRs. Adding support for the chained case would be too invasive for stage 3 so this patch explicitly forbids it instead. I've filed PR92884 for the possible future work. Teste

Record the loop masks needed for EXTRACT_LAST_REDUCTIONs

2019-12-10 Thread Richard Sandiford
The analysis phase of vectorizable_condition wasn't recording the loop masks needed by the transform phase. This meant that the masks wouldn't be created in the (rare) case that no other statement needed them. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard 2019-12-10

Add missing conversion in vect_create_epilog_for_reduction

2019-12-10 Thread Richard Sandiford
The direct_slp_reduc code in vect_create_epilog_for_reduction was still assuming that all types involved in a reduction are the same (up to types_compatible_p), whereas we now support differences in sign. This was causing an ICE in gcc.dg/vect/pr92324-4.c for SVE. Tested on aarch64-linux-gnu and

Make dwarf2out punt for MODE_VECTOR_BOOL

2019-12-10 Thread Richard Sandiford
The dwarf2 handling of vector constants currently divides the vector into a length (number of elements) and byte element size. This doesn't work well for MODE_VECTOR_BOOL, where several elements are packed into the same byte. We should probably add a way of encoding this in future, but for now th

Re: Add missing conversion in vect_create_epilog_for_reduction

2019-12-10 Thread Richard Biener
On December 10, 2019 12:39:53 PM GMT+01:00, Richard Sandiford wrote: >The direct_slp_reduc code in vect_create_epilog_for_reduction was >still assuming that all types involved in a reduction are the same >(up to types_compatible_p), whereas we now support differences in >sign. This was causing a

Re: Fix EXTRACT_LAST_REDUCTION handling of pattern stmts

2019-12-10 Thread Richard Biener
On December 10, 2019 12:28:24 PM GMT+01:00, Richard Sandiford wrote: >Unlike most vector ops, extract-last reductions replace the original >scalar code in-situ rather than adding an adjacent vector >implementation. >I.e.: > > dest_1 = COND_EXPR <...>; > >becomes: > > dest_1 = .EXTRACT_LAST (.

Re: Record the loop masks needed for EXTRACT_LAST_REDUCTIONs

2019-12-10 Thread Richard Biener
On December 10, 2019 12:34:33 PM GMT+01:00, Richard Sandiford wrote: >The analysis phase of vectorizable_condition wasn't recording the >loop masks needed by the transform phase. This meant that the masks >wouldn't be created in the (rare) case that no other statement needed >them. > >Tested on

Re: Make dwarf2out punt for MODE_VECTOR_BOOL

2019-12-10 Thread Richard Biener
On December 10, 2019 12:44:01 PM GMT+01:00, Richard Sandiford wrote: >The dwarf2 handling of vector constants currently divides the vector >into a length (number of elements) and byte element size. This doesn't >work well for MODE_VECTOR_BOOL, where several elements are packed into >the same byt

[PATCH] Bail out in gfc_dep_compare_expr for a NULL argument.

2019-12-10 Thread Martin Liška
Hi. The patch is about early bail out in gfc_dep_compare_expr function when one of the arguments (and not both at the same time) is null. I'm not sure, it's a proper fix however. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/fo

Re: [RFC, vectorizer] Fix ICE with masked vectors

2019-12-10 Thread Andrew Stubbs
On 09/12/2019 15:59, Richard Sandiford wrote: No, the assumption's correct even there. The assert usually triggers because something elsewhere is getting confused about the vector types. The attached patch fixes the ICE in the testcase, but I suspect does not go far enough. Can it happen that

[PATCH][vect] Keep track of DR_OFFSET advance in dr_vec_info rather than data_reference

2019-12-10 Thread Andre Vieira (lists)
Hi, This patch aims at refactoring the vectorizer code to no longer need to reset DR_OFFSET for epilogue vectorization and instead keep track of DR_OFFSET changes per dr_vec_info and just update it as needed. I added a member of type 'tree' called 'offset' to dr_vec_info, which keeps track o

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v3)

2019-12-10 Thread Matthias Klose
On 09.12.19 17:41, Gaius Mulley wrote: > Matthias Klose writes: > >> On 17.11.19 07:49, Gaius Mulley wrote: >>> >>> Hello, >>> >>> while spending the weekend on the Howland and Baker islands :-) I >>> thought I'd post version three of the patches which introduce Modula-2 >>> into the GCC trunk.

Re: [PATCH] Bail out in gfc_dep_compare_expr for a NULL argument.

2019-12-10 Thread Tobias Burnus
Hi Martin, On 12/10/19 2:04 PM, Martin Liška wrote: The patch is about early bail out in gfc_dep_compare_expr function when one of the arguments (and not both at the same time) is null. I'm not sure, it's a proper fix however. I think it is the best one can do. Technically, one could replace t

[PATCH 1/2] Use clause locations in OpenACC nested reduction warnings

2019-12-10 Thread Frederik Harwath
Since the Fortran front-end now sets the clause locations correctly, we can emit warnings with more precise locations if we encounter conflicting operations for a variable in reduction clauses. 2019-12-10 Frederik Harwath gcc/ * omp-low.c (scan_omp_for): Use clause location in warning.

[PATCH 0/2] Add tests to verify OpenACC clause locations

2019-12-10 Thread Frederik Harwath
Hi, On 09.12.19 16:58, Harwath, Frederik wrote: > Tobias has recently fixed a problem with the column information in gfortran > locations > [...] > I have tested the patch manually by adapting the validity check for nested > OpenACC reductions (see omp-low.c) > to include the location of clauses

[PATCH 2/2] Add tests to verify OpenACC clause locations

2019-12-10 Thread Frederik Harwath
Check that the column information for OpenACC clauses is communicated correctly to the middle-end, in particular by the Fortran front-end (cf. PR 92793). 2019-12-10 Frederik Harwath gcc/testsuite/ * gcc.dg/goacc/clause-locations.c: New test. * gfortran.dg/goacc/clause-locations

[committed] Add myself to MAINTAINERS

2019-12-10 Thread Lewis Hyatt
Thanks for the sponsorship David. 2019-12-10 Lewis Hyatt * MAINTAINERS (Write After Approval): Add myself. Index: MAINTAINERS === --- MAINTAINERS (revision 279166) +++ MAINTAINERS (revision 279167) @@ -429,6 +429,7 @@ And

Re: [PATCH] Fix multibyte-related issues in pretty-print.c (PR 91843)

2019-12-10 Thread Lewis Hyatt
On Mon, Dec 9, 2019 at 4:58 PM David Malcolm wrote: > > On Thu, 2019-10-10 at 16:27 -0400, Lewis Hyatt wrote: > > Hello- > > > > This short patch addresses > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91843 > > by adding the needed multibyte awareness to pretty-print.c. > > Together with my ot

Re: [PATCH 0/2] Add tests to verify OpenACC clause locations

2019-12-10 Thread Thomas Schwinge
Hi Frederik! On 2019-12-10T15:23:01+0100, Frederik Harwath wrote: > On 09.12.19 16:58, Harwath, Frederik wrote: >> Tobias has recently fixed a problem with the column information in gfortran >> locations >> [...] >> I have tested the patch manually by adapting the validity check for nested >> O

[PATCH] Fix libstdc++ testsuite to handle VxWorks gthreads implementation

2019-12-10 Thread Corentin Gay
Hello there ! When implementing the support for gthreads in VxWorks, we stumbled on a problem in the testsuite. In the libstdc++ testsuite, we indiscriminately add the `-pthread` switch to the tests that require linking against the pthread library. In certain cases, such as VxWorks, the gthrea

Re: [PATCH 0/2] Add tests to verify OpenACC clause locations

2019-12-10 Thread Harwath, Frederik
Hi Thomas, On 10.12.19 15:44, Thomas Schwinge wrote: >> Frederik Harwath (2): >> Use clause locations in OpenACC nested reduction warnings >> Add tests to verify OpenACC clause locations > > I won't insist, but suggest (common practice) to merge that into one > patch: bug fix plus test cases

Re: copy/copy_backward/fill/fill_n/equal rework

2019-12-10 Thread Jonathan Wakely
On 09/12/19 10:32 +0100, François Dumont wrote: After completing this work and running more tests I realized that the declaration of algos was still not ideal. So here is another version where algos are not re-declare in stl_deque.h, I rather include stl_algobase.h in deque.tcc. The problem w

Re: Fix overflows in -fprofile-reorder-functions

2019-12-10 Thread Jan Hubicka
> 2On Sun, 8 Dec 2019, Jan Hubicka wrote: > > > Other explanation would be that our new qsort with broken comparator due to > > overflow can actualy remove some entries in the array, but that sounds bit > > crazy. > > gcc_qsort only reorders elements, making it possible for gcc_qsort_chk (that >

Re: Fix overflows in -fprofile-reorder-functions

2019-12-10 Thread Alexander Monakov
On Tue, 10 Dec 2019, Jan Hubicka wrote: > > I would recommend to make these variables uint64_t, then you can simply do > > > > tp_first_run_a--; > > tp_first_run_b--; > > > > making 0 wrap around to UINT64_MAX. Then they will naturally sort after all > > other nodes. > > Then we would still

[PATCH] libstdc++: Fix bug in std::indirect_result_t

2019-12-10 Thread Jonathan Wakely
The alias template wasn't working because it applied iter_reference_t to the pack of iterators before and after passing the pack to the __indeirect_result helper. * include/bits/iterator_concepts.h (indirect_result_t): Do not apply iter_reference_t to parameter pack. * tes

[PATCH] libstdc++: Reduce header dependencies in

2019-12-10 Thread Jonathan Wakely
* include/std/span: Do not include and . (tuple_size, tuple_element): Declare. Tested powerpc64le-linux, committed to trunk. commit a32163a1de2a84dde15df80dd33e54a57746d6eb Author: Jonathan Wakely Date: Tue Dec 10 15:59:54 2019 + libstdc++: Reduce header dependencies

[PATCH] libstdc++: Define __cpp_lib_constexpr_complex macro

2019-12-10 Thread Jonathan Wakely
This is LWG issue 3349. * include/std/complex (__cpp_lib_constexpr_complex): Define. * include/std/version (__cpp_lib_constexpr_complex): Likewise. * testsuite/26_numerics/complex/1.cc: New test. * testsuite/26_numerics/complex/2.cc: New test. Tested powerpc64le-l

Re: [PATCH 0/2] Add tests to verify OpenACC clause locations

2019-12-10 Thread Harwath, Frederik
Hi Thomas, On 10.12.19 15:44, Thomas Schwinge wrote: > Thanks, yes, with my following remarks considered, and acted on per your > preference. To record the review effort, please include "Reviewed-by: > Thomas Schwinge " in the commit log, see > . Committed

[committed][AArch64] Fix INDEX patterns for partial VNx2 modes

2019-12-10 Thread Richard Sandiford
The INDEX patterns handle partial modes by choosing the container size rather than the element size, so that the number of lanes (and thus number of additions) matches the mode. This means that all VNx4 modes use .s and all VNx2 modes use .d, etc. When adding this, I'd forgotten that the choice b

[committed][AArch64] Don't allow partial SVE modes in GPRs

2019-12-10 Thread Richard Sandiford
With -msve-vector-bits=N, the payload of some partial SVE modes can be 16 bytes or smaller, which makes them small enough to fit in a pair of GPRs. We specifically don't want that, because the payload is distributed evenly across the SVE register rather than collected at one end. Marshalling it i

Re: [PATCH][RFC] Add new ipa-reorder pass

2019-12-10 Thread Jan Hubicka
> * Makefile.in: Add ipa-reorder.o. > * cgraph.c (cgraph_node::dump): Dump > text_sorted_order. > (cgraph_node_cmp_by_text_sorted): > New function that sorts functions based > on text_sorted_order. > * cgraph.h (cgraph_node): Add text_sorted_order. >

[PATCH] libstdc++: Fix description of std::ios::trunc (PR 92886)

2019-12-10 Thread Jonathan Wakely
PR libstdc++/92886 * include/bits/ios_base.h (std::ios_base::trunc): Fix comment. Committing to trunk as obvious. commit 9acff881dea3a00ae588f8ebc4c5289b98f7ee52 Author: Jonathan Wakely Date: Tue Dec 10 17:00:30 2019 + libstdc++: Fix description of std::ios::trunc (PR

Re: [PING][PATCH][GCC][ARM] Arm generates out of range conditional branches in Thumb2 (PR91816)

2019-12-10 Thread Kyrill Tkachov
Hi Stam, On 11/15/19 5:26 PM, Stam Markianos-Wright wrote: Pinging with more correct maintainers this time :) Also would need to backport to gcc7,8,9, but need to get this approved first! Sorry for the delay. Thank you, Stam Forwarded Message Subject: Re: [PATCH][GCC][

Re: [PATCH 28/49] analyzer: new files: analyzer.{cc|h}

2019-12-10 Thread Martin Sebor
On 11/15/19 6:23 PM, David Malcolm wrote: gcc/ChangeLog: * analyzer/analyzer.cc: New file. * analyzer/analyzer.h: New file. Here are a few more comments/suggestions as I'm slowly making my way through the patch, partly for my own benefit. Hopefully they're at least moderately u

[PATCH, libstdc++] Two parts of C++20 p1032...

2019-12-10 Thread Smith-Rowland, Edward M
These patches are modest reworkings of previous patches. The patch for char_traits was pretty much approved already.  But in response to a comment from François I at least added __copy_backwards, and used ptrdiff_t instead of size_t parameters and I put all the mem* wrappers in a __detail names

Fix hot/startup partitioning with LTO

2019-12-10 Thread Jan Hubicka
Hi, as noticed by Martin's new heatmaps default_function_sections disables test.unlikely and text.startup sections during LTO. This was meant to be only with tp_first_run profiling. The hot section is still useful since it does "poor man's clustering" so I kept only the test to disable startup sub

[Patch, Fortran] OpenMP/OpenACC – fix more issues with OPTIONAL

2019-12-10 Thread Tobias Burnus
Nonallocatable, nonpointer array arguments (of assumed shape) are special as they get a get an array descriptor ('arg') as argument but create a local variable which accesses the actual data ('arg.0 = arg->data'). With OPTIONAL, there are/were two outstanding issues: (A) If the argument is no

Re: Fix overflows in -fprofile-reorder-functions

2019-12-10 Thread Jan Hubicka
> On Tue, 10 Dec 2019, Jan Hubicka wrote: > > > > I would recommend to make these variables uint64_t, then you can simply do > > > > > > tp_first_run_a--; > > > tp_first_run_b--; > > > > > > making 0 wrap around to UINT64_MAX. Then they will naturally sort after > > > all > > > other nodes.

Fix function profile computation

2019-12-10 Thread Jan Hubicka
Hi, this patch fixes compute_function_frequency to work well with profiles that was downgraded from IPA to local profiles. Bootstrapped/regtested x86_64-linux, comitted. honza * predict.c (compute_function_frequency): Check for presence of IPA profile. Index: predict.c

Re: [PATCH] Freestanding proposal P0829

2019-12-10 Thread Paul M. Bendixen
Den ons. 4. dec. 2019 kl. 22.43 skrev Jonathan Wakely : > > On 03/12/19 23:38 +0100, Paul M. Bendixen wrote: > >Hello > >I've made an implementation of P0829 and tested it with gcc for avr. > > This is great, thanks! > > What's the status of libstdc++ for AVR? If I understand correctly, it > doesn'

Re: [PATCH] rs6000: Fix 2 for PR92661, Do not define builtins that overload disabled builtins

2019-12-10 Thread Peter Bergner
On 12/4/19 5:03 PM, Segher Boessenkool wrote: > On Wed, Dec 04, 2019 at 03:53:30PM -0600, Peter Bergner wrote: >> Right. I'll come up with a patch and hopefully Iain and David can test >> on Darwin and AIX and I can test on Linux with --enable-decimal-float >> and --disable-decimal-float. That sh

Re: [PATCH v2 1/2] RISC-V: Add shorten_memrefs pass

2019-12-10 Thread Craig Blackmore
Hi Jim, Thank you for your review. I have posted an updated patch below which I think addresses your comments. On 30/10/2019 23:57, Jim Wilson wrote: > On Fri, Oct 25, 2019 at 10:40 AM Craig Blackmore > wrote: >> This patch aims to allow more load/store instructions to be compressed by >> replac

Re: [PATCH v2 2/2] sched-deps.c: Avoid replacing address if it increases address cost

2019-12-10 Thread Craig Blackmore
Hi Jim, On 31/10/2019 00:03, Jim Wilson wrote: > On Fri, Oct 25, 2019 at 10:40 AM Craig Blackmore > wrote: >> The sched2 pass undoes some of the addresses generated by the RISC-V >> shorten_memrefs code size optimization (patch 1/2) and consequently increases >> code size. This patch prevents sch

[patch, fortran, committed] Fix PR 92863, 'ICE in gfc_typename

2019-12-10 Thread Thomas Koenig
Hello world, I have just committed the attached patch as obvious and simple as r279180. The ICE for the test case occurred because a previous error had left the derived field of the typespec NULL. Just returning "invalid type" or "invalid class" in such a case is enough to cure the ICE. Regards

Re: [PATCH] rs6000: Fix 2 for PR92661, Do not define builtins that overload disabled builtins

2019-12-10 Thread Peter Bergner
On 12/10/19 12:27 PM, Peter Bergner wrote: > Ok, how about the patch below? If Iain and David could test this on Darwin > and AIX respectively, that would be great. I'm currently testing this on > powerpc64le-linux, with and without --disable-decimal-float. So my --enable-decimal-float builds sh

[C++ PATCH] c++/92878 - Parenthesized init of aggregates in new-expression.

2019-12-10 Thread Marek Polacek
Ville pointed out that our paren init of aggregates doesn't work for auto a = new A(1, 2, 3); and I think it should: A new-expression that creates an object of type T initializes that object as follows: ... -- Otherwise, the new-initializer is interpreted according to the initialization rul

Re: [PATCH 28/49] analyzer: new files: analyzer.{cc|h}

2019-12-10 Thread Eric Gallager
On 12/9/19, David Malcolm wrote: > On Fri, 2019-12-06 at 22:38 -0500, Eric Gallager wrote: >> On 11/15/19, David Malcolm wrote: > [...] >> > diff --git a/gcc/analyzer/analyzer.h b/gcc/analyzer/analyzer.h >> > new file mode 100644 >> > index 000..ace8924 >> > --- /dev/null >> > +++ b/gcc/analy

Re: [PATCH] rs6000: Fix 2 for PR92661, Do not define builtins that overload disabled builtins

2019-12-10 Thread Iain Sandoe
Peter Bergner wrote: On 12/10/19 12:27 PM, Peter Bergner wrote: Ok, how about the patch below? If Iain and David could test this on Darwin and AIX respectively, that would be great. I'm currently testing this on powerpc64le-linux, with and without --disable-decimal-float. So my --enable-

[C++ PATCH] PR c++/92560 - ICE with decltype and rewritten operator.

2019-12-10 Thread Jason Merrill
A call as the immediate operand of decltype is handled differently; we don't create an object of the return type as we do normally. But in the case of a rewritten operator, we're adding another call as a wrapper, so the inner call doesn't get the special handling. Tested x86_64-pc-linux-gnu, appl

[C++ PATCH] Fix C++20 structural type vs. private base.

2019-12-10 Thread Jason Merrill
In my patch to implement C++20 "structural type" I tried to set the access flags on the artificial base fields appropriately, but failed. I was copying TREE_PRIVATE from the binfo, but TREE_PRIVATE on binfo is just a temporary cache for dfs_access_in_type; we really need to get the inheritance acc

[C++ PATCH] PR c++/92847 - C++20 comparison ambiguity with class template.

2019-12-10 Thread Jason Merrill
This testcase demonstrates that looking at cand->template_decl is not a good starting place for finding the most general template, as it is only set for primary templates. Tested x86_64-pc-linux-gnu, applying to trunk. * call.c (cand_parms_match): Handle all templated functions. --- gcc/

[PATCH] Fix propagate_vr_across_jump_function (PR ipa/92883)

2019-12-10 Thread Jakub Jelinek
Hi! The ipa vr hash table apparently intentionally doesn't differentiate between value ranges with different types, all that matters are the values of min and max, so before using it ipa_vr_operation_and_type_effects needs to be called to convert the value_range to the right type. Most of the spot

[committed] Fix some comment typos

2019-12-10 Thread Jakub Jelinek
Hi! While working on the PR92883 patch I've noticed some typos, fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2019-12-10 Jakub Jelinek * ipa-param-manipulation.c (ipa_param_body_adjustments::register_replacement): Fix comme

[PATCH] Fix ICE in regstat_bb_compute_calls_crossed (PR rtl-optimization/92882)

2019-12-10 Thread Jakub Jelinek
Hi! The following testcase ICEs on the newly added asserts. Some comments hint that maybe it is fine if CODE_LABEL additions don't trigger df recomputations, but even if it is not ok, regstat_bb_compute_calls_crossed doesn't look like an IL verification routine and for !NONDEBUG_INSN_P it really d

Re: [PATCH] Fix ICE in regstat_bb_compute_calls_crossed (PR rtl-optimization/92882)

2019-12-10 Thread Jeff Law
On Tue, 2019-12-10 at 21:40 +0100, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs on the newly added asserts. > Some comments hint that maybe it is fine if CODE_LABEL additions > don't > trigger df recomputations, but even if it is not ok, > regstat_bb_compute_calls_crossed doesn't loo

Re: [PATCH] Fix propagate_vr_across_jump_function (PR ipa/92883)

2019-12-10 Thread Jeff Law
On Tue, 2019-12-10 at 21:33 +0100, Jakub Jelinek wrote: > Hi! > > The ipa vr hash table apparently intentionally doesn't differentiate > between > value ranges with different types, all that matters are the values of > min and max, so before using it ipa_vr_operation_and_type_effects > needs to >

Re: [PATCH] Improve -fstack-protector-strong (PR middle-end/92825)

2019-12-10 Thread Jeff Law
On Tue, 2019-12-10 at 10:27 +0100, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, -fstack-protector-strong in some cases > instruments > even functions which except for the stack canary setup and later > testing of > that don't touch the stack at all. > > This is because for -fstack-prote

[C++ PATCH] Fix -std=c++17 and earlier handling of CLASSTYPE_NON_AGGREGATE (PR c++/92869)

2019-12-10 Thread Jakub Jelinek
Hi! In C++20, types with user-declared constructors are not aggregate types, while in C++17 only types with user-provided or explicit constructors. In check_bases_and_members we handle it properly: CLASSTYPE_NON_AGGREGATE (t) |= ((cxx_dialect < cxx2a ? type_has_user_provided_or_expl

[PATCH] Fix vect rotate pattern recog (PR target/92723)

2019-12-10 Thread Jakub Jelinek
Hi! Unlike x86, where the last operand of vector by scalar shift is DImode for V[248]DImode shifts, on aarch64 they seem to be SImode. vect_recog_rotate_pattern when the rotate amount is not constant casts the amount to the element type of the vector, so for V[248]DImode vectors to DImode, but the

[C++ PATCH] Improve C++ error recovery (PR c++/59655)

2019-12-10 Thread Jakub Jelinek
Hi! On the following testcase, we emit 2 errors and 1 warning, when the user really should see one error. The desirable error is static_assert failure, the bogus error is during error recovery, complaining that a no_linkage template isn't defined when it really is defined, but we haven't bothered

Re: [patch, fortran] Introduce -finline-pack

2019-12-10 Thread Thomas Koenig
Am 09.12.19 um 17:30 schrieb Thomas Koenig: Maybe -finline-repack would be a better name? -finline-internal-pack? Steve made an excellent suggestion: -finline-arg-packing . So, OK with that change? Regards Thomas

[patch, fortran, committed] Fix PR 91643, repacking of assumed rank argument

2019-12-10 Thread Thomas Koenig
Hello world, this fixes a regression introduced by my inline repacking patch. With the test case, it is simple and obvious enough - do not repack an assumed rank argument (which makes no sense). Committed as obvious and simple as r279203 after regression-testing. 2019-12-10 Thomas Koenig

[Patch, Fortran] PR92898 - [9/10 Regression] ICE in gfc_check_is_contiguous, at fortran/check.c:7157

2019-12-10 Thread Harald Anlauf
The testcase in the PR exhibits a corner case in a check on invalid code that was not handled appropriately and in turn ICEs. The patch below enhances that check. Instead of adding a new testcase, I modified the related one that came with the 'introduction' of the regression when fixing PR91641.

Re: [PATCH] avoid invoking assignment on uninitialized objects (PR 92761, 92762)

2019-12-10 Thread David Malcolm
On Tue, 2019-12-03 at 15:41 -0700, Martin Sebor wrote: > After allocating a new chunk of memory hash_table::expand() copy- > assigns elements from the current array over the newly allocated > elements without constructing them. > > Similarly, after destroying existing elements, hash_table:: > empt

patch to fix PR92796

2019-12-10 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92796 The patch was successfully bootstrapped and tested on x86-64. Committed as r279204 Index: ChangeLog === --- ChangeLog (revision 279200) +++ ChangeLog (w

Re: [Patch, Fortran] PR92898 - [9/10 Regression] ICE in gfc_check_is_contiguous, at fortran/check.c:7157

2019-12-10 Thread Thomas Koenig
Hello Harald, Index: gcc/fortran/check.c === --- gcc/fortran/check.c (Revision 279183) +++ gcc/fortran/check.c (Arbeitskopie) @@ -7154,7 +7154,9 @@ bool gfc_check_is_contiguous (gfc_expr *array) { if (array->expr_type == EXP

Re: [PATCH] PR 92846: [ARC] generate signaling FDCMPF for hard float comparisons

2019-12-10 Thread Vineet Gupta
On 12/10/19 1:12 AM, Claudiu Zissulescu wrote: > Hi, > > Thank you for your contribution, I'll push it asap. As far as I understand, > you need this patch both in gcc9 branch and mainline. > > Cheers, > Claudiu Indeed both mainline and gcc9 Thx -Vineet > >> -Original Message- >> From: V

Re: [PATCH] avoid invoking assignment on uninitialized objects (PR 92761, 92762)

2019-12-10 Thread Martin Sebor
On 12/10/19 3:07 PM, David Malcolm wrote: On Tue, 2019-12-03 at 15:41 -0700, Martin Sebor wrote: After allocating a new chunk of memory hash_table::expand() copy- assigns elements from the current array over the newly allocated elements without constructing them. Similarly, after destroying exi

[PATCH] Fix ICE in compute_objsize (PR tree-optimization/92891)

2019-12-10 Thread Jakub Jelinek
Hi! The following testcase ICEs, because gimple_call_alloc_size doesn't always return a sizetype typed INTEGER_CST, which the callers rely on (compare those converted to wide_int with other wide_ints with the sizetype precision). If alloc_size attribute has two arguments, gimple_call_alloc_size w

Re: [PATCH] Fix ICE in compute_objsize (PR tree-optimization/92891)

2019-12-10 Thread Jeff Law
On Wed, 2019-12-11 at 00:23 +0100, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs, because gimple_call_alloc_size doesn't > always > return a sizetype typed INTEGER_CST, which the callers rely on > (compare > those converted to wide_int with other wide_ints with the sizetype > precisio

[PATCH] libstdc++: Correct noexcept-specifiers on span constructors

2019-12-10 Thread Jonathan Wakely
As discussed at https://github.com/cplusplus/draft/issues/3534 two std::span constructors specify incorrect conditions for throwing exceptions. This patch makes those constructors have correct noexcept-specifiers that accurately reflect what can actually throw. (span(ContiguousIterator, S

Go patch committed: Build type descriptor for alias in other package

2019-12-10 Thread Ian Lance Taylor
This patch to the Go frontend by Cherry Zhang generates type descriptors for pointers to aliases defined in other packages. When a type descriptor is needed (for e.g. interface conversion), if the type is a pointer to a named type defined in another package, we don't generate the definition of the

[patch] factor out common files for compare_exclusions

2019-12-10 Thread Matthias Klose
the toplevel configure.ac repeats common exclusion files for specific targets. Just factor those out. Maybe not required, but gm2 is adding more files to be ignored on every target, so make it easy to only have these files mentioned in one place. Ok for the trunk? Matthias 2019-12-11 Matthias K

Re: [PATCH] Fix unrecognizable insn of pr92865

2019-12-10 Thread Hongtao Liu
On Tue, Dec 10, 2019 at 4:11 PM Jakub Jelinek wrote: > > On Tue, Dec 10, 2019 at 01:47:50PM +0800, Hongtao Liu wrote: > > This patch is to enable integer mask cmp/cmov under AVX512F even > > with TARGET_XOP . > > Bootstrap and regression test on i386/x86_64 backend is ok. > > > > Changelog: >

Re: [PATCH] Fix multibyte-related issues in pretty-print.c (PR 91843)

2019-12-10 Thread David Malcolm
On Tue, 2019-12-10 at 09:36 -0500, Lewis Hyatt wrote: > On Mon, Dec 9, 2019 at 4:58 PM David Malcolm > wrote: > > On Thu, 2019-10-10 at 16:27 -0400, Lewis Hyatt wrote: > > > Hello- > > > > > > This short patch addresses > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91843 > > > by adding the

[PATCH] Add abs pattern to handle {si,di} mode abs to avoid pmax/cmove conversion (PR92651)

2019-12-10 Thread 玩还有
Hi: Currently smax/smin pattern added by r274481 cause some regression in 525.x264_r by 8% with -O2 -march=corei7. The reason is some IA backends (contain TARGET_SSE4_1) will do transform for simple abs (using rshift, xor and sub) to pmax/pmin if smax/smin pattern exists, which generate unnecessa

Re: Ping: [GCC][PATCH] Add ARM-specific Bfloat format support to middle-end

2019-12-10 Thread Jeff Law
On Mon, 2019-12-09 at 13:40 +, Stam Markianos-Wright wrote: > > On 12/3/19 10:31 AM, Stam Markianos-Wright wrote: > > > > On 12/2/19 9:27 PM, Joseph Myers wrote: > > > On Mon, 2 Dec 2019, Jeff Law wrote: > > > > > > > > 2019-11-13 Stam Markianos-Wright < > > > > > stam.markianos-wri...@arm

Re: [PATCH] Restore enable_if lost during original import of pstl

2019-12-10 Thread Thomas Rodgers
Tested x86_64-pc-linux-gnu, committed to trunk, backported to gcc-9-branch. Jonathan Wakely writes: > On 18/11/19 20:54 -0800, Thomas Rodgers wrote: >> >> * include/pstl/glue_numeric_defs.h: Restore enable_if lost during >> original >> import of pstl. >> * include/pstl/glue_nume

[PATCH] Rename condition_variable_any::wait_on_* methods

2019-12-10 Thread Thomas Rodgers
User-agent: mu4e 1.3.4; emacs 26.2 * include/std/condition_variable (condition_variable_any::wait_on(_Lock&, stop_token, _Predicate): Rename to match current draft standard. (condition_variable_any::wait_on_until(_Lock&, stop_token, const chrono::time_point<>

Re: [PATCH 0/2] Make C front end share the C++ tree representation of loops and switches

2019-12-10 Thread Sandra Loosemore
On 12/6/19 3:41 PM, Jeff Law wrote: On Wed, 2019-11-13 at 09:27 -0700, Sandra Loosemore wrote: I bootstrapped and regression-tested this on x86_64-linux-gnu. There are a few regressions involving these tests: gcc.dg/tree-ssa/pr77445-2.c I believe tihs is another instance of the FSA optimizat

  1   2   >