[PATCH][RFA/RFC] Stack clash mitigation patch 00 V3

2017-07-20 Thread Jeff Law
V3 patches of stack-clash mitigation should land tomorrow after another round of testing completes. Key changes this iteration: 1. For constant sized dynamic allocations we'll allocate/probe up to 4 STACK_CLASH_PROTECTION_PROBE_INTERVAL regions inline and unrolled. 2. For larger const

[PING][Arm] Obsoleting Command line option -mstructure-size-boundary in eabi configurations

2017-07-20 Thread Michael Collison
Ping. Updated patch posted here: https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00723.html

[PATCHv2][PR 59521] Respect __builtin_expect in switch statements

2017-07-20 Thread Yuri Gribov
Hi all, This patch adds support for __builtin_expect in switch statements at tree level (RTL part would be reviewed/commited separately). It's an update of https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01016.html , rebased and retested. Ok for trunk? -Y pr59521-2.patch Description: Binary dat

Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-07-20 Thread Yuri Gribov
On Thu, Jul 20, 2017 at 8:41 PM, Steven Bosscher wrote: > On Tue, Jul 18, 2017 at 9:04 AM, Yuri Gribov wrote: >> Hi all, >> >> Currently all cases in switch statement are treated as having equal >> probabilities which causes suboptimal code as demonstrated in >> https://gcc.gnu.org/bugzilla/show_b

Re: Add support to trace comparison instructions and switch statements

2017-07-20 Thread 吴潍浠(此彼)
Hi Jeff I have signed the copyright assignment, and used the name 'Wish Wu' . Should I send you a copy of my assignment ? The attachment is my new patch with small changes. Codes are checked by ./contrib/check_GNU_style.sh, except some special files. With --

Re: [PATCH] Kill TYPE_METHODS debug 1/9

2017-07-20 Thread Richard Biener
On July 21, 2017 12:03:58 AM GMT+02:00, Jim Wilson wrote: >On Thu, Jul 20, 2017 at 2:00 PM, Nathan Sidwell wrote: >> With this patch the gdb stabs test results are still awful, but they >are >> unchanged awfulness. > >Yes, the stabs support for C++ is poor. That is one of the reasons >why almos

Re: [PATCH] Kill TYPE_METHODS debug 1/9

2017-07-20 Thread Nathan Sidwell
On 07/20/2017 06:03 PM, Jim Wilson wrote: I wasn't sure what to make of your last message, so I tried to see if I could build a toolchain that defaults to stabs so I could look at this. I discovered that -freorder-functions doesn't work with stabs on an elf target, as we get a cross section lab

Enable crossjumping with bb-reorering

2017-07-20 Thread Jan Hubicka
Hello, Caroline disabled crossjumping with bb-reordering in initial patch implementing this pass. According to discussion with Rth it was only becuase she was unsure how to prevent crossjumping to mix up crossing and non-crossing jumps. THis is easy to do - we only need to avoid merging code acros

Fix profiledbootstrap

2017-07-20 Thread Jan Hubicka
Hi, this patch fixes ICE during profiledbootstrap about hot BB being dominated by cold. This is verified by RTL verify_flow_info and was added by Theresa along with patches to undo mistakes in in sane profile. The implementation is odd because this is not about dominance but reachability. It is a

libgo patch committed: Backport s390 syscall patch to earlier branches

2017-07-20 Thread Ian Lance Taylor
I've committed the appended patch to the GCC 5, 6, and 7 branches to backport https://golang.org/cl/48231, which fixes building libgo with recent versions of glibc on s390. Thanks to Jakub for testing the patch. Ian Index: libgo/go/syscall/syscall_linux_s390.go ===

Re: [PATCH] Kill TYPE_METHODS debug 1/9

2017-07-20 Thread Jim Wilson
On Thu, Jul 20, 2017 at 2:00 PM, Nathan Sidwell wrote: > With this patch the gdb stabs test results are still awful, but they are > unchanged awfulness. Yes, the stabs support for C++ is poor. That is one of the reasons why almost everyone has switched to dwarf2. I wasn't sure what to make of y

