Re: [PATCH] Fix -ffast-math flags handling inconsistencies

2020-02-07 Thread Segher Boessenkool
On Fri, Feb 07, 2020 at 05:47:32PM +0100, Ulrich Weigand wrote: > > but what happens to -fsignalling-nans -ffast-math then? Better leave those > > in I'd say. > > Ah, it seems I was confused about the intended semantics here. > > I thought that a *more specific* option like -fsignalling-nans

Re: [PATCH][AArch64] Improve clz patterns

2020-02-07 Thread Segher Boessenkool
On Fri, Feb 07, 2020 at 06:01:44PM +, Richard Sandiford wrote: > Wilco Dijkstra writes: > > Although GCC should understand the limited range of clz/ctz/cls results, > > Combine sometimes behaves oddly and duplicates ctz to remove an unnecessary > > sign extension. Avoid this by adding an

Re: [PATCH] i386: Omit clobbers from vzeroupper until final [PR92190]

2020-02-07 Thread Segher Boessenkool
On Tue, Feb 04, 2020 at 12:06:54PM +, Richard Sandiford wrote: > > Also, you don't need to emit "#" in output template. This is just for > > extra safety, we can live without. Please see e.g. "*tzcnt_1". > > IMO it's better to keep it here, where we're relying on the split > happening for

Re: [PATCH] rs6000: Fix PR93136, gcc.dg/vmx/ops.c and several other test break after r279772

2020-02-07 Thread Peter Bergner
On 1/9/20 6:29 PM, Peter Bergner wrote: > On 1/9/20 4:51 PM, Segher Boessenkool wrote: >> Splitting out separate functions in the testcase shouldn't be so much >> work? Or am I too optimistic :-) >> >> This should make the test a good deal less prone to random changes in >> output caused by the

Re: [PATCH] RISC-V: Fix combined tree builds.

2020-02-07 Thread Jim Wilson
ping Jim On Thu, Jan 30, 2020 at 2:36 PM Jim Wilson wrote: > > The RISC-V toolchain doesn't support leb128 because of linker relaxation > to reduce code size. This prevents us from computing the leb128 size of a > value at compile time. So do a configure time gas feature check regardless > of

Re: [PATCH] Fix -ffast-math flags handling inconsistencies

2020-02-07 Thread Joseph Myers
On Fri, 7 Feb 2020, Ulrich Weigand wrote: > I thought that a *more specific* option like -fsignalling-nans was always > intended to override a more generic option like -ffast-math, no matter > whether it comes before or after it on the command line. Yes, that's correct. (There are cases where

Re: [PATCH] avoid issuing -Wrestrict from folder (PR 93519)

2020-02-07 Thread Joseph Myers
On Fri, 7 Feb 2020, Richard Biener wrote: > To me it's a QOI question that depends on the actual case. > Turning memcpy (p, p, N) into a no-op is the correct thing, > even though with (too) large N it might trap. Folding > a read from outside of an object to zero might be OK > (it's undefined),

Re: [committed] avoid pedantic warning in C++ 98 mode: comma at end of enumerator list

2020-02-07 Thread Joseph Myers
On Wed, 5 Feb 2020, Martin Sebor wrote: > I removed the trailing comma and (after a few false starts) managed > to push the change in commit > r10-6466-g297aa668293d55ffe100d810e92fbe592f262557. > > I got the error below for my first few attempts. The message had > the expected format so I

Re: [PATCH] Use a non-empty test program to test ability to link

