[PATCH v6 3/3] PR80791 Consider doloop cmp use in ivopts

2019-08-14 Thread Kewen.Lin
Hi! Comparing to the previous versions of implementation mainly based on the existing IV cands but zeroing the related group/use cost, this new one is based on Richard and Segher's suggestion introducing one doloop dedicated IV cand. Some key points are listed below: 1) New field doloop_p in

RE: Add TIGERLAKE and COOPERLAKE to GCC

2019-08-14 Thread Cui, Lili
Resend this mail for GCC Patches rejected my message, thanks. -Original Message- Hi Uros and all: This patch is about to add TIGERLAKE and COOPERLAKE to GCC. TIGERLAKE is based on ICELAKE_CLIENT and plus new ISA MOVEDIRI/MOVDIR64B/AVX512VP2INTERSECT. COOPERLAKE is based on CASCADELAKE a

Re: Canonicalization of compares performed as side-effect operations

2019-08-14 Thread Eric Botcazou
[Sorry for the delay, I missed your question...] > Interesting. Does it work for the general case of a reverse subtract, > which I need to handle as wel? Not clear, Visium only uses it for SNE and combined NEG/SNE. -- Eric Botcazou

[committed][AArch64] Rework SVE PTEST patterns

2019-08-14 Thread Richard Sandiford
This patch reworks the rtl representation of the SVE PTEST operation so that: - the governing predicate is always VNx16BI (and so all bits are defined) - it is still possible to pattern-match the governing predicate in the mode that it had previously - a new hint operand says whether the gover

[committed][AArch64] Canonicalise SVE predicate constants

2019-08-14 Thread Richard Sandiford
This patch makes sure that we build all SVE predicate constants as VNx16BI before RA, to encourage similar constants to be reused between modes. This is also useful for the ACLE, where the single predicate type svbool_t is always a VNx16BI. Also, and again to encourage reuse, the patch makes us u

[committed][AArch64] Don't rely on REG_EQUAL notes to combine SVE BIC

2019-08-14 Thread Richard Sandiford
This patch generalises the SVE BIC pattern so that it doesn't rely on REG_EQUAL notes. The danger with relying on the notes is that an optimisation could for example replace the original (not ...) note with an (unspec ... UNSPEC_MERGE_PTRUE) in which the predicate is a constant. That's a legitima

[committed][AArch64] Use unspecs for remaining SVE FP binary ops

2019-08-14 Thread Richard Sandiford
Another patch in the series to make the SVE FP patterns use unspecs, so that they can accurately describe cases in which the predicate isn't a PTRUE. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274417. Richard 2019-08-14 Richard Sandiford Ku

[committed][AArch64] Add a "GP strictness" operand to SVE FP unspecs

2019-08-14 Thread Richard Sandiford
This patch makes the SVE unary, binary and ternary FP unspecs take a new "GP strictness" operand that indicates whether the predicate has to be taken literally, or whether it is valid to make extra lanes active (up to and including using a PTRUE). This again is laying the groundwork for the ACLE p

[committed][AArch64] Commonise some SVE FP patterns

2019-08-14 Thread Richard Sandiford
This patch uses a single expander for generic FP binary optabs that map to predicated SVE instructions. This makes them consistent with the associated conditional optabs, which already work this way. The patch also generalises the division handling to be one example of a register-only predicated

Re: [PATCH] Add missing popcount simplifications (PR90693)

2019-08-14 Thread Richard Biener
On Tue, Aug 13, 2019 at 6:47 PM Andrew Pinski wrote: > > On Tue, Aug 13, 2019 at 8:50 AM Wilco Dijkstra wrote: > > > > Add simplifications for popcount (x) > 1 to (x & (x-1)) != 0 and > > popcount (x) == 1 into (x-1) > single-use cases and support an optional convert. A microbenchmark > > shows

[committed][AArch64] Add support for SVE HF vconds