Re: [PATCH] Fix pr80044, -static and -pie insanity, and pr81170

2017-07-20 Thread H.J. Lu
On Tue, Jul 18, 2017 at 10:11 PM, Alan Modra wrote: > On Tue, Jul 18, 2017 at 07:49:48AM -0700, H.J. Lu wrote: >> The difference is with --enable-default-pie, the gcc driver doesn't pass >> both -pie and -static ld when "-static -pie" is used. Does your change >> pass both -pie and -static ld wh

Re: [PATCH] Kill TYPE_METHODS debug 1/9

2017-07-20 Thread Nathan Sidwell
A bit more poking showed that dbx's desire to put all methods of the same name in a single record was significant -- gdb requires that to build an overload set. So, this version of the dbxout changes is much smaller, in that we iterate the TYPE_FIELDS twice. There's the original scan, which j

Re: [PATCH, rs6000] 2/2 Add x86 MMX intrinsics DG tests to GCC PPC64LE taget

2017-07-20 Thread Segher Boessenkool
On Thu, Jul 20, 2017 at 09:48:13AM -0500, Steven Munroe wrote: > > > --- gcc/testsuite/gcc.target/powerpc/mmx-packs.c (nonexistent) > > > +++ gcc/testsuite/gcc.target/powerpc/mmx-packs.c (working copy) > > > @@ -0,0 +1,91 @@ > > > +/* { dg-do run } */ > > > +/* { dg-options "-O3 -mpower8-vector"

Go patch committed: Add backend type conversion for type assertion

2017-07-20 Thread Ian Lance Taylor
The current recipe in Type_guard_expression for creating a Bexpression performs a type conversion at the Type level, but doesn't invoke Backend::convert_expression to capture the conversion for the back end. This patch by Than McIntosh adds code to create a BE type conversion operation. Bootstrapp

Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-07-20 Thread Steven Bosscher
On Tue, Jul 18, 2017 at 9:04 AM, Yuri Gribov wrote: > Hi all, > > Currently all cases in switch statement are treated as having equal > probabilities which causes suboptimal code as demonstrated in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 . This patch > modifies expander to select pivot

Re: [PATCH] Implement std::pointer_traits::to_address as per P0653R0

2017-07-20 Thread Glen Fernandes
On Thu, Jul 20, 2017 at 12:53 PM, Jonathan Wakely wrote: > We have a more general problem with this, which is that if it's only > available for C++2a mode then we can't use the new feature in most of > the library. Which would be very unfortunate. I want to use this! > > In order to clean up the va

Re: [PATCH] Fix infinite recursion with div-by-zero (PR middle-end/70992)

2017-07-20 Thread Richard Biener
On July 20, 2017 4:20:00 PM GMT+02:00, Marek Polacek wrote: >On Thu, Jul 20, 2017 at 12:55:10PM +0200, Richard Biener wrote: >> On Wed, Jul 19, 2017 at 3:55 PM, Marek Polacek >wrote: >> > On Wed, Jul 19, 2017 at 12:45:12PM +0200, Richard Biener wrote: >> >> On Tue, Jul 18, 2017 at 6:05 PM, Marek

Re: [PATCH] Add -std=c++2a

2017-07-20 Thread Markus Trippelsdorf
On 2017.07.20 at 19:04 +0200, Markus Trippelsdorf wrote: > On 2017.07.20 at 09:33 -0400, Andrew Sutton wrote: > > This adds a new C++ dialect, enabled by -std=c++2a. > > > > libcpp/ > > Add support for C++2a. > > * include/cpplib.h (c_lang): Add CXX2A and GNUCXX2A. > >

Re: [PATCH] Add -std=c++2a

2017-07-20 Thread Andrew Sutton
For now, I think these two are incompatible. There are more features in -fconcepts than in C++20 (so far). There are also some changes in syntax and semantics that would be nice to diagnose. A good example would be 'concept' as a decl-specifier (TS) vs. 'concept' as a declaration introducer (WD).

Re: [PATCH] Add -std=c++2a

2017-07-20 Thread Markus Trippelsdorf
On 2017.07.20 at 09:33 -0400, Andrew Sutton wrote: > This adds a new C++ dialect, enabled by -std=c++2a. > > libcpp/ > Add support for C++2a. > * include/cpplib.h (c_lang): Add CXX2A and GNUCXX2A. > * init.c (lang_defaults): Add rows for CXX2A and GNUCXX2A. >

Re: [PATCH] Implement std::pointer_traits::to_address as per P0653R0

2017-07-20 Thread Jonathan Wakely
On 16/07/17 17:54 -0400, Glen Fernandes wrote: diff --git a/libstdc++-v3/include/bits/allocated_ptr.h b/libstdc++-v3/include/bits/allocated_ptr.h index 773b3f5..72e0179 100644 --- a/libstdc++-v3/include/bits/allocated_ptr.h +++ b/libstdc++-v3/include/bits/allocated_ptr.h @@ -82,16 +82,10 @@ _GLI

[PATCH] New C++ warning option '-Wduplicated-access-specifiers'

2017-07-20 Thread Volker Reichelt
Hi, the following patch introduces a new C++ warning option -Wduplicated-access-specifiers that warns about redundant access-specifiers in classes, e.g. class B { public: B(); private: void foo(); private: int i; }; test.cc:8:5: warning: duplicate 'private' a

Re: [PATCH] x86 V[24]TImode vec_{init,extract} (PR target/80846)

2017-07-20 Thread Uros Bizjak
On Thu, Jul 20, 2017 at 9:47 AM, Jakub Jelinek wrote: > Hi! > > Richard has asked me recently to look at V[24]TI vector extraction > and initialization, which he wants to use from the vectorizer. > > The following is an attempt to implement that. > > On the testcases included in the patch we get u

Re: [PATCH] x86 V[24]TImode vec_{init,extract} (PR target/80846)

2017-07-20 Thread Uros Bizjak
On Thu, Jul 20, 2017 at 9:47 AM, Jakub Jelinek wrote: > Another thing is that we actually don't permit a normal move instruction > for V4TImode unless AVX512BW, so we used to generate terrible code (spill it > into memory using GPRs and then load back). Any reason for that? > I've found: > https

Re: [patch,avr,doc] Re-layout "AVR Built-in Functions"

2017-07-20 Thread Denis Chertykov
Approved. 2017-07-20 18:28 GMT+04:00 Georg-Johann Lay : > Hi, this is a re-layout of mentioned section in extend.texi. > > Purpose is to have a unified layout where the explanation has > a farther indentation than the item (function) to be explained. > > Ok for trunk? > > Johann > > gcc/ >

Re: [PATCH, PR81430] Use finalize_options in lto1

2017-07-20 Thread Tom de Vries
On 07/20/2017 12:10 PM, Richard Biener wrote: On Thu, 20 Jul 2017, Tom de Vries wrote: Hi, this patch fixes PR81430, an ICE in the libgomp testsuite for both openmp and openacc test-cases for x86_64 with nvptx accelerator. The scenario how we hit the ICE is as follows: - a testcase is compile

Re: [PATCH][AArch64] Improve addressing of TI/TFmode

2017-07-20 Thread Andrew Pinski
On Thu, Jul 20, 2017 at 5:49 AM, Wilco Dijkstra wrote: > In https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01125.html Jiong > pointed out some addressing inefficiencies due to a recent change in > regcprop (https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00775.html). > > This patch improves aarch64_l

Re: [PATCH][GCC][ARM] Implement a stricter self check.

2017-07-20 Thread Richard Earnshaw (lists)
On 20/07/17 15:57, Tamar Christina wrote: > Hi All, > > This patch makes the self-test for the ARM options validations a bit > stricter. > > When you specify a new architecture extension, neither the options flag in > arm-cpus.in nor the ISA definition in arm.h should contain any other > architec

[PATCH][GCC][ARM] Implement a stricter self check.

2017-07-20 Thread Tamar Christina
Hi All, This patch makes the self-test for the ARM options validations a bit stricter. When you specify a new architecture extension, neither the options flag in arm-cpus.in nor the ISA definition in arm.h should contain any other architecture bits, as this will confuse the parser. The options wi

Re: [PATCH, rs6000] Modify libgcc's float128 IFUNC resolver functions to use __builtin_cpu_supports()

2017-07-20 Thread Peter Bergner
On 7/10/17 2:52 PM, Peter Bergner wrote: > On 7/10/17 9:48 AM, Segher Boessenkool wrote: >> On Fri, Jul 07, 2017 at 07:14:25PM -0500, Peter Bergner wrote: >>> On 7/7/17 4:13 PM, Peter Bergner wrote: On 7/7/17 10:18 AM, Segher Boessenkool wrote: > On Thu, Jul 06, 2017 at 04:21:48PM -0500, P

[PATCH] Fix PR46932: Block auto increment on frame pointer

2017-07-20 Thread Wilco Dijkstra
Block auto increment on frame pointer references. This is never beneficial since the SFP expands into SP+C or FP+C during register allocation. The generated code for the testcase is now as expected: str x30, [sp, -32]! strbw0, [sp, 31] add x0, sp, 31 b

Re: [PATCH, rs6000] 2/2 Add x86 MMX intrinsics DG tests to GCC PPC64LE taget

2017-07-20 Thread Steven Munroe
On Wed, 2017-07-19 at 16:42 -0500, Segher Boessenkool wrote: > Hi Steve, > > On Wed, Jul 19, 2017 at 10:14:01AM -0500, Steven Munroe wrote: > > This it part 2/2 for contributing PPC64LE support for X86 MMX > > instrisics. This patch adds the DG tests to verify the headers contents. > > Oddly there

[PATCH] toplev: avoid recursive emergency_dump_function

2017-07-20 Thread Alexander Monakov
Hi, Segher pointed out on IRC that ICE reporting with dumps enabled got worse: if emergency_dump_function itself leads to an ICE (e.g. by segfaulting), nested ICE reporting will invoke emergency_dump_function in exactly the same context, but not only would we uselessly announce current pass again,

Enable bb copying in bb-reorder in partitioned functions

2017-07-20 Thread Jan Hubicka
Hi, enabling bb reorering has quite visible code size effect due to disabling two optimization - the small block duplication in connect_traces and post-reload crossjumping. Small block duplication seems easy enough to allow within one partition. While doing so i also noticed that my changes to c

[patch,avr,doc] Re-layout "AVR Built-in Functions"

2017-07-20 Thread Georg-Johann Lay
Hi, this is a re-layout of mentioned section in extend.texi. Purpose is to have a unified layout where the explanation has a farther indentation than the item (function) to be explained. Ok for trunk? Johann gcc/ * doc/invoke.texi (AVR Built-in Functions): Re-layout section. Index: doc

Re: C PATCH to fix bogus warning with -Wmultistatement-macros (PR c/81364)

2017-07-20 Thread Marek Polacek
Ping. On Fri, Jul 14, 2017 at 03:38:05PM +0200, Marek Polacek wrote: > I think David might be able to approve this one, so CCing. > > On Tue, Jul 11, 2017 at 03:23:16PM +0200, Marek Polacek wrote: > > This patch fixes a bogus -Wmultistatement-macros warning. The code didn't > > notice that what

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 05/08

2017-07-20 Thread Jeff Law
On 07/20/2017 07:09 AM, Segher Boessenkool wrote: > Hi Jeff, > > On Tue, Jul 18, 2017 at 11:17:48PM -0600, Jeff Law wrote: >> It turns out combine-stack-adjustments would take >> >> allocate PROBE_INTERVAL >> probe >> allocate PROBE_INTERVAL >> probe >> allocate PROBE_INTERVAL >> probe >> allocate

Re: [PATCH] Fix infinite recursion with div-by-zero (PR middle-end/70992)

2017-07-20 Thread Marek Polacek
On Thu, Jul 20, 2017 at 12:55:10PM +0200, Richard Biener wrote: > On Wed, Jul 19, 2017 at 3:55 PM, Marek Polacek wrote: > > On Wed, Jul 19, 2017 at 12:45:12PM +0200, Richard Biener wrote: > >> On Tue, Jul 18, 2017 at 6:05 PM, Marek Polacek wrote: > >> > We ended up in infinite recursion between e

Re: [PATCH] update edge profile info in nvptx.c

2017-07-20 Thread Tom de Vries
On 07/20/2017 04:12 PM, Cesar Philippidis wrote: Would you like to take over this patch? I saw that you started working on this issue (or a similar one to it) in PR81442. Sure. Thanks, - Tom

Re: [PATCH] update edge profile info in nvptx.c

2017-07-20 Thread Cesar Philippidis
On 07/20/2017 06:04 AM, Tom de Vries wrote: > On 07/13/2017 06:53 PM, Cesar Philippidis wrote: >> Similarly, for nvptx vector reductions, when it comes time to initialize >> the reduction variable, the nvptx BE constructs a branch so that only >> vector lanes 1 to vector_length-1 are initialized th

Re: [PATCH] PR libstdc++/81476 Optimise vector insertion from input iterators

2017-07-20 Thread Jonathan Wakely
On 19/07/17 22:19 +0200, Marc Glisse wrote: On Wed, 19 Jul 2017, Jonathan Wakely wrote: The PR shows a fairly pathological case where ranges of InputIterators are repeatedly inserted at the start of a vector. Each insertion from an InputIterator moves every element after the insertion point by

[PATCH] Add -std=c++2a

2017-07-20 Thread Andrew Sutton
This adds a new C++ dialect, enabled by -std=c++2a. libcpp/ Add support for C++2a. * include/cpplib.h (c_lang): Add CXX2A and GNUCXX2A. * init.c (lang_defaults): Add rows for CXX2A and GNUCXX2A. (cpp_init_builtins): Set __cplusplus to 201707L for C++2x.

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 01/08 V2

2017-07-20 Thread Segher Boessenkool
Hi Jeff, On Tue, Jul 18, 2017 at 11:17:19PM -0600, Jeff Law wrote: > > The biggest change in this update to patch 01/08 is moving of stack > clash protection out of -fstack-check= and into its own option, > -fstack-clash-protection. I believe other issues raised by reviewers > have been addresse

[patch,lto] Fix PR81487

2017-07-20 Thread Georg-Johann Lay
Hi, this patch fixes some minor problems in lto-plugin: Some older mingw32 host environments have broken asprintf. As far as I can tell, the problem is that the mingw asprintf implementation calls _vsnprintf (NULL, 0, ...) which always returns -1 as length on the host. The patch fixes this by us

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 05/08

2017-07-20 Thread Segher Boessenkool
Hi Jeff, On Tue, Jul 18, 2017 at 11:17:48PM -0600, Jeff Law wrote: > It turns out combine-stack-adjustments would take > > allocate PROBE_INTERVAL > probe > allocate PROBE_INTERVAL > probe > allocate PROBE_INTERVAL > probe > allocate RESIDUAL > > And turn that into > > allocate (3 * PROBE_INTER

Re: [PATCH v12] add -fpatchable-function-entry=N,M option

2017-07-20 Thread Maxim Kuvyrkov
> On Jul 20, 2017, at 3:06 PM, Torsten Duwe wrote: > > On Thu, Jul 20, 2017 at 01:58:06PM +0300, Maxim Kuvyrkov wrote: >>> On Jul 17, 2017, at 3:10 PM, Torsten Duwe wrote: >>> >>> What is the next step now? Is anybody going to commit that patch? >> >> Torsten, if you prefer I can commit your p

Re: [PATCH] update edge profile info in nvptx.c

2017-07-20 Thread Tom de Vries
On 07/13/2017 06:53 PM, Cesar Philippidis wrote: Similarly, for nvptx vector reductions, when it comes time to initialize the reduction variable, the nvptx BE constructs a branch so that only vector lanes 1 to vector_length-1 are initialized the the default value for a given reduction type, where

[PATCH][AArch64] Improve addressing of TI/TFmode

2017-07-20 Thread Wilco Dijkstra
In https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01125.html Jiong pointed out some addressing inefficiencies due to a recent change in regcprop (https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00775.html). This patch improves aarch64_legitimize_address_displacement to split unaligned offsets of TImo

[PATCH] Adjust gimple_phi_arg assert, add gphi * overloads

2017-07-20 Thread Richard Biener
This adds remaining gphi * overloads to the GIMPLE_PHI accessors in gimple.h and changes the assert in gimple_phi_arg to only allow access to actual arguments rather than available slots. Accordingly PHI node management needs to be adjusted to avoid touching the unused area apart from memsetting

Re: [PATCH] Kill TYPE_METHODS debug 1/9

2017-07-20 Thread Nathan Sidwell
On 07/20/2017 07:31 AM, Nathan Sidwell wrote: So I don't think I've made it worse there. thoughts? aha, gstabs+ for gnu extensions. With a small fix I get the following before and after (I changed the example to add another frob member). (gdb) ptype X type = struct X { public: int fr

Re: [PATCH v12] add -fpatchable-function-entry=N,M option

2017-07-20 Thread Torsten Duwe
On Thu, Jul 20, 2017 at 01:58:06PM +0300, Maxim Kuvyrkov wrote: > > On Jul 17, 2017, at 3:10 PM, Torsten Duwe wrote: > > > > What is the next step now? Is anybody going to commit that patch? > > Torsten, if you prefer I can commit your patch (after bootstrap and a regtest > on aarch64-linux-gnu

Re: [PATCH, PR81030] Call compute_outgoing_frequencies at expand

2017-07-20 Thread Jan Hubicka
Hi, this is patch I comitted. Thanks for looking into it, Honza PR middle-end/81030 * gcc.dg/pr81030.c: New test. * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note when gimple level profile disagrees with what RTL expander did. Index: tests

Re: [PATCH] Kill TYPE_METHODS debug 1/9

2017-07-20 Thread Nathan Sidwell
On 07/18/2017 01:24 PM, Jim Wilson wrote: Changes to the debug info files requires a gdb make check with and without the patch to check for regressions. Since you are changing both dbxout and dwarf2out, you would need to do this twice, once for each debug info type. Testing dbxout may be a l

Re: [PATCH] Fix PR61171

2017-07-20 Thread Richard Biener
On Wed, 19 Jul 2017, Richard Biener wrote: > > The following fixes another case of missed reduction vectorization, > namely when we failed to associate a chain with mixed plus/minus > (thus it isn't detected as SLP reduction chain). The thing is set up > in a way that it should be straight forwa

Re: [PATCH v12] add -fpatchable-function-entry=N,M option

2017-07-20 Thread Maxim Kuvyrkov
> On Jul 17, 2017, at 3:10 PM, Torsten Duwe wrote: > > What is the next step now? Is anybody going to commit that patch? > > Torsten > > On Fri, Jul 07, 2017 at 02:57:55PM +0100, Richard Earnshaw (lists) wrote: >> On 06/07/17 15:03, Torsten Duwe wrote: >> +#if TARGET_HAVE_NAMED_SECTIONS >

Re: [PATCH] Fix infinite recursion with div-by-zero (PR middle-end/70992)

2017-07-20 Thread Richard Biener
On Wed, Jul 19, 2017 at 3:55 PM, Marek Polacek wrote: > On Wed, Jul 19, 2017 at 12:45:12PM +0200, Richard Biener wrote: >> On Tue, Jul 18, 2017 at 6:05 PM, Marek Polacek wrote: >> > We ended up in infinite recursion between extract_muldiv_1 and >> > fold_plusminus_mult_expr, because one turns thi

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-07-20 Thread Marek Polacek
On Wed, Jul 19, 2017 at 10:51:33AM -0400, David Malcolm wrote: > The changes to diagnostic-core.h and diagnostic.c are OK. Thanks. > > Also, > > PEDWARN_FOR_ASSIGNMENT didn't work with the addition of printing TYPE > > and > > RHSTYPE so I just decided to unroll the macro instead of making it >

Re: [PATCH] match.pd: reassociate multiplications with constants

2017-07-20 Thread Richard Biener
On Thu, Jul 20, 2017 at 11:39 AM, Alexander Monakov wrote: > On Thu, 20 Jul 2017, Richard Biener wrote: >> >> So for saturating types isn't the issue when @1 and @2 have opposite >> >> sign and the inner multiply would have saturated? >> > >> > No, I think the only special case is @1 == @2 == -1,

Re: [PATCH PR81388]Revert change in revision 238585

2017-07-20 Thread Richard Biener
On Thu, Jul 20, 2017 at 11:09 AM, Bin Cheng wrote: > Hi, > I removed computation of may_be_zero in revision 238585 by assuming > "pointer + 2 < pointer" can be folded. This is false when pointer could > overflow, > as well as unsigned type (I don't know why it haven't been exposed for long > tim

Re: [PATCH] Make assert in gimple_phi_arg more strict

2017-07-20 Thread Tom de Vries
On 07/20/2017 12:05 PM, Richard Biener wrote: I've used the following to only init the PHI node up to nargs, not capacity (but still consistently zero things). Currently bootstrapping/testing on x86_64-unknown-linux-gnu (plus the adjusted assert of course). I think it's slightly cleaner than ad

Re: [PATCH] x86 V[24]TImode vec_{init,extract} (PR target/80846)

2017-07-20 Thread Richard Biener
On Thu, 20 Jul 2017, Jakub Jelinek wrote: > Hi! > > Richard has asked me recently to look at V[24]TI vector extraction > and initialization, which he wants to use from the vectorizer. > > The following is an attempt to implement that. > > On the testcases included in the patch we get usually be

Re: [PATCH, PR81430] Use finalize_options in lto1

2017-07-20 Thread Richard Biener
On Thu, 20 Jul 2017, Tom de Vries wrote: > Hi, > > this patch fixes PR81430, an ICE in the libgomp testsuite for both openmp and > openacc test-cases for x86_64 with nvptx accelerator. > > The scenario how we hit the ICE is as follows: > - a testcase is compiled with -O2 > - ix86_option_optimiza

Re: [PATCH] Make assert in gimple_phi_arg more strict

2017-07-20 Thread Richard Biener
On Thu, 20 Jul 2017, Tom de Vries wrote: > Hi, > > this patch checks that gimple_phi_arg accesses args only in the inclusive > 0..(nargs-1) region. > > There are a couple of functions that manipulate args in the inclusive > nargs..(capacity-1) region, so these have been updated to temporarily in

[PATCH] Adjust vec_init/vec_extract vector testcase to go up to V64QImode

2017-07-20 Thread Richard Biener
Tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-07-20 Richard Biener * gcc.dg/vect/slp-43.c: Increase loop count to enable vectorization with V64QImode. * gcc.dg/vect/slp-45.c: Likewise. Index: gcc/testsuite/gcc.dg/vect/slp-43.c ===

Re: [PATCH] match.pd: reassociate multiplications with constants

2017-07-20 Thread Alexander Monakov
On Thu, 20 Jul 2017, Richard Biener wrote: > >> So for saturating types isn't the issue when @1 and @2 have opposite > >> sign and the inner multiply would have saturated? > > > > No, I think the only special case is @1 == @2 == -1, otherwise either @2 is > > 0 or 1, or @1 * @2 is larger in magnitu

[PATCH, PR81430] Use finalize_options in lto1

2017-07-20 Thread Tom de Vries
Hi, this patch fixes PR81430, an ICE in the libgomp testsuite for both openmp and openacc test-cases for x86_64 with nvptx accelerator. The scenario how we hit the ICE is as follows: - a testcase is compiled with -O2 - ix86_option_optimization_table enables OPT_freorder_blocks_and_partition

[PATCH PR81388]Revert change in revision 238585

2017-07-20 Thread Bin Cheng
Hi, I removed computation of may_be_zero in revision 238585 by assuming "pointer + 2 < pointer" can be folded. This is false when pointer could overflow, as well as unsigned type (I don't know why it haven't been exposed for long time in case of unsigned type). As for the issue itself, any fix w

Re: [PATCH AArch64]Fix ICE in cortex-a57 fma steering pass

2017-07-20 Thread Bin.Cheng
On Fri, Jul 14, 2017 at 12:12 PM, James Greenhalgh wrote: > On Wed, Jul 12, 2017 at 03:15:04PM +, Bin Cheng wrote: >> Hi, >> After change @236817, AArch64 backend could avoid unnecessary conversion >> instructions for register between different modes now. As a result, GCC >> could initialize

Re: [committed] Fix assert in gimple_phi_arg

2017-07-20 Thread Tom de Vries
On 07/20/2017 10:46 AM, Richard Biener wrote: On Wed, Jul 19, 2017 at 5:42 PM, Tom de Vries wrote: Hi, this patch makes an assert in gimple_phi_arg more strict. The current assert allows 'index == phi_stmt->capacity', but 'phi_stmt->args[phi_stmt->capacity]' is out of bounds. Bootstrapped an

Re: [committed] Fix assert in gimple_phi_arg

2017-07-20 Thread Richard Biener
On Wed, Jul 19, 2017 at 5:42 PM, Tom de Vries wrote: > Hi, > > this patch makes an assert in gimple_phi_arg more strict. > > The current assert allows 'index == phi_stmt->capacity', but > 'phi_stmt->args[phi_stmt->capacity]' is out of bounds. > > Bootstrapped and reg-tested on x86_64. > > Committe

Re: [PATCH] match.pd: reassociate multiplications with constants

2017-07-20 Thread Richard Biener
On Wed, Jul 19, 2017 at 4:39 PM, Alexander Monakov wrote: > On Wed, 19 Jul 2017, Richard Biener wrote: >> >> --- a/gcc/match.pd >> >> +++ b/gcc/match.pd >> >> @@ -283,6 +283,20 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) >> >> || mul != wi::min_value (TYPE_PRECISION (type), SIGNED)) >> >>

[PATCH] Make assert in gimple_phi_arg more strict

2017-07-20 Thread Tom de Vries
Hi, this patch checks that gimple_phi_arg accesses args only in the inclusive 0..(nargs-1) region. There are a couple of functions that manipulate args in the inclusive nargs..(capacity-1) region, so these have been updated to temporarily increase nargs to capacity while doing the manipulati

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 03/08 V2

2017-07-20 Thread Segher Boessenkool
On Tue, Jul 18, 2017 at 11:17:39PM -0600, Jeff Law wrote: > I don't think this patch changed in any significant way since V1. Except the first time you attached the correct patch ;-) Segher

Re: [PATCH] Misc libquadmath backports from upstram glibc (PR libquadmath/65757)

2017-07-20 Thread Jakub Jelinek
On Thu, Jul 13, 2017 at 10:47:06PM +0200, Jakub Jelinek wrote: > This patch is a manual backport of the 2012-2017 sysdeps/ieee754/ldbl-128/ > glibc changes into libquadmath. As mentioned in the PR, which has > detailed git diff commands, I've left *jnl.c, *lgamma* and x2y2m1l.c > changes so far, t

[PATCH] x86 V[24]TImode vec_{init,extract} (PR target/80846)

2017-07-20 Thread Jakub Jelinek
Hi! Richard has asked me recently to look at V[24]TI vector extraction and initialization, which he wants to use from the vectorizer. The following is an attempt to implement that. On the testcases included in the patch we get usually better or significantly better code generated, the exception

[PR81489, committed] Fix phi arg location in find_implicit_erroneous_behavior

2017-07-20 Thread Tom de Vries
Hi, this patch moves the reading of a phi arg location to before the loop that modifies the phi, ensuring that we're not reading some random value. PR found with a patch that does more strict checking in gimple_phi_arg. Bootstrapped and reg-tested on x86_64. Committed as obvious. Thanks, -