2020-02-07 Thread Joseph Myers
On Wed, 5 Feb 2020, Sandra Loosemore wrote: > This patch is for PR 79193 and 88999, problems where libstdc++ is > mis-configuring itself when building for a bare-metal target because it thinks > it can link programs without pulling in the BSP that provides low-level I/O > support. (Specifically,

Re: Patch to fix PR93561

2020-02-07 Thread Segher Boessenkool
Hi! On Thu, Feb 06, 2020 at 05:16:14PM -0500, Vladimir Makarov wrote: > --- a/gcc/lra-assigns.c > +++ b/gcc/lra-assigns.c > @@ -964,6 +964,8 @@ spill_for (int regno, bitmap spilled_pseudo_bitmap, bool > first_p) >bitmap_clear (_pseudos_bitmap); >for (j = hard_regno_nregs

Re: [PATCH] c++: Fix paren init of aggregates in unevaluated context [PR92947]

2020-02-07 Thread Jason Merrill
On 2/7/20 3:29 PM, Marek Polacek wrote: When I implemented C++20 parenthesized initialization of aggregates I introduced this bogus cp_unevaluated_operand check, thus disabling this feature in unevaluated context. Oop. Removing the check turned up another bug: I wasn't checking the return

[PATCH] c++: Fix paren init of aggregates in unevaluated context [PR92947]

2020-02-07 Thread Marek Polacek
When I implemented C++20 parenthesized initialization of aggregates I introduced this bogus cp_unevaluated_operand check, thus disabling this feature in unevaluated context. Oop. Removing the check turned up another bug: I wasn't checking the return value of digest_init. So when

[COMMITTED] c++: Fix use of local in constexpr if.

2020-02-07 Thread Jason Merrill
extract_local_specs wasn't finding the mention of 'an' as a template argument because we weren't walking into template arguments. So here I changed cp_walk_subtrees to do so--only walking into template arguments in the spelling of the type or expression, not any hidden behind typedefs. The

[PATCH] libstdc++: Make sure iterator_traits is populated

2020-02-07 Thread Patrick Palka
Since basic_istream_view::iterator is neither a cpp17 iterator (because it's move-only) nor does it define all four of the types {difference_type, value_type, reference, iterator_category}, then by the rule in [iterator.traits], its iterator_traits has no members. More concretely this means that

Re: [PATCH][AArch64] Improve clz patterns

2020-02-07 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi Richard, > >> Could you go into more detail about what the before and after code >> looks like, and what combine is doing? Like you say, this sounds >> like a target-independent thing on face value. > > It is indeed, but it seems specific to instructions where we have

Re: [PATCH 2/4] Use const for some function arguments.

2020-02-07 Thread Segher Boessenkool
On Tue, Feb 04, 2020 at 02:55:14PM +0100, Martin Liska wrote: > > gcc/ChangeLog: > > 2020-02-04 Martin Liska > > PR c/92472. That trailing dot should not be there (in some other patches as well). Segher

Re: [PATCH] issues with configure --enable-checking option

2020-02-07 Thread Richard Sandiford
Roman Zhuykov writes: > Hi! > I've investigated a bit, because some of the following confused me while > working with some local 9.2-based branch. > > Documentation issues: > (0) See patch for install.texi at the bottom, two possible values are > not documented. Ok for master? Backports? > (1)

[PATCH] libstdc++: Implement P1878R1 "Constraining Readable Types"

2020-02-07 Thread Jonathan Wakely
* include/bits/iterator_concepts.h (iter_difference_t, iter_value_t): Use remove_cvref_t. (readable_traits): Rename to indirectly_readable_traits. (readable): Rename to indirectly_readable. (writable): Rename to indirectly_writable.

[committed] libstdc++: Fix bug in iterator_traits>

2020-02-07 Thread Jonathan Wakely
The wrong type was being used in the __common_iter_has_arrow constraint, creating a circular dependency where the iterator_traits specialization was needed before it was complete. The correct parameter for the __common_iter_has_arrow concept is the first template argument of the common_iterator,

Re: [ARM] Fix -mpure-code for v6m

2020-02-07 Thread Richard Earnshaw (lists)
On 07/02/2020 16:43, Christophe Lyon wrote: On Fri, 7 Feb 2020 at 14:49, Richard Earnshaw (lists) wrote: On 07/02/2020 13:19, Christophe Lyon wrote: When running the testsuite with -fdisable-rtl-fwprop2 and -mpure-code for cortex-m0, I noticed that some testcases were failing because we

Re: [PATCH] alias: Fix offset checks involving section anchors [PR92294]

2020-02-07 Thread Richard Sandiford
Richard Biener writes: > On Tue, Feb 4, 2020 at 6:44 PM Richard Sandiford > wrote: >> >> Richard Sandiford writes: >> > [...] >> >> I'm not sure given the issues you've introduced if I could actually >> >> fill out the matrix of answers without more underlying information. >> >> ie, when can we

Re: [PATCH] Fix -ffast-math flags handling inconsistencies

2020-02-07 Thread Ulrich Weigand
Richard Biener wrote: > On Fri, Jan 31, 2020 at 6:01 PM Ulrich Weigand wrote: > > The overall effect of this patch is that now all component flags of > > -ffast-math are treated exactly equivalently: > > * they are set (changed from their default) with -ffast-math > > * they are reset to

Re: [ARM] Fix -mpure-code for v6m

2020-02-07 Thread Christophe Lyon
On Fri, 7 Feb 2020 at 14:49, Richard Earnshaw (lists) wrote: > > On 07/02/2020 13:19, Christophe Lyon wrote: > > When running the testsuite with -fdisable-rtl-fwprop2 and -mpure-code > > for cortex-m0, I noticed that some testcases were failing because we > > still generate "ldr rX, .LCY", which

Re: [PATCH] Improve splitX passes management

2020-02-07 Thread Segher Boessenkool
On Thu, Feb 06, 2020 at 12:13:35PM +0100, Uros Bizjak wrote: > The names of split_before_sched2 ("split4") and split_before_regstack > ("split3") do not reflect their insertion point in the sequence of passes, > where split_before_regstack follows split_before_sched2. Reorder the code > and rename

Re: [PATCH] avoid issuing -Wrestrict from folder (PR 93519)

2020-02-07 Thread Jeff Law
On Thu, 2020-02-06 at 14:16 +0100, Richard Biener wrote: > On Thu, Feb 6, 2020 at 2:00 PM Jeff Law wrote: > > On Wed, 2020-02-05 at 09:19 +0100, Richard Biener wrote: > > > On Tue, Feb 4, 2020 at 11:02 PM Martin Sebor wrote: > > > > On 2/4/20 2:31 PM, Jeff Law wrote: > > > > > On Tue, 2020-02-04

Re: [PATCH 4/3] Add [range.istream]

2020-02-07 Thread Jonathan Wakely
On 07/02/20 09:46 -0500, Patrick Palka wrote: Fixed and committed with that change. Thanks for the review! I've just tested and pushed this fix. commit 572992c8920d5339a3ac28d442c436d6daa0bfae Author: Jonathan Wakely Date: Fri Feb 7 16:06:43 2020 + libstdc++ Fix missing return in

Re: [PATCH] libstdc++: Optimize C++20 comparison category types

2020-02-07 Thread Daniel Krügler
Am Fr., 7. Feb. 2020 um 15:23 Uhr schrieb Jonathan Wakely : > > On 07/02/20 10:04 +0100, Daniel Krügler wrote: > >Am Do., 6. Feb. 2020 um 15:28 Uhr schrieb Jonathan Wakely > >: > >> > >> On 06/02/20 13:53 +, Jonathan Wakely wrote: > >> >On 06/02/20 13:40 +, Jonathan Wakely wrote: > >>

Re: [RFA] [PR rtl-optimization/90275] Handle nop reg->reg copies in cse

2020-02-07 Thread Jeff Law
On Thu, 2020-02-06 at 07:56 -0600, Segher Boessenkool wrote: > On Wed, Feb 05, 2020 at 11:48:23AM -0700, Jeff Law wrote: > > Yea, it's closely related. In your case you need to effectively ignore > > the nop insn to get the optimization you want. In mine that nop insn > > causes an ICE. > > > >

Re: [PATCH] xfail and improve some failing libgomp tests

2020-02-07 Thread Jakub Jelinek
On Fri, Feb 07, 2020 at 09:56:38AM +0100, Harwath, Frederik wrote: > * {target-32.c, thread-limit-2.c}: > no "usleep" implemented for nvptx. Cf. https://gcc.gnu.org/PR81690 Please don't, I want to deal with that using declare variant, just didn't get yet around to finishing the last patch needed

Re: [PATCH][AArch64] ACLE 8-bit integer matrix multiply-accumulate intrinsics

2020-02-07 Thread Dennis Zhang
Hi all, On 27/01/2020 13:01, Richard Sandiford wrote: Dennis Zhang writes: [...] gcc/ChangeLog: 2020-01-23 Dennis Zhang * config/aarch64/aarch64-builtins.c (TYPES_TERNOP_SSUS): New macro. * config/aarch64/aarch64-simd-builtins.def (simd_smmla): New. (simd_ummla,

Re: [PATCH 4/3] Add [range.istream]

2020-02-07 Thread Patrick Palka
On Fri, 7 Feb 2020, Jonathan Wakely wrote: > On 06/02/20 19:52 -0500, Patrick Palka wrote: > > This patch adds ranges::basic_istream_view and ranges::istream_view. This > > seems > > to be the last missing part of the ranges header. > > > > libstdc++-v3/ChangeLog: > > > > *

Re: [PATCH 3/3] libstdc++: Implement C++20 range adaptors

2020-02-07 Thread Patrick Palka
On Fri, 7 Feb 2020, Jonathan Wakely wrote: > On 06/02/20 18:53 -0500, Patrick Palka wrote: > > On Thu, 6 Feb 2020, Jonathan Wakely wrote: > > > > +#ifdef __cpp_lib_threeway_comparison > > > > > > This macro is mispelled, should be three_way with an underscore. > > > > Oops! It looks like it's

Re: [PATCH] libstdc++: Optimize C++20 comparison category types

2020-02-07 Thread Jonathan Wakely
On 07/02/20 10:04 +0100, Daniel Krügler wrote: Am Do., 6. Feb. 2020 um 15:28 Uhr schrieb Jonathan Wakely : On 06/02/20 13:53 +, Jonathan Wakely wrote: >On 06/02/20 13:40 +, Jonathan Wakely wrote: >>This reduces sizeof(std::partial_ordering) and optimizes conversion and >>comparison

Re: [PATCH][AARCH64] Fix for PR86901

2020-02-07 Thread Wilco Dijkstra
Hi, Richard wrote: > However, inside the compiler we really want to represent this as a >shift. ... > Ideally this would be handled inside the mid-end expansion of an > extract, but in the absence of that I think this is best done inside the > extv expansion so that we never end up with a real

[COMMITTED] c++: Fix ICE on nonsense requires-clause.

2020-02-07 Thread Jason Merrill
Here we were swallowing all the syntax errors by parsing tentatively, and returning error_mark_node without ever actually giving an error. Fixed by using save_tokens/rollback_tokens instead. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/92517 * parser.c

Re: [PATCH 2/3] libstdc++: Implement C++20 constrained algorithms

2020-02-07 Thread Jonathan Wakely
On 03/02/20 21:07 -0500, Patrick Palka wrote: + template +struct binary_transform_result +{ + [[no_unique_address]] _Iter1 in1; + [[no_unique_address]] _Iter2 in2; + [[no_unique_address]] _Out out; + + template + requires convertible_to && + &&

Re: [ARM] Fix -mpure-code for v6m

2020-02-07 Thread Richard Earnshaw (lists)
On 07/02/2020 13:19, Christophe Lyon wrote: When running the testsuite with -fdisable-rtl-fwprop2 and -mpure-code for cortex-m0, I noticed that some testcases were failing because we still generate "ldr rX, .LCY", which is what we want to avoid with -mpure-code. This is latent since a recent

[ARM] Fix -mpure-code for v6m

2020-02-07 Thread Christophe Lyon
When running the testsuite with -fdisable-rtl-fwprop2 and -mpure-code for cortex-m0, I noticed that some testcases were failing because we still generate "ldr rX, .LCY", which is what we want to avoid with -mpure-code. This is latent since a recent improvement in fwprop (PR88833). In this patch I

Re: [PATCH 4/3] Add [range.istream]

2020-02-07 Thread Jonathan Wakely
On 06/02/20 19:52 -0500, Patrick Palka wrote: This patch adds ranges::basic_istream_view and ranges::istream_view. This seems to be the last missing part of the ranges header. libstdc++-v3/ChangeLog: * include/std/ranges (ranges::__detail::__stream_extractable,

coroutines: Update to n4849 allocation/deallocation.

2020-02-07 Thread Iain Sandoe
Hi, This is the first of the (small number of) anticipated changes to bring the implementation into line with the latest published C++20 draft (this is now expected to be very close to the final, although some wording might still be adjusted). The allocation for the coroutine state frame is

Re: [PATCH] x86-64: Pass aggregates with only float/double in GPRs for MS_ABI

2020-02-07 Thread H.J. Lu
On Fri, Feb 7, 2020 at 2:14 AM JonY <10wa...@gmail.com> wrote: > > On 2/7/20 3:23 AM, H.J. Lu wrote: > > On Wed, Feb 05, 2020 at 09:51:14PM +0100, Uros Bizjak wrote: > >> On Wed, Feb 5, 2020 at 6:59 PM H.J. Lu wrote: > >>> > >>> MS_ABI requires passing aggregates with only float/double in integer

Re: [PATCH] middle-end/93519 - avoid folding stmts in obviously unreachable code

2020-02-07 Thread Richard Biener
On Thu, 6 Feb 2020, Martin Sebor wrote: > On 2/6/20 7:52 AM, Richard Biener wrote: > > The inliner folds stmts delayed, the following arranges things so > > to not fold stmts that are obviously not reachable to avoid warnings > > from those code regions. > > > > Bootstrapped and tested on

Re: [PATCH 3/3] libstdc++: Implement C++20 range adaptors

2020-02-07 Thread Jonathan Wakely
On 06/02/20 18:53 -0500, Patrick Palka wrote: On Thu, 6 Feb 2020, Jonathan Wakely wrote: > +#ifdef __cpp_lib_threeway_comparison This macro is mispelled, should be three_way with an underscore. Oops! It looks like it's also mispelled in the definition of iota_view earlier in this file.

Re: [PATCH] i386: Make xmm16-xmm31 call used even in ms ABI

2020-02-07 Thread Jakub Jelinek
dsd %xmm18, %xmm14, %xmm14 vaddsd %xmm18, %xmm14, %xmm18 vmovaps (%rsp), %xmm14 vmovaps 16(%rsp), %xmm18 addq$40, %rsp ret .seh_endproc .ident "GCC: (GNU) 10.0.1 20200207 (experimental)" Does whatever assembler mingw64 uses ev

Re: [PATCH] i386: Make xmm16-xmm31 call used even in ms ABI

2020-02-07 Thread JonY
On 2/6/20 6:07 AM, Jakub Jelinek wrote: > On Thu, Feb 06, 2020 at 01:00:36AM +, JonY wrote: >> On 2/4/20 11:42 AM, Jakub Jelinek wrote: >>> Hi! >>> >>> On Tue, Feb 04, 2020 at 11:16:06AM +0100, Uros Bizjak wrote: I guess that Comment #9 patch form the PR should be trivially correct,

Re: [PATCH] x86-64: Pass aggregates with only float/double in GPRs for MS_ABI

2020-02-07 Thread JonY
On 2/7/20 3:23 AM, H.J. Lu wrote: > On Wed, Feb 05, 2020 at 09:51:14PM +0100, Uros Bizjak wrote: >> On Wed, Feb 5, 2020 at 6:59 PM H.J. Lu wrote: >>> >>> MS_ABI requires passing aggregates with only float/double in integer >>> registers. Checked gcc outputs against Clang and fixed: >>> >>> FAIL:

Re: [PATCH][AARCH64] Fix for PR86901

2020-02-07 Thread Richard Earnshaw (lists)
On 07/02/2020 02:12, Modi Mo via gcc-patches wrote: I did a quick bootstrap, this shows several failures like: gcc/builtins.c:9427:1: error: unrecognizable insn: 9427 | } | ^ (insn 212 211 213 24 (set (reg:SI 207) (zero_extract:SI (reg:SI 206) (const_int 26

Re: [PATCH] arm: Fix up arm installed unwind.h for use in pedantic modes [PR93615]

2020-02-07 Thread Ramana Radhakrishnan
On Fri, Feb 7, 2020 at 8:19 AM Jakub Jelinek wrote: > > Hi! > > As the following testcase shows, unwind.h on ARM can't be (starting with GCC > 10) compiled with -std=c* modes, only -std=gnu* modes. > The problem is it uses asm keyword, which isn't a keyword in those modes > (system headers vs.

Re: [PATCH] avoid issuing -Wrestrict from folder (PR 93519)

2020-02-07 Thread Richard Biener
On Fri, Feb 7, 2020 at 12:08 AM Martin Sebor wrote: > > On 2/6/20 6:16 AM, Richard Biener wrote: > > On Thu, Feb 6, 2020 at 2:00 PM Jeff Law wrote: > >> > >> On Wed, 2020-02-05 at 09:19 +0100, Richard Biener wrote: > >>> On Tue, Feb 4, 2020 at 11:02 PM Martin Sebor wrote: > On 2/4/20 2:31

Re: [PATCH] libstdc++: Optimize C++20 comparison category types

2020-02-07 Thread Daniel Krügler
Am Do., 6. Feb. 2020 um 15:28 Uhr schrieb Jonathan Wakely : > > On 06/02/20 13:53 +, Jonathan Wakely wrote: > >On 06/02/20 13:40 +, Jonathan Wakely wrote: > >>This reduces sizeof(std::partial_ordering) and optimizes conversion and > >>comparison operators to avoid conditional branches

[PATCH] xfail and improve some failing libgomp tests

2020-02-07 Thread Harwath, Frederik
Hi, the libgomp testsuite contains some test cases (all in /libgomp/testsuite/libgomp.c/) which fail with nvptx offloading because of some long standing issues: * {target-32.c, thread-limit-2.c}: no "usleep" implemented for nvptx. Cf. https://gcc.gnu.org/PR81690 * target-{33,34}.c: no

[PATCH] arm: Fix up arm installed unwind.h for use in pedantic modes [PR93615]

2020-02-07 Thread Jakub Jelinek
Hi! As the following testcase shows, unwind.h on ARM can't be (starting with GCC 10) compiled with -std=c* modes, only -std=gnu* modes. The problem is it uses asm keyword, which isn't a keyword in those modes (system headers vs. non-system ones don't make a difference here). glibc and other

Re: [PATCH] i386: Better patch to improve avx* vector concatenation [PR93594]

2020-02-07 Thread Uros Bizjak
On Fri, Feb 7, 2020 at 9:05 AM Jakub Jelinek wrote: > > Hi! > > After thinking some more on this, we can do better; rather than having to > add a new prereload splitter pattern to catch all other cases where it might > be beneficial to fold first part of an UNSPEC_CAST back to the unspec >

[PATCH] i386: Better patch to improve avx* vector concatenation [PR93594]

2020-02-07 Thread Jakub Jelinek
Hi! After thinking some more on this, we can do better; rather than having to add a new prereload splitter pattern to catch all other cases where it might be beneficial to fold first part of an UNSPEC_CAST back to the unspec operand, this patch reverts the *.md changes I've made yesterday and

Re: [PATCH] i386: Fix splitters that call extract_insn_cached [PR93611]

2020-02-07 Thread Uros Bizjak
On Fri, Feb 7, 2020 at 8:58 AM Jakub Jelinek wrote: > > Hi! > > The following testcase ICEs. The generated split_insns starts > with recog_data.insn = NULL and then tries to put various operands into > recog_data.operand array and checks various splitter conditions. > The problem is that some