[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

[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.

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 > >

[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][1/2][i386] STV changes, DImode chain cost

2019-08-14 Thread Uros Bizjak
On Tue, Aug 13, 2019 at 2:16 PM Richard Biener wrote: > > > The following splits out the DImode chain cost changes from the > patch adding SImode chain handling. There are two main parts: > > 1) fix REG_P (src) && REG_P (dst) costing which currently favors >SSE because we use COSTS_N_INSNS

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] 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

[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

[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

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

[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

[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

[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

[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

[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

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.

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,

[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

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? >

[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

[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,

[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

[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):

[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

[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

[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

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

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 *

[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

[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

[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

[PATCH], Patch #3 of 10, Add prefixed addressing support

2019-08-14 Thread Michael Meissner
This patch adds prefixed memory support to all offsettable instructions. Unlike previous versions of the patch, this patch combines all of the modifications for addressing to one patch. Previously, I had 3 separate patches (one for PADDI, one for scalar types, and one for vector types).

[PATCH], Patch #7 of 10, Add support for PCREL_OPT

2019-08-14 Thread Michael Meissner
This patch adds a new RTL pass that occurs before the final pass to implement the PCREL_OPT optimization that is implemented by the linker. Without this optimization, access to external symbols loads up the address from a .GOT section and does the normal operation. For example: extern

PC-relative TLS support

2019-08-14 Thread Alan Modra
Supporting TLS for -mpcrel turns out to be relatively simple, in part due to deciding that !TARGET_TLS_MARKERS with -mpcrel is silly. No assembler that I know of supporting prefix insns lacks TLS marker support. Also, at some point powerpc gcc ought to remove !TARGET_TLS_MARKERS generally and

C++ PATCH to implement C++20 P1143R2, constinit (PR c++/91360)

2019-08-14 Thread Marek Polacek
This patch implements the C++20 specifier constinit, as described in . It makes sure that the compiler requires constant initialization of a variable (it can only be applied to variables with static or thread storage duration). Note the variable is *not* const; it is

[PATCH], Patch #2 of 10, Add RTL prefixed attribute

2019-08-14 Thread Michael Meissner
This patch adds the RTL attribute "prefixed" that says this particular instruction is a prefixed instruction. The target hooks FINAL_SCAN_INSN and ASM_OUTPUT_OPCODE are defined. If the insn is prefixed, ASM_OUTPUT_OPCODE will emit a leading 'p' before the instruction is emitted. For example, a

[PATCH 2/8] bpf: new GCC port

2019-08-14 Thread Jose E. Marchesi
This patch adds a port for the Linux kernel eBPF architecture to GCC. ChangeLog: * configure.ac: Support for bpf-*-* targets. * configure: Regenerate. contrib/ChangeLog: * config-list.mk (LIST): Disable go in bpf-*-* targets. gcc/ChangeLog: * config.gcc: Support for bpf-*-*

[PATCH], Patch #8 of 10, Miscellaneous future tests

2019-08-14 Thread Michael Meissner
This patch adds miscellaneous tests for the new prefixed addressing. With patches 1-7 applied, these patches all succeed. Can I check these patches into the trunk? 2019-08-14 Michael Meissner * gcc/testsuite/gcc.target/powerpc/prefix-odd-memory.c: New test. *

[PATCH 6/8] bpf: adjust GCC testsuite to eBPF limitations

2019-08-14 Thread Jose E. Marchesi
This patch makes many tests in gcc.dg and gcc.c-torture to be skipped in bpf-*-* targets. This is due to the many limitations imposed by eBPF to what would be perfectly valid C code: no support for indirect calls, no support for more than 5 arguments to function calls, no support for indirect

[PATCH 4/8] bpf: gcc.target eBPF testsuite

2019-08-14 Thread Jose E. Marchesi
This patch adds a new testsuite to gcc.target, with eBPF specific tests. Tests are included for: - Target specific diagnostics. - All built-in functions. testsuite/ChangeLog: * gcc.target/bpf/bpf.exp: New file. * gcc.target/bpf/builtin-load.c: Likewise. *

[PATCH 7/8] bpf: manual updates for eBPF

2019-08-14 Thread Jose E. Marchesi
gcc/ChangeLog: * doc/invoke.texi (Option Summary): Cover eBPF. (eBPF Options): New section. * doc/extend.texi (BPF Built-in Functions): Likewise. (BPF Kernel Helpers): Likewise. --- gcc/ChangeLog | 7 +++ gcc/doc/extend.texi | 171

[PATCH], Patch #4 of 10, Adjust costs based on insn sizes

2019-08-14 Thread Michael Meissner
Some of the cost functions in the PowerPC compiler uses the length of the instruction to factor in the costs. This patches adjusts this calculation so that prefixed instructions are treated as the same cost as non-prefixed instructions. I forgot to mention in the previous patchs, all 10 of the

Re: [PATCH 0/8] eBPF support for GCC

2019-08-14 Thread Jose E. Marchesi
> The second patch adds the new GCC port proper. Machine description, > implementation of target hooks and macros, command-line options and > the like. Looks like [PATCH 2/8] didn't make it to the mailing list for some reason (maybe it exceeded a size limit?) Yeah the

PowerPC 'future' patches introduction

2019-08-14 Thread Michael Meissner
I will be submitting 10 patches will that will add support to GCC for a possible future PowerPC processor. These patches add support for new instructions that extend the offsettable memory instructions (D, DS, or DQ instruction formats) to have 34 bit offsets (instead of 16, 14, or 12 bits

[PATCH], Patch #1 of 10, Add instruction format enumeration

2019-08-14 Thread Michael Meissner
This patch implements the insn_form enumeration that identifies which types of instruction format is used for memory instruction. While the PowerPC has additional formats, the instruction formats that we need to use are: INSN_FORM_D -- Traditional D-form instructions (16 bits

[PATCH], Patch #6 of 10, Add 'future' support to function attributes

2019-08-14 Thread Michael Meissner
This patch adds support for using cpu=future in the "target" function attribute, "target" pragma support, and "target_clones" function attributes. In addition, it adds support for the following arguments to __builtin_cpu_supports: "arch_3_1" Whether ISA 3.1 is supported by the

Re: PowerPC 'future' patches introduction

2019-08-14 Thread Segher Boessenkool
Hi Mike, On Wed, Aug 14, 2019 at 04:57:32PM -0400, Michael Meissner wrote: > to the current location instead of a base register, giving pc-relative > addressing. Pc-relative addressing will be supported in the next ABI (3.1) as > an alternative to the current TOC based addressing. That's not an

[PATCH 0/8] eBPF support for GCC

2019-08-14 Thread Jose E. Marchesi
Hi people! This patch series introduces a port of GCC to eBPF, which is a virtual machine that resides in the Linux kernel. Initially intended for user-level packet capture and filtering, eBPF is nowadays generalized to serve as a general-purpose infrastructure also for non-networking purposes.

[PATCH 1/8] Update config.sub and config.guess.

2019-08-14 Thread Jose E. Marchesi
* config.sub: Import upstream version 2019-06-30. * config.guess: Import upstream version 2019-07-24. --- ChangeLog| 5 ++ config.guess | 264 +++ config.sub | 50 +-- 3 files changed, 240 insertions(+), 79

[PATCH 8/8] bpf: add myself as the maintainer for the eBPF port

2019-08-14 Thread Jose E. Marchesi
ChangeLog: * MAINTAINERS: Add myself as the maintainer for the eBPF port. --- ChangeLog | 4 MAINTAINERS | 1 + 2 files changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 912663c4497..cbd6f904944 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -57,6 +57,7 @@ arm

[PATCH 5/8] bpf: make target-supports.exp aware of eBPF

2019-08-14 Thread Jose E. Marchesi
This patch makes the several effective target checks in target-supports.exp to be aware of eBPF targets. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_malloc): New function. (check_effective_target_trampolines): Adapt to eBPF.

[PATCH 3/8] bpf: new libgcc port

2019-08-14 Thread Jose E. Marchesi
This patch adds an eBPF port to libgcc. As of today, compiled eBPF programs do not support a single-entry point schema. Instead, a BPF "executable" is a relocatable ELF object file containing multiple entry points, in certain named sections. Also, the BPF loaders in the kernel do not execute

Re: [PATCH 0/8] eBPF support for GCC

2019-08-14 Thread David Malcolm
On Wed, 2019-08-14 at 23:36 +0200, Jose E. Marchesi wrote: > Hi people! > [...] > The second patch adds the new GCC port proper. Machine description, > implementation of target hooks and macros, command-line options and > the like. Looks like [PATCH 2/8] didn't make it to the mailing list for

Re: [PATCH] i386: Expand roundeven for SSE4.1+

2019-08-14 Thread Joseph Myers
On Sun, 14 Jul 2019, Uros Bizjak wrote: > > This patch is for expanding roundeven inline for SSE4.1 and later. > > Note that this patch is to be applied on top of > > . The patch > > is bootstrapped and regression tested on

[PATCH], Patch #10 of 10, Add pc-relative tests

2019-08-14 Thread Michael Meissner
This patch adds tests to make sure the appropriate pc-relative instructions are generated for -mcpu=future. The tests in this patch all pass with patches 1-7 applied on a little endian power8 system running Linux. Once patches 1-7 have been applied, can I check these patches into the trunk?

[PATCH], Patch #9 of 10, Add tests with large memory offsets

2019-08-14 Thread Michael Meissner
This patch adds tests for all of the types using large address offsets that would not fit into 16 bits, and verifies that prefixed instructions are generated. The tests in this patch all succeed when patches 1-7 are applied on a little endian power8 system. Can I check these patches into the

Re: Patch to support extended characters in C/C++ identifiers

2019-08-14 Thread Jason Merrill
On 8/12/19 6:01 PM, Lewis Hyatt wrote: Hello- The attached patch for libcpp adds support for extended characters (e.g. UTF-8) in identifiers. A preliminary version of the patch was posted on PR c/67224 as Comment 26 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67224#c26) and discussed with

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

2019-08-14 Thread Bernd Edlinger
On 8/14/19 2:00 PM, Richard Biener wrote: > 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

[PATCH], Patch #5 of 10, Make -mpcrel default for -mcpu=future

2019-08-14 Thread Michael Meissner
This patch changes the default for -mcpu=future to turn on pc-relative addressing by default. I have built each of the patches in turn on a little endian power8 system doing a bootstrap and make check. There were no regressions. Can I check this patch into the trunk once the previous patches

[PATCH] Deprecate std::__is_nullptr_t type trait

2019-08-14 Thread Jonathan Wakely
This non-standard extension is redundant and unused by the library. * include/std/type_traits (__is_nullptr_t): Add deprecated attribute. We support std::is_null_pointer so don't need a non-standard trait that does the same thing. Tested x86_64-linux, committed to trunk. commit

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

2019-08-14 Thread Martin Sebor
On 8/13/19 4:46 PM, Jeff Law wrote: On 8/13/19 3:43 PM, Martin Sebor wrote: On 8/13/19 2:07 PM, Jeff Law wrote: On 8/9/19 10:51 AM, Martin Sebor wrote: PR tree-optimization/90879 - fold zero-equality of strcmp between a longer string and a smaller array gcc/c-family/ChangeLog: PR

Re: [SVE] PR86753

2019-08-14 Thread Richard Sandiford
Richard Biener writes: > 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

[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 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

[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

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.

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] 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/ *

[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

[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

[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

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

[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

[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.

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. *

[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 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.

[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

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

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

[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

[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/ *

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] 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

[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/ *

[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/ *

[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

[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,

[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

[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

[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

[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/ *

[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

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: 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,

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

  1   2   >