Re: [PATCH][i386,AVX] Enable VAES support [2/5]

2017-12-07 Thread Kirill Yukhin
Hello Julia, On 08 Nov 12:32, Koval, Julia wrote: > Hi, this patch enables VAESDEC instruction from VAES isaset, defined here: > https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf > > Ok for trunk? Patch is OK. I've check

[3/3] [nios2] new test cases

2017-12-07 Thread Sandra Loosemore
I've checked in these new constant-integer address test cases to go with the previous two patches in this series. -Sandra 2017-12-07 Sandra Loosemore gcc/testsuite/ * gcc.target/nios2/const-addr-1.c: New. * gcc.target/nios2/const-addr-2.c: New. * gcc.target/nios2/const-addr-3.c: New. Ind

[patch 2/3] [nios2] add splitters for io-variant memory access insns

2017-12-07 Thread Sandra Loosemore
I previously neglected to add address splitters for the io-variant memory read and write insns, as I did for all the other insns that take memory operands. In the examples I looked at, I found there was still valid code coming out, but it seemed like an accident that it was falling through to

[patch 1/3] [nios2] fix code size regressions with constant integer addresses

2017-12-07 Thread Sandra Loosemore
My series of patches from earlier this fall https://gcc.gnu.org/ml/gcc-patches/2017-10/msg01309.html caused code size regressions in cases where constant integers are used as addresses; specifically, LRA was getting confused and trying to generate a stack spill because it couldn't figure out h

[PATCH] Add srodata section support to riscv port.

2017-12-07 Thread Jim Wilson
This adds srodata section support to the RISC-V port, putting small read-only data in the .srodata section instead of the .sdata section. There is already code to put small read-only rtx in .srodata* instead of .rodata*. This does the same for small read-only trees to be consistent. Tested with