2019-08-14 Thread Richard Sandiford
We were missing vcond patterns that had HF comparisons and HI or HF data. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274420. Richard 2019-08-14 Richard Sandiford gcc/ * config/aarch64/iterators.md (SVE_HSD): New mode iterator. (V_FP_EQ

[committed][AArch64] Rework SVE FP comparisons

2019-08-14 Thread Richard Sandiford
This patch rewrites the SVE FP comparisons so that they always use unspecs and so that they have an additional operand to indicate whether the predicate is known to be a PTRUE. It's part of a series that rewrites the SVE FP patterns so that they can cope with non-PTRUE predicates. Tested on aarch

[committed][AArch64] Use unspecs for SVE conversions involving floats

2019-08-14 Thread Richard Sandiford
This patch changes the SVE FP<->FP and FP<->INT patterns so that they use unspecs rather than rtx codes, continuing the series to make the patterns work with predicates that might not be all-true. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274423. Richard

[committed][AArch64] Rearrange SVE conversion patterns

2019-08-14 Thread Richard Sandiford
The SVE int<->float conversion patterns need to handle various combinations of modes, making sure that the predicate mode is based on the widest element size. We did this using separate patterns for conversions involving: - HF (converting to/from [HSD]I, predicated based on the int operand) - SF

Re: [PATCH] Automatics in equivalence statements

2019-08-14 Thread Mark Eggleston
I now have commit access. gcc/fortran     Jeff Law     Mark Eggleston     * gfortran.h: Add gfc_check_conflict declaration.     * symbol.c (check_conflict): Rename cfg_check_conflict and remove     static.     * symbol.c (cfg_check_conflict): Remove automatic in equivalence     conflict check

[committed][AArch64] Use "x" predication for SVE integer arithmetic patterns

2019-08-14 Thread Richard Sandiford
The SVE patterns used an UNSPEC_MERGE_PTRUE unspec to attach a predicate to an otherwise unpredicated integer arithmetic operation. As its name suggests, this was designed to be a wrapper used for merging instructions in which the predicate is known to be a PTRUE. This unspec dates from the very

Re: [PATCH 2/3] Add simplify rules for wrapped binary operations.

2019-08-14 Thread Richard Biener
On Tue, Aug 13, 2019 at 10:36 AM Robin Dapp wrote: > > We would like to simplify code like > (larger_type)(var + const1) + const2 > to > (larger_type)(var + combined_const1_const2) > when we know that no overflow happens. Trowing in my own comments... > --- > gcc/match.pd | 101 ++

Re: [PATCH 0/3] Libsanitizer: merge from trunk

2019-08-14 Thread Martin Liška
On 8/13/19 5:02 PM, Jeff Law wrote: > On 8/13/19 7:07 AM, Martin Liska wrote: >> Hi. >> >> For this year, I decided to make a first merge now and the >> next (much smaller) at the end of October. >> >> The biggest change is rename of many files from .cc to .cpp. >> >> I bootstrapped the patch set o

[committed][AArch64] Rework SVE integer comparisons

2019-08-14 Thread Richard Sandiford
The remaining uses of UNSPEC_MERGE_PTRUE were in integer comparison patterns. These aren't actually merging operations but zeroing ones, although there's no practical difference when the predicate is a PTRUE. All comparisons produced by expand are predicated on a PTRUE, although we try to pattern

[committed][AArch64] Handle more SVE predicate constants

2019-08-14 Thread Richard Sandiford
This patch handles more predicate constants by using TRN1, TRN2 and EOR. For now, only one operation is allowed before we fall back to loading from memory or doing an integer move and a compare. The EOR support includes the important special case of an inverted predicate. The real motivating case

[committed][AArch64] Use SVE ADR to optimise shift-add sequences

2019-08-14 Thread Richard Sandiford
This patch uses SVE ADR to optimise shift-and-add and uxtw-and-add sequences. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274436. Richard 2019-08-14 Richard Sandiford gcc/ * config/aarch64/predicates.md (const_1_to_3_operand): New predicate.

[committed][AArch64] Add support for SVE CLS and CLZ

2019-08-14 Thread Richard Sandiford
This patch adds support for unpredicated SVE CLS and CLZ. A later patch will add support for predicated unary integer arithmetic. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274437. Richard 2019-08-14 Richard Sandiford gcc/ * config/aarch64/it

[committed][AArch64] Add support for SVE CNOT

2019-08-14 Thread Richard Sandiford
This patch adds support for predicated and unpredicated CNOT (logical NOT on integers). In RTL terms, this is a select between 1 and 0 in which the predicate is fed by a comparison with zero. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274438. Richard 201

Re: [PATCH][RFC][x86] Fix PR91154, add SImode smax, allow SImode add in SSE regs

2019-08-14 Thread Richard Biener
On Tue, 13 Aug 2019, Jeff Law wrote: > On 8/9/19 7:00 AM, Richard Biener wrote: > > > > It fixes the slowdown observed in 416.gamess and 464.h264ref. > > > > Bootstrapped on x86_64-unknown-linux-gnu, testing still in progress. > > > > CCing Jeff who "knows RTL". > What specifically do you want

[committed][AArch64] Add support for SVE [SU]{MAX,MIN} immediate

2019-08-14 Thread Richard Sandiford
This patch adds support for the immediate forms of SVE SMAX, SMIN, UMAX and UMIN. SMAX and SMIN take the same range as MUL, so the patch basically just moves and generalises the existing MUL patterns. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274439. Rich

[committed][AArch64] Add support for SVE F{MAX,MIN}NM immediate

2019-08-14 Thread Richard Sandiford
This patch uses the immediate forms of FMAXNM and FMINNM for unconditional arithmetic. The same rules apply to FMAX and FMIN, but we only generate those via the ACLE. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274440. Richard 2019-08-14 Richard Sandifor

[committed][AArch64] Make more use of SVE conditional constant moves

2019-08-14 Thread Richard Sandiford
This patch extends the SVE UNSPEC_SEL patterns so that they can use: (1) MOV /M of a duplicated integer constant (2) MOV /M of a duplicated floating-point constant bitcast to an integer, accepting the same constants as (1) (3) FMOV /M of a duplicated floating-point constant (4) MOV /Z of a dup

[committed][AArch64] Use SVE MOV /M of scalars

2019-08-14 Thread Richard Sandiford
This patch uses MOV /M to optimise selects between a duplicated scalar variable and a vector. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274442. Richard 2019-08-14 Richard Sandiford Kugan Vivekanandarajah gcc/ * config/aarch64/aa

Re: [PATCH][RFC][x86] Fix PR91154, add SImode smax, allow SImode add in SSE regs

2019-08-14 Thread Uros Bizjak
On Wed, Aug 14, 2019 at 11:08 AM Richard Biener wrote: > > On Tue, 13 Aug 2019, Jeff Law wrote: > > > On 8/9/19 7:00 AM, Richard Biener wrote: > > > > > > It fixes the slowdown observed in 416.gamess and 464.h264ref. > > > > > > Bootstrapped on x86_64-unknown-linux-gnu, testing still in progress.

[committed][AArch64] Add support for SVE absolute comparisons

2019-08-14 Thread Richard Sandiford
This patch adds support for floating-point absolute comparisons FACLT and FACLE (aliased as FACGT and FACGE with swapped operands). Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274443. Richard 2019-08-14 Richard Sandiford gcc/ * config/aarch64/i

Re: [PATCH 1/3] Perform fold when propagating.

2019-08-14 Thread Richard Biener
On Tue, Aug 13, 2019 at 1:24 PM Robin Dapp wrote: > > > May I suggest to add a parameter to the substitute-and-fold engine > > so we can do the folding on all stmts only when enabled and enable > > it just for VRP? That also avoids the testsuite noise. > > Would something along these lines do? >

Re: [PATCH][testsuite] Fix PR91419

2019-08-14 Thread Richard Biener
On Tue, 13 Aug 2019, Hans-Peter Nilsson wrote: > > From: Richard Biener > > Date: Tue, 13 Aug 2019 09:50:34 +0200 > > > 2019-08-13 Richard Biener > > > > PR testsuite/91419 > > * lib/target-supports.exp (natural_alignment_32): Amend target > > list based on BIGGEST_ALIGNMENT. > >

[Ada] Illegal selection of first object in a task type's body not detected

2019-08-14 Thread Pierre-Marie de Rodat
The compiler was improperly allowing selection of an object declared within a task body when the prefix was of the task type, specifically in the case where the object was the very first declared in the body (selections of later body declarations were being flagged). The flag Is_Private_Op was onl

[Ada] Fix failing assertions on SPARK elaboration

2019-08-14 Thread Pierre-Marie de Rodat
Checking of SPARK elaboration rules may lead to assertion failures on a compiler built with assertions. Now fixed. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-14 Yannick Moy gcc/ada/ * sem_disp.adb (Check_Dispatching_Operation): Updat

[Ada] Crash on precondition involving quantified expression

2019-08-14 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort on a precondition whose condition includes a quantified expression. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-14 Ed Schonberg gcc/ada/ * sem_util.adb (New_Copy_Tree, Visit_Entity): A quantified expression includes the implicit

[Ada] Fix discrepancy in mechanism tracking private and full views

2019-08-14 Thread Pierre-Marie de Rodat
This fixes a discrepancy in the mechanism tracking the private and full views of entities when entering and leaving scopes. This mechanism records private entities that are dependent on other private entities, so that the exchange done on entering and leaving scopes can be propagated. The propaga

[Ada] Spurious error in discriminated aggregate

2019-08-14 Thread Pierre-Marie de Rodat
This patch fixes a bug in which a spurious error is given on an aggregate of a type derived from a subtype with a constrained discriminant. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-14 Bob Duff gcc/ada/ * exp_aggr.adb (Init_Hidden_Discriminants): Avoid processing the

[Ada] Expose part of ownership checking for use in GNATprove

2019-08-14 Thread Pierre-Marie de Rodat
GNATprove needs to be able to call a subset of the ownership legality rules from marking. This is provided by a new function Sem_SPARK.Is_Legal. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-14 Yannick Moy gcc/ada/ * sem_spark.adb, sem_

[Ada] Equality for nonabstract type derived from interface treated as abstract

2019-08-14 Thread Pierre-Marie de Rodat
The compiler was creating an abstract function for the equality operation of a (nonlimited) interface type, and that could result in errors on generic instantiations that are passed nonabstract types derived from the interface type along with the derived type's inherited equality operation (complai

[Ada] Strengthen Locked flag

2019-08-14 Thread Pierre-Marie de Rodat
This patch strengthens the Locked flag, by Asserting that it is False on operations that might cause reallocation. No change in behavior (except in the presence of compiler bugs), so no test. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-14 Bob Duff gcc/ada/ * table.adb:

[Ada] Crash on quantified expression in disabled assertion

2019-08-14 Thread Pierre-Marie de Rodat
The defining identifier of a quantified expression may be the freeze point of its type. If the quantified expression appears in an assertion that is disavbled, the freeze node for that type may appear in a tree that will be discarded when the enclosing pragma is elaborated. To ensure that the free

[Ada] Warn about unknown condition in Compile_Time_Warning

2019-08-14 Thread Pierre-Marie de Rodat
The compiler now warns if the condition in a pragma Compile_Time_Warning or Compile_Time_Error does not have a compile-time-known value. The warning is not given for pragmas in a generic template, but is given for pragmas in an instance. The -gnatw_c and -gnatw_C switches turn the warning on and o

[Ada] Fix spurious ownership error in GNATprove

2019-08-14 Thread Pierre-Marie de Rodat
Like Is_Path_Expression, function Is_Subpath_Expression should consider the possibility that the subpath is a type conversion or type qualification over the actual subpath node. This avoids spurious ownership errors in GNATprove. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, c

[Ada] Alignment may be specified as zero

2019-08-14 Thread Pierre-Marie de Rodat
An Alignment clause or an aspect_specification for Alignment may be specified as 0, which is treated the same as 1. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-14 Bob Duff gcc/ada/ * sem_ch13.adb (Get_Alignment_Value): Return 1 for Alignment 0, and do not give a

[Ada] Incorrect error on inline protected function

2019-08-14 Thread Pierre-Marie de Rodat
This patch fixes a bug where if a protected function has a pragma Inline, and has no local variables, and the body consists of a single extended_return_statement, and the result type is an indefinite composite subtype, and inlining is enabled, the compiler gives an error, even though the program is

[Ada] Check SPARK restriction on Old/Loop_Entry with pointers

2019-08-14 Thread Pierre-Marie de Rodat
SPARK RM rule 3.10(14) restricts the use of Old and Loop_Entry attributes on prefixes of an owning or observing type (i.e. a type with access inside). There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-14 Yannick Moy gcc/ada/ * sem_spark.adb

[Ada] Improve performance of Containers.Functional_Base

2019-08-14 Thread Pierre-Marie de Rodat
This patch modifies the implementation of Functional_Base to damp the cost of its subprograms at runtime in specific cases. Instead of copying the entire underlying array to create a new container, containers can share the same Array_Base attribute. Performance on common use cases of formal and fun

[Ada] Fix internal error on inlined subprogram instance

2019-08-14 Thread Pierre-Marie de Rodat
This fixes a long-standing oddity in the procedure analyzing the instantiation of a generic subprogram, which would set the Is_Generic_Instance flag on the enclosing package generated for the instantiation but only to reset it a few lines below. Now this flag is relied upon by the machinery which

[Ada] Compiler speedup with inlining across units

2019-08-14 Thread Pierre-Marie de Rodat
This change is aimed at speeding up the inlining across units done by the Ada compiler when -gnatn is specified and in the presence of units instantiating a lot of generic packages. The current implementation is as follows: when a generic package is being instantiated, the compiler scans its spec

Re: [PATCH 2/2] Add more entries to the C++ get_std_name_hint array

2019-08-14 Thread Jonathan Wakely
On 13/08/19 16:08 -0400, Jason Merrill wrote: On 8/13/19 9:36 AM, Jonathan Wakely wrote: This adds some commonly-used C++11/14 names, and some new C++17/20 names. The latter aren't available when using the -std=gnu++14 default, so the fix-it suggesting to use a newer dialect is helpful. * n

[PING] [PATCHv4] Fix not 8-byte aligned ldrd/strd on ARMv5 (PR 89544)

2019-08-14 Thread Bernd Edlinger
Hi! I'd like to ping for this patch: https://gcc.gnu.org/ml/gcc-patches/2019-08/msg00546.html Thanks Bernd.

[committed][AArch64] Add SVE conditional integer unary patterns

2019-08-14 Thread Richard Sandiford
This patch adds patterns to match conditional unary operations on integers. At the moment we rely on combine to merge separate arithmetic and vcond_mask operations, and since the latter doesn't accept zero operands, we miss out on the opportunity to use the movprfx /z alternative. (This alternati

[committed][AArch64] Add SVE conditional floating-point unary patterns

2019-08-14 Thread Richard Sandiford
This patch adds patterns to match conditional unary operations on floating-point modes. At the moment we rely on combine to merge separate arithmetic and vcond_mask operations, and since the latter doesn't accept zero operands, we miss out on the opportunity to use the movprfx /z alternative. (Th

[committed][AArch64] Add SVE conditional conversion patterns

2019-08-14 Thread Richard Sandiford
This patch adds patterns to match conditional conversions between integers and like-sized floats. The patterns are actually more general than that, but the other combinations can only be tested via the ACLE. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274478

[committed][AArch64] Use SVE UXT[BHW] as a form of predicated AND

2019-08-14 Thread Richard Sandiford
UXTB, UXTH and UXTW are equivalent to predicated ANDs with the constants 0xff, 0x and 0x respectively. This patch uses them in the patterns for IFN_COND_AND. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274479. Richard 2019-08-14 Richard Sandi

Re: [PATCH 1/2] PR c++/91436 fix C++ dialect for std::make_unique fix-it hint

2019-08-14 Thread Jonathan Wakely
On 13/08/19 16:07 -0400, Jason Merrill wrote: On 8/13/19 9:32 AM, Jonathan Wakely wrote: * g++.dg/lookup/missing-std-include-6.C: Don't check make_unique in test that runs for C++11. I'm not comfortable removing this test coverage entirely. Doesn't it give a useful diagnostic in C++1

[committed][AArch64] Use SVE BIC for conditional arithmetic

2019-08-14 Thread Richard Sandiford
This patch uses BIC to pattern-match conditional AND with an inverted third input. It also adds extra tests for AND, ORR and EOR. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274480. Richard 2019-08-14 Richard Sandiford Kugan Vivekanandaraja

Re: [PATCHv3] Fix not 8-byte aligned ldrd/strd on ARMv5 (PR 89544)

2019-08-14 Thread Richard Biener
On Fri, 2 Aug 2019, Bernd Edlinger wrote: > On 8/2/19 3:11 PM, Richard Biener wrote: > > On Tue, 30 Jul 2019, Bernd Edlinger wrote: > > > >> > >> I have no test coverage for the movmisalign optab though, so I > >> rely on your code review for that part. > > > > It looks OK. I tried to make it t

Re: [PATCH] PR libstdc++/90361 add missing macro definition

2019-08-14 Thread Jonathan Wakely
On 12/08/19 17:41 +0100, Jonathan Wakely wrote: The src/c++17/string-inst.cc file needs to override the default string ABI so that it still contains the expected symbols even when the library is configured with --with-default-libstdcxx-abi=gcc4-compatible. PR libstdc++/90361 * sr

[PATCH 0/2] Fix dangling pointer in next_nested.

2019-08-14 Thread Martin Liska
Hi. First patch is about addition of a nested/origin/next_nested verification. The verification can find the issue in Ada run-time library on x86_64 without bootstrap. The second patch is fix where we need to clean up the field. Patch can bootstrap on x86_64-linux-gnu and survives regression tes

[PATCH 2/2] Clean next_nested properly.

2019-08-14 Thread Martin Liska
gcc/ChangeLog: 2019-08-14 Martin Liska PR ipa/91438 * cgraph.c (cgraph_node::remove): When setting n->origin = NULL for all nested functions, reset also next_nested. --- gcc/cgraph.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git

[PATCH 1/2] Add ::verify for cgraph_node::origin/nested/next_nested.

2019-08-14 Thread Martin Liska
gcc/ChangeLog: 2019-08-14 Martin Liska * cgraph.c (cgraph_node::verify_node): Verify origin, nested and next_nested. --- gcc/cgraph.c | 24 1 file changed, 24 insertions(+) diff --git a/gcc/cgraph.c b/gcc/cgraph.c index ed46d81a513..eb38b905879 10064

Re: [PATCHv4] Fix not 8-byte aligned ldrd/strd on ARMv5 (PR 89544)

2019-08-14 Thread Richard Biener
On Thu, 8 Aug 2019, Bernd Edlinger wrote: > On 8/2/19 9:01 PM, Bernd Edlinger wrote: > > On 8/2/19 3:11 PM, Richard Biener wrote: > >> On Tue, 30 Jul 2019, Bernd Edlinger wrote: > >> > >>> > >>> I have no test coverage for the movmisalign optab though, so I > >>> rely on your code review for that

Re: [PATCH] Add generic support for "noinit" attribute

2019-08-14 Thread Richard Sandiford
Sorry for the slow response, I'd missed that there was an updated patch... Christophe Lyon writes: > 2019-07-04 Christophe Lyon > > * lib/target-supports.exp (check_effective_target_noinit): New > proc. > * gcc.c-torture/execute/noinit-attribute.c: New test. S

Add IFN_COND functions for shifting

2019-08-14 Thread Richard Sandiford
This patch adds support for IFN_COND shifts left and shifts right. This is mostly mechanical, but since we try to handle conditional operations in the same way as unconditional operations in match.pd, we need to support IFN_COND shifts by scalars as well as vectors. E.g.: IFN_COND_SHL (cond, a,

Re: [PATCH 5/9] Come up with an abstraction.

2019-08-14 Thread Richard Biener
On Mon, Aug 12, 2019 at 3:56 PM Martin Liška wrote: > > On 8/12/19 2:43 PM, Richard Biener wrote: > > On Mon, Aug 12, 2019 at 1:49 PM Martin Liška wrote: > >> > >> On 8/12/19 1:40 PM, Richard Biener wrote: > >>> On Mon, Aug 12, 2019 at 1:19 PM Martin Liška wrote: > > On 8/8/19 5:55 PM,

Re: C++ PATCH for c++/91391 - bogus -Wcomma-subscript warning

2019-08-14 Thread Marek Polacek
Ping. On Wed, Aug 07, 2019 at 04:05:53PM -0400, Marek Polacek wrote: > When implementing -Wcomma-subscript I failed to realize that a comma in > a template-argument-list shouldn't be warned about. > > But we can't simply ignore any commas inside < ... > because the following > needs to be caught:

Re: [PATCH] Add generic support for "noinit" attribute

2019-08-14 Thread Christophe Lyon
On Wed, 14 Aug 2019 at 14:14, Richard Sandiford wrote: > > Sorry for the slow response, I'd missed that there was an updated patch... > > Christophe Lyon writes: > > 2019-07-04 Christophe Lyon > > > > * lib/target-supports.exp (check_effective_target_noinit): New > > proc. > >

Re: [PATCH 5/9] Come up with an abstraction.

2019-08-14 Thread Martin Liška
On 8/14/19 3:04 PM, Richard Biener wrote: > On Mon, Aug 12, 2019 at 3:56 PM Martin Liška wrote: >> >> On 8/12/19 2:43 PM, Richard Biener wrote: >>> On Mon, Aug 12, 2019 at 1:49 PM Martin Liška wrote: On 8/12/19 1:40 PM, Richard Biener wrote: > On Mon, Aug 12, 2019 at 1:19 PM Martin

[PATCH] Make GIMPLE forwprop DCE dead stmts

2019-08-14 Thread Richard Biener
The following patch makes forwprop DCE the stmts that become dead because of propagation of copies and constants. For this to work we actually have to do that reliably rather than relying on fold_stmt doing this for us. This hits fortran/trans-intrinsic.c in a way that we do "interesting" jump

Re: types for VR_VARYING

2019-08-14 Thread Andrew MacLeod
On 8/13/19 8:39 PM, Aldy Hernandez wrote: Yes, it was 2X. I noticed that Richi made some changes to the lattice handling for VARYING while the discussion was on-going.  I missed these, and had failed to adapt the patch for it.  I would appreciate a final review of the attached patch, especi

Re: [PATCH 5/9] Come up with an abstraction.

2019-08-14 Thread Richard Biener
On Wed, Aug 14, 2019 at 3:19 PM Martin Liška wrote: > > On 8/14/19 3:04 PM, Richard Biener wrote: > > On Mon, Aug 12, 2019 at 3:56 PM Martin Liška wrote: > >> > >> On 8/12/19 2:43 PM, Richard Biener wrote: > >>> On Mon, Aug 12, 2019 at 1:49 PM Martin Liška wrote: > > On 8/12/19 1:40 PM

Re: types for VR_VARYING

2019-08-14 Thread Aldy Hernandez
On 8/14/19 9:50 AM, Andrew MacLeod wrote: On 8/13/19 8:39 PM, Aldy Hernandez wrote: Yes, it was 2X. I noticed that Richi made some changes to the lattice handling for VARYING while the discussion was on-going.  I missed these, and had failed to adapt the patch for it.  I would appreciate

Re: [PATCH 1/2] PR c++/91436 fix C++ dialect for std::make_unique fix-it hint

2019-08-14 Thread Jason Merrill
On Wed, Aug 14, 2019 at 7:02 AM Jonathan Wakely wrote: > > On 13/08/19 16:07 -0400, Jason Merrill wrote: > >On 8/13/19 9:32 AM, Jonathan Wakely wrote: > >> * g++.dg/lookup/missing-std-include-6.C: Don't check make_unique in > >> test that runs for C++11. > > > >I'm not comfortable removing

Re: [PATCH 1/2] PR c++/91436 fix C++ dialect for std::make_unique fix-it hint

2019-08-14 Thread David Malcolm
On Wed, 2019-08-14 at 12:02 +0100, Jonathan Wakely wrote: > On 13/08/19 16:07 -0400, Jason Merrill wrote: > > On 8/13/19 9:32 AM, Jonathan Wakely wrote: > > > * g++.dg/lookup/missing-std-include-6.C: Don't check > > > make_unique in > > > test that runs for C++11. > > > > I'm not comfortab

Re: C++ PATCH for c++/91391 - bogus -Wcomma-subscript warning

2019-08-14 Thread Jason Merrill
On 8/14/19 9:15 AM, Marek Polacek wrote: Ping. On Wed, Aug 07, 2019 at 04:05:53PM -0400, Marek Polacek wrote: When implementing -Wcomma-subscript I failed to realize that a comma in a template-argument-list shouldn't be warned about. But we can't simply ignore any commas inside < ... > because

Re: [PATCH 1/2] PR c++/91436 fix C++ dialect for std::make_unique fix-it hint

2019-08-14 Thread Jason Merrill
On 8/14/19 10:39 AM, David Malcolm wrote: On Wed, 2019-08-14 at 12:02 +0100, Jonathan Wakely wrote: On 13/08/19 16:07 -0400, Jason Merrill wrote: On 8/13/19 9:32 AM, Jonathan Wakely wrote: * g++.dg/lookup/missing-std-include-6.C: Don't check make_unique in test that runs for C++11.

[SVE] PR86753

2019-08-14 Thread Prathamesh Kulkarni
Hi, The attached patch tries to fix PR86753. For following test: void f1 (int *restrict x, int *restrict y, int *restrict z) { for (int i = 0; i < 100; ++i) x[i] = y[i] ? z[i] : 10; } vect dump shows: vect_cst__42 = { 0, ... }; vect_cst__48 = { 0, ... }; vect__4.7_41 = .MASK_LOAD (ve

Re: [PATCH 2/3] C++20 constexpr lib part 2/3 - swappish functions.

2019-08-14 Thread Ed Smith-Rowland via gcc-patches
On 8/13/19 7:14 AM, Jonathan Wakely wrote: On 01/08/19 13:16 -0400, Ed Smith-Rowland via libstdc++ wrote: Greetings, Here is a patch for C++20 p0879 - Constexpr for swap and swap related functions. This essentially constexprifies the rest of . Built and tested with C++20 (and pre-c++20) on

Re: [PATCH 1/2] PR c++/91436 fix C++ dialect for std::make_unique fix-it hint

2019-08-14 Thread Jonathan Wakely
On 14/08/19 10:39 -0400, David Malcolm wrote: On Wed, 2019-08-14 at 12:02 +0100, Jonathan Wakely wrote: On 13/08/19 16:07 -0400, Jason Merrill wrote: > On 8/13/19 9:32 AM, Jonathan Wakely wrote: > > * g++.dg/lookup/missing-std-include-6.C: Don't check > > make_unique in > > test that run

RE: [PATCH] Add generic support for "noinit" attribute

2019-08-14 Thread Tamar Christina
Hi Christoph, The noinit testcase is currently failing on x86_64. Is the test supposed to be running there? Thanks, Tamar -Original Message- From: gcc-patches-ow...@gcc.gnu.org On Behalf Of Christophe Lyon Sent: Wednesday, August 14, 2019 2:18 PM To: Christophe Lyon ; Martin Sebor ;

Re: [PATCH 2/3] C++20 constexpr lib part 2/3 - swappish functions.

2019-08-14 Thread Jonathan Wakely
On 14/08/19 11:06 -0400, Ed Smith-Rowland wrote: I this OK after it passes testing? Ed 2019-08-14 Edward Smith-Rowland <3dw...@verizon.net> Implement C++20 p0879 - Constexpr for swap and swap related functions. * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algo

Re: [PATCH] fold more string comparison with known result (PR 90879)

2019-08-14 Thread Martin Sebor
On 8/12/19 7:40 AM, Michael Matz wrote: Hi, On Fri, 9 Aug 2019, Martin Sebor wrote: The solution introduced in C99 is a flexible array. C++ compilers usually support it as well. Those that don't are likely to support the zero-length array (even Visual C++ does). If there's a chance that some

Re: [PATCH 0/3] Libsanitizer: merge from trunk

2019-08-14 Thread Jeff Law
On 8/14/19 2:50 AM, Martin Liška wrote: > On 8/13/19 5:02 PM, Jeff Law wrote: >> On 8/13/19 7:07 AM, Martin Liska wrote: >>> Hi. >>> >>> For this year, I decided to make a first merge now and the >>> next (much smaller) at the end of October. >>> >>> The biggest change is rename of many files from

Re: [PATCH] fix and improve strlen conditional handling of merged stores (PR 91183, 91294, 91315)

2019-08-14 Thread Martin Sebor
On 8/12/19 1:57 PM, Jeff Law wrote: On 8/9/19 5:42 PM, Martin Sebor wrote: @@ -3408,7 +3457,13 @@ static bool   }       gimple *stmt = SSA_NAME_DEF_STMT (exp); -  if (gimple_code (stmt) != GIMPLE_PHI) +  if (gimple_assign_single_p (stmt)) +    { +  tree rhs = gimple_assign_

Re: [PATCH] fix and improve strlen conditional handling of merged stores (PR 91183, 91294, 91315)

2019-08-14 Thread Martin Sebor
Do you want me to post another revision with the gimple_assign_single_p test removed? I think remove that hunk, bootstrap, test, commit and post for archival purposes.  I do not think another round of review is necessary. Done in r274486 (also attached). I should add that the early store merg

Re: [SVE] PR86753

2019-08-14 Thread Richard Biener
On Wed, Aug 14, 2019 at 5:06 PM Prathamesh Kulkarni wrote: > > Hi, > The attached patch tries to fix PR86753. > > For following test: > void > f1 (int *restrict x, int *restrict y, int *restrict z) > { > for (int i = 0; i < 100; ++i) > x[i] = y[i] ? z[i] : 10; > } > > vect dump shows: > ve

Re: [SVE] PR86753

2019-08-14 Thread Richard Biener
On Wed, Aug 14, 2019 at 6:49 PM Richard Biener wrote: > > On Wed, Aug 14, 2019 at 5:06 PM Prathamesh Kulkarni > wrote: > > > > Hi, > > The attached patch tries to fix PR86753. > > > > For following test: > > void > > f1 (int *restrict x, int *restrict y, int *restrict z) > > { > > for (int i =

Re: types for VR_VARYING

2019-08-14 Thread Jeff Law
On 8/14/19 8:15 AM, Aldy Hernandez wrote: > > > On 8/14/19 9:50 AM, Andrew MacLeod wrote: >> On 8/13/19 8:39 PM, Aldy Hernandez wrote: >>> >>> >>> Yes, it was 2X. >>> >>> I noticed that Richi made some changes to the lattice handling for >>> VARYING while the discussion was on-going.  I missed th

Re: [PATCH] Make GIMPLE forwprop DCE dead stmts

2019-08-14 Thread Jeff Law
On 8/14/19 7:36 AM, Richard Biener wrote: > > The following patch makes forwprop DCE the stmts that become dead > because of propagation of copies and constants. For this to work > we actually have to do that reliably rather than relying on > fold_stmt doing this for us. > > This hits fortran/tr

Re: [PATCH 1/2] Add ::verify for cgraph_node::origin/nested/next_nested.

2019-08-14 Thread Jeff Law
On 8/14/19 5:15 AM, Martin Liska wrote: > > gcc/ChangeLog: > > 2019-08-14 Martin Liska > > * cgraph.c (cgraph_node::verify_node): Verify origin, nested > and next_nested. > --- > gcc/cgraph.c | 24 > 1 file changed, 24 insertions(+) > OK. Jeff

Re: [PATCH 2/2] Clean next_nested properly.

2019-08-14 Thread Jeff Law
On 8/14/19 5:17 AM, Martin Liska wrote: > > gcc/ChangeLog: > > 2019-08-14 Martin Liska > > PR ipa/91438 > * cgraph.c (cgraph_node::remove): When setting > n->origin = NULL for all nested functions, reset > also next_nested. > --- > gcc/cgraph.c | 11 +++ > 1 f

Re: [PATCH] Add generic support for "noinit" attribute

2019-08-14 Thread Christophe Lyon
On Wed, 14 Aug 2019 at 17:59, Tamar Christina wrote: > > Hi Christoph, > > The noinit testcase is currently failing on x86_64. > > Is the test supposed to be running there? > No, there's an effective-target to skip it. But I notice a typo: +/* { dg-require-effective-target noinit */ (missing closi

Re: [PATCH] Automatics in equivalence statements

2019-08-14 Thread Jeff Law
On 8/14/19 2:45 AM, Mark Eggleston wrote: > I now have commit access. > > gcc/fortran > >     Jeff Law >     Mark Eggleston > >     * gfortran.h: Add gfc_check_conflict declaration. >     * symbol.c (check_conflict): Rename cfg_check_conflict and remove >     static. >     * symbol.c (cfg_chec

Re: Rewrite some jump.c routines to use flags

2019-08-14 Thread Joseph Myers
On Fri, 12 Jul 2019, Richard Sandiford wrote: > At least AIUI, __builtin_isunordered etc. don't raise an exception even > for signalling NaNs. __builtin_isunordered should raise "invalid" for signaling NaNs. (isunordered is the IEEE 754 operation compareQuietUnordered, and IEEE 754 specifies f

[PATCH] Simplify and generalize rust-demangle's unescaping logic.

2019-08-14 Thread Eduard-Mihai Burtescu
Previously, rust-demangle.c was special-casing a fixed number of '$uXY$' escapes, but 'XY' can technically be any hex value, representing some Unicode codepoint. This patch adds more general support for '$u...$' escapes, similar to https://github.com/alexcrichton/rustc-demangle/pull/29, but only f

Re: types for VR_VARYING

2019-08-14 Thread Jeff Law
On 8/13/19 6:39 PM, Aldy Hernandez wrote: > > > On 8/12/19 7:46 PM, Jeff Law wrote: >> On 8/12/19 12:43 PM, Aldy Hernandez wrote: >>> This is a fresh re-post of: >>> >>> https://gcc.gnu.org/ml/gcc-patches/2019-07/msg6.html >>> >>> Andrew gave me some feedback a week ago, and I obviously don't

[COMMITTED] Set memory alignment in expand_builtin_init_descriptor

2019-08-14 Thread Bernd Edlinger
Committed as r274487 with approval in https://gcc.gnu.org/ml/gcc-patches/2019-08/msg00974.html Index: gcc/builtins.c === --- gcc/builtins.c (revision 274486) +++ gcc/builtins.c (revision 274487) @@ -5756,6 +5756,7 @@ expan

Re: [PATCH 1/2] PR c++/91436 fix C++ dialect for std::make_unique fix-it hint

2019-08-14 Thread David Malcolm
On Wed, 2019-08-14 at 16:53 +0100, Jonathan Wakely wrote: > On 14/08/19 10:39 -0400, David Malcolm wrote: > > On Wed, 2019-08-14 at 12:02 +0100, Jonathan Wakely wrote: > > > On 13/08/19 16:07 -0400, Jason Merrill wrote: > > > > On 8/13/19 9:32 AM, Jonathan Wakely wrote: > > > > > * g++.dg/looku

Re: enforce canonicalization of value_range's

2019-08-14 Thread Jeff Law
On 8/13/19 6:51 PM, Aldy Hernandez wrote: >> Presumably this was better than moving the implementation earlier. > > Actually, it was for ease of review.  I made some changes to the > function, and I didn't want the reviewer to miss them because I had > moved the function wholesale.  I can move the

  1   2   >