Re: [PING 2][PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-12-07 Thread Martin Sebor
On 12/07/2017 03:23 PM, Jeff Law wrote: On 11/29/2017 04:36 PM, Martin Sebor wrote: I've finished reimplementing the patch as a standalone pass. In the attached revision I also addressed your comments below as well as Richard's to allowing the strlen optimizations even for overlapping accesses.

[PATCH][RFA][P1 PR tree-optimization/83298] Avoid over-optimistic result range for COND_EXPR

2017-12-07 Thread Jeff Law
So the underlying issue here is quite simple. Given something like x = (cond) ? res1 : res2; EVRP analysis will compute the resultant range using vrp_meet of the ranges for res1 and res2. Seems pretty natural. vrp_meet makes optimistic assumptions if either range is VR_UNDEFINED and will set

Re: [SFN+LVU+IEPM v4 5/9] [SFN] introduce statement frontier notes, still disabled

2017-12-07 Thread Jeff Law
On 11/09/2017 07:34 PM, Alexandre Oliva wrote: > This patch completes the infrastructure for the introduction of > statement frontiers in C-family languages. > > It brings in all the code remaining code needed to introduce and > transform begin stmt trees, gimple stmts, insns and notes, and > ulti

[Patch][Aarch64] Fix aarch64 libatomic build with older binutils

2017-12-07 Thread Steve Ellcey
James, Here is a patch that will turn off the use of IFUNC and the LSE instructions in libatomic if the compiler/assembler toolchain do not understand the '-march=armv8-a+lse' option (changed from -march=armv8.1-a).  Rather than check the assembler directly, I used the existing ACX_PROG_CC_WARNING

Re: [PATCH 09/10] [ARC] Update (u)maddsidi patterns.

2017-12-07 Thread Andrew Burgess
* Claudiu Zissulescu [2017-11-27 12:09:58 +0100]: > From: claziss > > The accumulator registers are freely used by the compiler. However, > there are a number of instructions which are having an intrinsic use > of these registers. Update patterns to inform the compiler which ones. > > gcc/ >

Re: [PATCH 07/10] [ARC][FIX] Consider command line ffixed- option.

2017-12-07 Thread Andrew Burgess
* Claudiu Zissulescu [2017-11-27 12:09:56 +0100]: > From: claziss > > Track which regs are set fixed/call saved/call used from commnad line. > Do not try to override their properties if user says otherwise. > > gcc/ > 2017-06-08 Claudiu Zissulescu > > * config/arc/arc.c (overridereg

Re: [PATCH 06/10] [ARC] Update legitimate constant hook.

2017-12-07 Thread Andrew Burgess
* Claudiu Zissulescu [2017-11-27 12:09:55 +0100]: > From: Claudiu Zissulescu > > Make sure we check the constants in all cases. > > gcc/ > 2017-10-14 Claudiu Zissulescu > > * config/arc/arc.c (arc_legitimate_constant_p): Always check all > constants. > > testsuite/ > 2017-10-

Re: [patch] prevent .cfi_personality/.cfi_lsda on !dwarf eh configurations

2017-12-07 Thread Jeff Law
On 11/30/2017 02:18 AM, Olivier Hainque wrote: > Hello, > > Bootstrap is currently broken with Ada on x86_64-windows using SEH exceptions, > with several stage2/stage3 object comparison failures like > > Bootstrap comparison failure! > gcc/ada/ali-util.o differs > gcc/ada/ali.o differs >

Re: [SFN+LVU+IEPM v4 8/9] [IEPM] Introduce debug hook for inline entry point markers

2017-12-07 Thread Jeff Law
On 11/09/2017 07:34 PM, Alexandre Oliva wrote: > The inline_entry hook will be given a definition in a later patch. > > for gcc/ChangeLog > > * debug.h (gcc_debug_hooks): Add inline_entry. > * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise. > * debug.c (do_nothing_debu

Re: [SFN+LVU+IEPM v4 6/9] [SFN] Introduce -gstatement-frontiers option, enable debug markers

2017-12-07 Thread Jeff Law
On 11/09/2017 07:34 PM, Alexandre Oliva wrote: > Introduce a command line option to enable statement frontiers, enabled > by default in optimized builds with DWARF2+ debug information. > > This patch depends on an earlier patch that completed the > infrastructure for debug markers, and on another

Re: [001/nnn] poly_int: add poly-int.h

2017-12-07 Thread Jeff Law
On 12/07/2017 03:38 PM, Richard Sandiford wrote: >> So I think that's the final ack on this series. > > Thanks to both of you, really appreciate it! Sorry it took so long. > >> Richard S. can you confirm? I fully expect the trunk has moved some >> and the patches will need adjustments -- consi

Re: [SFN+LVU+IEPM v4 4/9] [SFN] stabilize find_bb_boundaries

2017-12-07 Thread Jeff Law
On 11/09/2017 07:34 PM, Alexandre Oliva wrote: > If find_bb_boundaries is given a block with zero or one nondebug insn > beside debug insns, it shouldn't purge dead edges, because without > debug insns we wouldn't purge them at that point. Doing so may change > the order in which edges are process

Re: [SFN+LVU+IEPM v4 3/9] [SFN] not-quite-boilerplate changes in preparation to introduce nonbind markers

2017-12-07 Thread Jeff Law
On 11/09/2017 07:34 PM, Alexandre Oliva wrote: > This patch adjusts numerous parts of the compiler that would > malfunction should they find debug markers at points where they may be > introduced. The changes purport to allow the compiler to pass > bootstrap-debug-lean (-fcompare-debug in stage3)

Re: [001/nnn] poly_int: add poly-int.h

2017-12-07 Thread Richard Sandiford
Jeff Law writes: > On 12/07/2017 07:46 AM, Richard Biener wrote: >> On Wed, Dec 6, 2017 at 9:11 PM, Jeff Law wrote: >>> On 11/13/2017 05:04 PM, Richard Sandiford wrote: Richard Sandiford writes: > Richard Sandiford writes: >> This patch adds a new "poly_int" class to represent poly

Re: [SFN+LVU+IEPM v4 2/9] [SFN] boilerplate changes in preparation to introduce nonbind markers

2017-12-07 Thread Jeff Law
On 11/09/2017 07:34 PM, Alexandre Oliva wrote: > This patch introduces a number of new macros and functions that will > be used to distinguish between different kinds of debug stmts, insns > and notes, namely, preexisting debug bind ones and to-be-introduced > nonbind markers. > > In a seemingly m

Re: [SFN+LVU+IEPM v4 1/9] [SFN] adjust RTL insn-walking API

2017-12-07 Thread Jeff Law
On 11/09/2017 07:34 PM, Alexandre Oliva wrote: > This patch removes unused RTL functions, introduces alternate ones for > use in a later SFN patch, and regroups other related functions so that > they appear in a more consistent order. > > for gcc/ChangeLog > > * emit-rtl.c (next_nondebug_i

Re: [PING 2][PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-12-07 Thread Jeff Law
On 11/29/2017 04:36 PM, Martin Sebor wrote: > I've finished reimplementing the patch as a standalone pass. > In the attached revision I also addressed your comments below > as well as Richard's to allowing the strlen optimizations even > for overlapping accesses. > > While beefing up the tests I f

Re: [PING 2][PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-12-07 Thread Jeff Law
On 12/07/2017 02:28 PM, Martin Sebor wrote: > On 12/07/2017 02:14 PM, Jeff Law wrote: >> On 11/29/2017 04:36 PM, Martin Sebor wrote: >>> I've finished reimplementing the patch as a standalone pass. >>> In the attached revision I also addressed your comments below >>> as well as Richard's to allowin

Re: [PING 2][PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-12-07 Thread Martin Sebor
On 12/07/2017 02:14 PM, Jeff Law wrote: On 11/29/2017 04:36 PM, Martin Sebor wrote: I've finished reimplementing the patch as a standalone pass. In the attached revision I also addressed your comments below as well as Richard's to allowing the strlen optimizations even for overlapping accesses.

Re: [PING 2][PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-12-07 Thread Jeff Law
On 11/29/2017 04:36 PM, Martin Sebor wrote: > I've finished reimplementing the patch as a standalone pass. > In the attached revision I also addressed your comments below > as well as Richard's to allowing the strlen optimizations even > for overlapping accesses. > > While beefing up the tests I f

Re: [PATCH, GCC/testsuite] Improve fstack_protector effective target

2017-12-07 Thread Jeff Law
On 11/30/2017 09:40 AM, Thomas Preudhomme wrote: > Hi, > > Effective target fstack_protector fails to return an error for > newlib-based target (such as arm-none-eabi targets) which does not > support stack protector. This is due to the test being too simplist for > stack protection code to be gen

Re: [PATCH] handle non-constant offsets in -Wstringop-overflow (PR 77608)

2017-12-07 Thread Jeff Law
On 12/01/2017 11:06 AM, Martin Sebor wrote: > On 12/01/2017 01:26 AM, Jeff Law wrote: >> On 11/30/2017 01:30 PM, Martin Sebor wrote: >>> On 11/22/2017 05:03 PM, Jeff Law wrote: On 11/21/2017 12:07 PM, Martin Sebor wrote: > On 11/21/2017 09:55 AM, Jeff Law wrote: >> On 11/19/2017 04:28

Re: [PR59319] output friends in debug info

2017-12-07 Thread Alexandre Oliva
On Apr 7, 2017, Alexandre Oliva wrote: > On Mar 21, 2017, Alexandre Oliva wrote: >> On Jan 27, 2017, Alexandre Oliva wrote: >>> On Oct 19, 2016, Alexandre Oliva wrote: On Sep 23, 2016, Alexandre Oliva wrote: > On Aug 30, 2016, Alexandre Oliva wrote: >> Handling non-template fri

Re: [PR80693] drop value of parallel SETs dropped by combine

2017-12-07 Thread Alexandre Oliva
On Jul 7, 2017, Segher Boessenkool wrote: > I meant, just double check if your new > code does the correct thing for the set count. Sorry this took me so long to get back to. Even this was difficult for me to answer for sure, then and now. We don't (and can't?) know whether the REG_UNUSED not

Re: [PATCHv3] Add a warning for invalid function casts

2017-12-07 Thread Bernd Edlinger
On 12/06/17 23:35, Jason Merrill wrote: > On Fri, Dec 1, 2017 at 7:42 AM, Bernd Edlinger > wrote: >> this version of the patch improves the heuristic check to take the >> target hook into account, to handle cases correctly when both or only >> one parameter is _not_ promoted to int. > > In lookin

Re: [PATCH] Further improvements for the (T)(P+A)-(T)(P+B) folding (PR sanitizer/81281)

2017-12-07 Thread Marc Glisse
On Thu, 7 Dec 2017, Jakub Jelinek wrote: When committing the previous PR81281 patch, I've removed all the @@0 cases on plus:c, used @0 instead, to make sure we don't regress. This patch readds those where possible. For the cases where there is just P and A, it was mostly a matter of @@0 and co

Re: [PING 2][PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-12-07 Thread Jeff Law
On 11/27/2017 05:44 AM, Richard Biener wrote: > > + > + if (const strinfo *chksi = olddsi ? olddsi : dsi) > +if (si > + && !check_bounds_or_overlap (stmt, chksi->ptr, si->ptr, NULL_TREE, > len)) > + /* Avoid transforming strcpy when out-of-bounds offsets or > +overlapping

Re: [PING 2][PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-12-07 Thread Jeff Law
On 11/25/2017 05:53 PM, Martin Sebor wrote: > On 11/22/2017 04:50 PM, Jeff Law wrote: >> On 11/16/2017 02:29 PM, Martin Sebor wrote: On 10/23/2017 08:42 PM, Martin Sebor wrote: > Attached is a reworked solution to enhance -Wrestrict while > avoiding changing tree-vrp.c or any other VRP

[PATCH, rs6000] Add additional builtin tests

2017-12-07 Thread Carl Love
GCC Maintainers: The following patch adds missing test cases for various builtins. The patch does not make any functional changes to GCC. The patch has been run on: powerpc64le-unknown-linux-gnu (Power 8 LE) powerpc64le-unknown-linux-gnu (Power 8 BE) powerpc64le-unknown-linux-gnu (Power

Re: [PATCH,libstdc++ testsuite] Fix hyperg failures

2017-12-07 Thread Jonathan Wakely
On 07/12/17 13:13 -0500, David Edelsohn wrote: When the testcases were regenerated due to PR libstdc++/PR66689, -ffp-contract=off was omitted from (at least) the hyperg check_value.cc testcases, causing runtime regression. This patch restores the dg-options directive. Ah yes, good catch. We m

Re: [PATCH] avoid bogus -Wstringop-overflow for strncpy with _FORTIFY_SOURCE (PR 82646)

2017-12-07 Thread Martin Sebor
On 12/07/2017 06:46 AM, Christophe Lyon wrote: Hi Martin, On 6 December 2017 at 00:51, Jeff Law wrote: On 12/05/2017 04:47 PM, Martin Sebor wrote: PR middle-end/82646 - bogus -Wstringop-overflow with -D_FORTIFY_SOURCE=2 on strncpy with range to a member array, The bug points out a false pos

Allow _Alignas in compound literals (C11 DR#444)

2017-12-07 Thread Joseph Myers
C11 DR#444 dealt with how C11 intended to allow alignment specifiers on struct and union members, but failed to include that in the syntax. The final resolution of that DR also allows alignment specifiers in type names in compound literals (in order to apply an increased alignment to the unnamed ob

Re: [PATCH] Fix up tree-ssa/strn{cat,cpy-2}.c (PR tree-optimization/83075)

2017-12-07 Thread Jeff Law
On 12/07/2017 11:03 AM, Martin Sebor wrote: > On 12/07/2017 09:55 AM, Jakub Jelinek wrote: >> On Wed, Dec 06, 2017 at 05:30:53PM +0100, Jakub Jelinek wrote: >>> On Wed, Dec 06, 2017 at 09:20:15AM -0700, Martin Sebor wrote: Attached is a patch with the comment updated/simplified. The tests

[PATCH,libstdc++ testsuite] Fix hyperg failures

2017-12-07 Thread David Edelsohn
When the testcases were regenerated due to PR libstdc++/PR66689, -ffp-contract=off was omitted from (at least) the hyperg check_value.cc testcases, causing runtime regression. This patch restores the dg-options directive. This returns the libstdc++ testsuite to all passing on AIX. Bootstrapped o

Re: [PATCH] Fix up tree-ssa/strn{cat,cpy-2}.c (PR tree-optimization/83075)

2017-12-07 Thread Martin Sebor
On 12/07/2017 09:55 AM, Jakub Jelinek wrote: On Wed, Dec 06, 2017 at 05:30:53PM +0100, Jakub Jelinek wrote: On Wed, Dec 06, 2017 at 09:20:15AM -0700, Martin Sebor wrote: Attached is a patch with the comment updated/simplified. The tests do the job they need to do today so I just removed the use

Re: [PATCH] Fix up tree-ssa/strn{cat,cpy-2}.c (PR tree-optimization/83075)

2017-12-07 Thread Richard Biener
On December 7, 2017 5:55:47 PM GMT+01:00, Jakub Jelinek wrote: >On Wed, Dec 06, 2017 at 05:30:53PM +0100, Jakub Jelinek wrote: >> On Wed, Dec 06, 2017 at 09:20:15AM -0700, Martin Sebor wrote: >> > Attached is a patch with the comment updated/simplified. >> > The tests do the job they need to do t

[PATCH] rl78 smindi3 improvement

2017-12-07 Thread Sebastian Perta
Hello, The following patch improves both the speed and code size for 64 bit signed min for RL78: it emits a library function call instead of emitting code for the 64 bit min for every single time. The signed min function which was added in libgcc is hand written, so more optimal than what GCC gen

Re: [PATCH] Fix vectorizer part of PR81303

2017-12-07 Thread Bin.Cheng
On Wed, Dec 6, 2017 at 1:29 PM, Richard Biener wrote: > > The following fixes a vectorization issue that appears when trying > to vectorize the bwaves mat_times_vec kernel after interchange was > performed by the interchange pass. That interchange inserts the > following code for the former reduc

patch to fix PR83252 and PR80818

2017-12-07 Thread Vladimir Makarov
  The following patch fixes PR83252 and PR80818. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83252 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80818 The patch was successfully tested and bootstrapped on ppc64 and x86_64. Committed as rev. 255471. Jakub, the patch does not include a test cas

Re: [PATCH v2] Ability to remap file names in __FILE__, etc (PR other/70268)

2017-12-07 Thread Martin Sebor
On 12/07/2017 05:29 AM, Boris Kolpackov wrote: Thanks for the review. Second revision of the patch attached (also rebased on the current trunk). Issues that are not commented on below have been resolved as suggested. David Malcolm writes: To my naive eyes this seems like a useful addition, b

Re: [PATCH] Fix i?86/x86_64 pre-SSE4.1 rint expansion (PR target/81906)

2017-12-07 Thread Uros Bizjak
On Thu, Dec 7, 2017 at 5:48 PM, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, the code emitted by ix86_expand_rint > doesn't work with rounding to +/- infinity. > This patch adjusts it if flag_rounding_math to do something that works > well even for that case (should be just one insn long

[committed] Tweak POINTER_DIFF_EXPR verification (PR middle-end/83164)

2017-12-07 Thread Jakub Jelinek
Hi! As mentioned in the PR, we need to treat POINTER_DIFF_EXPR similarly how we treat comparisons with pointer operands (i.e. that either there is useless conversion from one type to the other, or from the other to the one, or the pointer type modes are the same), because we have exceptions for po

[PATCH] Further improvements for the (T)(P+A)-(T)(P+B) folding (PR sanitizer/81281)

2017-12-07 Thread Jakub Jelinek
Hi! When committing the previous PR81281 patch, I've removed all the @@0 cases on plus:c, used @0 instead, to make sure we don't regress. This patch readds those where possible. For the cases where there is just P and A, it was mostly a matter of @@0 and convert? instead of convert plus using ty

[PATCH, rs6000] Add missing builtin functionality and tests

2017-12-07 Thread Carl Love
GCC Maintainers: The following patch adds support for missing builtin instances documented in the ABI specification. The patch includes test cases for missing builtins. The patch has been run on: powerpc64le-unknown-linux-gnu (Power 8 LE) powerpc64le-unknown-linux-gnu (Power 8 BE) power

[PATCH] Fix up tree-ssa/strn{cat,cpy-2}.c (PR tree-optimization/83075)

2017-12-07 Thread Jakub Jelinek
On Wed, Dec 06, 2017 at 05:30:53PM +0100, Jakub Jelinek wrote: > On Wed, Dec 06, 2017 at 09:20:15AM -0700, Martin Sebor wrote: > > Attached is a patch with the comment updated/simplified. > > The tests do the job they need to do today so I just removed > > the useless attribute but otherwise left t

[PATCH] Fix i?86/x86_64 pre-SSE4.1 rint expansion (PR target/81906)

2017-12-07 Thread Jakub Jelinek
Hi! As mentioned in the PR, the code emitted by ix86_expand_rint doesn't work with rounding to +/- infinity. This patch adjusts it if flag_rounding_math to do something that works well even for that case (should be just one insn longer). Bootstrapped/regtested on x86_64-linux and i686-linux, ok f

[C++ RFC PATCH] Fix ICE with late attributes in templates (PR c++/83300)

2017-12-07 Thread Jakub Jelinek
Hi! save_template_attributes ignored flags, when ATTR_FLAG_TYPE_IN_PLACE wasn't set on a type, it would happily attach the attributes to some existing type (in this case to integer_type_node). My first approach was to just call build_type_attribute_variant, but that ICEs on g++.dg/cpp0x/alias-dec

Re: [Patch][aarch64] Use IFUNCs to enable LSE instructions in libatomic on aarch64

2017-12-07 Thread Steve Ellcey
On Thu, 2017-12-07 at 09:56 +, James Greenhalgh wrote: >  > One obvious thing I missed in the review is that this change will break > bootstrap on systems with older assemblers. Practically, that's those of > us who are holding out on Ubuntu 14.04. -march=armv8-a+lse would go back > a little fu

[PATCH] rl78 smaxdi3 improvement

2017-12-07 Thread Sebastian Perta
Hello, The following patch improves both the speed and code size for 64 bit signed max for RL78: it emits a library function call instead of emitting code for the 64 bit max for every single time. The signed max function which was added in libgcc is hand written, so more optimal than what GCC gen

Re: [PATCH, rs6000] Gimple folding of splat_uX

2017-12-07 Thread Will Schmidt
On Thu, 2017-12-07 at 12:21 +0100, Richard Biener wrote: > On Wed, Dec 6, 2017 at 5:36 PM, Will Schmidt > wrote: > > Hi, > > Add support for gimple folding of splat_u{8,16,32}. > > Testcase coverage is primarily handled by existing tests > > testsuite/gcc.target/powerpc/fold-vec-splat_*.c > > > >

Re: [001/nnn] poly_int: add poly-int.h

2017-12-07 Thread Jeff Law
On 12/07/2017 07:46 AM, Richard Biener wrote: > On Wed, Dec 6, 2017 at 9:11 PM, Jeff Law wrote: >> On 11/13/2017 05:04 PM, Richard Sandiford wrote: >>> Richard Sandiford writes: Richard Sandiford writes: > This patch adds a new "poly_int" class to represent polynomial integers > of

[RFC] Add means to split dump file into several files -- Use in lra

2017-12-07 Thread Tom de Vries
Hi, I'm currently debugging a problem in lra, and got a bit lost in the 20k+ lines dump file. I observed that: - the lra dump file is one of the biggest ones - lra itself consists of a looping of sub-passes. So, I've: - written a dump infrastructure addition that can be used within a pass t

Re: [001/nnn] poly_int: add poly-int.h

2017-12-07 Thread Richard Biener
On Wed, Dec 6, 2017 at 9:11 PM, Jeff Law wrote: > On 11/13/2017 05:04 PM, Richard Sandiford wrote: >> Richard Sandiford writes: >>> Richard Sandiford writes: This patch adds a new "poly_int" class to represent polynomial integers of the form: C0 + C1*X1 + C2*X2 ... + Cn*Xn

FW: [PATCH] rl78 umaxdi3 improvement

2017-12-07 Thread Sebastian Perta
Hello, The following patch improves both the speed and code size for 64 bit unsigned max for RL78: it emits a library function call instead of emitting code for the 64 bit max for every single time. The unsigned max function which was added in libgcc is hand written, so more optimal than what GCC

Re: Add unroll-and-jam pass v2

2017-12-07 Thread Richard Biener
On Thu, Dec 7, 2017 at 3:11 PM, Michael Matz wrote: > Hi, > > On Mon, 20 Nov 2017, Richard Biener wrote: > >> > +static void >> > +fix_loop_structure (struct loop *loop, struct loop *old) >> >> We have a function with the same name in loop-init.c so please use a >> different name. > > Renamed to m

Re: Add unroll-and-jam pass v2

2017-12-07 Thread Michael Matz
Hi, On Mon, 20 Nov 2017, Richard Biener wrote: > > +static void > > +fix_loop_structure (struct loop *loop, struct loop *old) > > We have a function with the same name in loop-init.c so please use a > different name. Renamed to merge_loop_tree. > > + for (gsi = gsi_start_bb (bb); !gsi_end_p

Re: [PATCH] avoid bogus -Wstringop-overflow for strncpy with _FORTIFY_SOURCE (PR 82646)

2017-12-07 Thread Christophe Lyon
Hi Martin, On 6 December 2017 at 00:51, Jeff Law wrote: > On 12/05/2017 04:47 PM, Martin Sebor wrote: >> PR middle-end/82646 - bogus -Wstringop-overflow with >> -D_FORTIFY_SOURCE=2 on strncpy with range to a member array, >> >> The bug points out a false positive in a call to strncpy() when >> _

[PATCH] Fix PR83296, alternate PR67769 fix

2017-12-07 Thread Richard Biener
This reverts the fix for PR67769 and installs an alternate fix which is more targeted. This helps preserving range info where important (int this case for emitting a -Wstringop-overflow warning). Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-12-07 Richard Biener

Re: [PATCH v2] Ability to remap file names in __FILE__, etc (PR other/70268)

2017-12-07 Thread Boris Kolpackov
Thanks for the review. Second revision of the patch attached (also rebased on the current trunk). Issues that are not commented on below have been resolved as suggested. David Malcolm writes: > To my naive eyes this seems like a useful addition, but I'm hoping > someone with more knowledge of t

Re: [PR81165] discount killed stmts when sizing blocks for threading

2017-12-07 Thread Richard Biener
On Thu, Dec 7, 2017 at 1:04 PM, Alexandre Oliva wrote: > We limit the amount of copying for jump threading based on counting > stmts. This counting is overly pessimistic, because we will very > often delete stmts as a consequence of jump threading: when the final > conditional jump of a block is

[PATCH] -fdump-tree, -save-temps=obj & subdirs

2017-12-07 Thread Nathan Sidwell
There's an unfortunate interaction between -save-temps=obj and -fdump-tree- when subdirectories are in play. Consider: g++ -fdump-tree-all -save-temps=obj -c -o tgt/x.o sub/x.cc we end up with a bunch of errors of the form: sub/x.cc:1:0: error: could not open dump file ‘tgt/tgt/x.046t.profil

[PR81165] discount killed stmts when sizing blocks for threading

2017-12-07 Thread Alexandre Oliva
We limit the amount of copying for jump threading based on counting stmts. This counting is overly pessimistic, because we will very often delete stmts as a consequence of jump threading: when the final conditional jump of a block is removed, earlier SSA names computed exclusively for use in that

Re: [PATCH GCC]Introduce loop interchange pass and enable it at -O3

2017-12-07 Thread Richard Biener
On Thu, Dec 7, 2017 at 12:55 PM, Bin.Cheng wrote: > On Thu, Dec 7, 2017 at 11:39 AM, Richard Biener > wrote: >> On Thu, Dec 7, 2017 at 11:28 AM, Bin Cheng wrote: >>> Hi, >>> This is the overall loop interchange patch on gimple-linterchange branch. >>> Note the new pass >>> is enabled at -O3 le

Re: [PATCH GCC]Introduce loop interchange pass and enable it at -O3

2017-12-07 Thread Bin.Cheng
On Thu, Dec 7, 2017 at 11:39 AM, Richard Biener wrote: > On Thu, Dec 7, 2017 at 11:28 AM, Bin Cheng wrote: >> Hi, >> This is the overall loop interchange patch on gimple-linterchange branch. >> Note the new pass >> is enabled at -O3 level by default. Bootstrap and regtest on x86_64 and >> AAr

Re: [PATCH, rs6000] Gimple folding of splat_uX

2017-12-07 Thread Segher Boessenkool
Hi! On Wed, Dec 06, 2017 at 10:36:58AM -0600, Will Schmidt wrote: > Add support for gimple folding of splat_u{8,16,32}. > Testcase coverage is primarily handled by existing tests > testsuite/gcc.target/powerpc/fold-vec-splat_*.c > > One new test added to verify we continue to receive > an 'in

Re: [PATCH GCC]Introduce loop interchange pass and enable it at -O3

2017-12-07 Thread Richard Biener
On Thu, Dec 7, 2017 at 11:28 AM, Bin Cheng wrote: > Hi, > This is the overall loop interchange patch on gimple-linterchange branch. > Note the new pass > is enabled at -O3 level by default. Bootstrap and regtest on x86_64 and > AArch64(ongoing). > NOte after cost model change it is now far mor

Re: [PATCH, rs6000] Gimple folding of splat_uX

2017-12-07 Thread Richard Biener
On Thu, Dec 7, 2017 at 12:26 PM, Jakub Jelinek wrote: > On Thu, Dec 07, 2017 at 12:21:03PM +0100, Richard Biener wrote: >> > +if ( TREE_CODE (arg0) != INTEGER_CST) > > Also watch formatting, the space after ( doesn't belong there. > >> > + return false; >> >> Is there a reason to

Re: [PATCH, rs6000] Gimple folding of splat_uX

2017-12-07 Thread Jakub Jelinek
On Thu, Dec 07, 2017 at 12:21:03PM +0100, Richard Biener wrote: > > +if ( TREE_CODE (arg0) != INTEGER_CST) Also watch formatting, the space after ( doesn't belong there. > > + return false; > > Is there a reason to not do this for non-constants? (even not for > float constants?

Re: [PATCH, rs6000] Gimple folding of splat_uX

2017-12-07 Thread Richard Biener
On Wed, Dec 6, 2017 at 5:36 PM, Will Schmidt wrote: > Hi, > Add support for gimple folding of splat_u{8,16,32}. > Testcase coverage is primarily handled by existing tests > testsuite/gcc.target/powerpc/fold-vec-splat_*.c > > One new test added to verify we continue to receive > an 'invalid argumen

Re: Make more use of VECTOR_CST_ENCODED_ELT

2017-12-07 Thread Richard Biener
On Wed, Dec 6, 2017 at 4:28 PM, Richard Sandiford wrote: > This patch makes various bits of code operate directly on the new > VECTOR_CST encoding, instead of using VECTOR_CST_ELT on all elements > of the vector. > > Previous patches handled operations that produce a new VECTOR_CST, > while this p

Re: Make gimple_build_vector take a tree_vector_builder

2017-12-07 Thread Richard Biener
On Wed, Dec 6, 2017 at 4:25 PM, Richard Sandiford wrote: > This patch changes gimple_build_vector so that it takes a > tree_vector_builder instead of a size and a vector of trees. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. > Also spot-checked on sparc64-linux-gnu.

Re: Make build_vector static

2017-12-07 Thread Richard Biener
On Wed, Dec 6, 2017 at 4:26 PM, Richard Sandiford wrote: > After the previous patches, the only remaining uses of build_vector are > in the selftests in tree.c. This patch makes it static and moves it to > the selftest part of the file. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerp

Re: Use tree_vector_builder::new_binary_operation for folding

2017-12-07 Thread Richard Biener
On Wed, Dec 6, 2017 at 4:24 PM, Richard Sandiford wrote: > This patch makes fold-const.c operate directly on the VECTOR_CST > encoding when folding an operation that has two VECTOR_CST inputs. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. > Also spot-checked on sparc

Re: Use tree_vector_builder::new_unary_operation for folding

2017-12-07 Thread Richard Biener
On Wed, Dec 6, 2017 at 4:23 PM, Richard Sandiford wrote: > This patch makes fold-const.c operate directly on the VECTOR_CST > encoding when folding an operation that has a single VECTOR_CST input. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. > Also spot-checked on s

Re: Use tree_vector_builder instead of build_vector

2017-12-07 Thread Richard Biener
On Wed, Dec 6, 2017 at 4:22 PM, Richard Sandiford wrote: > This patch switches most build_vector calls over to tree_vector_builder, > using explicit encodings where appropriate. Later patches handle > the remaining uses of build_vector. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerp

Re: RFC: Variable-length VECTOR_CSTs

2017-12-07 Thread Richard Biener
On Wed, Dec 6, 2017 at 4:11 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Thu, Nov 30, 2017 at 2:18 PM, Richard Sandiford >> wrote: >>> Richard Sandiford writes: Richard Biener writes: > On Wed, Nov 29, 2017 at 12:57 PM, Richard Sandiford > wrote: >> It was clea

Re: [PR 83141] Prevent SRA from removing type changing assignment

2017-12-07 Thread Richard Biener
On Thu, 7 Dec 2017, Martin Jambor wrote: > Hi, > > On Wed, Dec 06 2017, Richard Biener wrote: > > On Wed, 6 Dec 2017, Martin Jambor wrote: > > >> ... > > >> Second is the testcase I described in my previous email. When I saw > >> > >> FAIL: gcc.dg/guality/pr54970.c -O1 line 31 a[0] == 4

[PATCH GCC]Introduce loop interchange pass and enable it at -O3

2017-12-07 Thread Bin Cheng
Hi, This is the overall loop interchange patch on gimple-linterchange branch. Note the new pass is enabled at -O3 level by default. Bootstrap and regtest on x86_64 and AArch64(ongoing). NOte after cost model change it is now far more conservative than original version. It only interchanges 11

Re: [Patch][aarch64] Use IFUNCs to enable LSE instructions in libatomic on aarch64

2017-12-07 Thread James Greenhalgh
On Fri, Sep 29, 2017 at 09:29:37PM +0100, Steve Ellcey wrote: > On Thu, 2017-09-28 at 12:31 +0100, Szabolcs Nagy wrote: > >  > > i think this should be improved, see below. > > diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am > index d731406..92d19c6 100644 > --- a/libatomic/Makefile.am

Re: [AArch64] Fix ICEs in aarch64_print_operand

2017-12-07 Thread James Greenhalgh
On Tue, Dec 05, 2017 at 05:57:37PM +, Richard Sandiford wrote: > Three related regression fixes: > > - We can't use asserts like: > > gcc_assert (GET_MODE_SIZE (mode) == 16); > > in aarch64_print_operand because it could trigger for invalid user input. > > - The output_operand_lossage

Re: Backports to gcc 7.x

2017-12-07 Thread Segher Boessenkool
On Wed, Dec 06, 2017 at 04:32:38PM -0600, Kelvin Nilsen wrote: > > I would like to backport the following patch to the GCC 7 branch. > > PR80101: Fix ICE in store_data_bypass_p > https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00953.html > > > This patch has been bootstrapped and regression tes