Re: [PATCH][25/25] Remove GENERIC stmt combining from SCCVN

2015-10-01 Thread Richard Biener
On Wed, 30 Sep 2015, Richard Biener wrote: > > This is the last patch in the series and it finally ditches the > stmt combining code from SCCVN which uses GENERIC. I've been sitting > on this for a while because of the "bad" interface that new mprts_hook > is but I couldn't think of a better way

Re: [PATCH] Clear flow-sensitive info in phiopt (PR tree-optimization/67769)

2015-10-01 Thread Richard Biener
On Wed, 30 Sep 2015, Marek Polacek wrote: > Another instance of out of date SSA range info. Before phiopt1 we had > > : > if (N_2(D) >= 0) > goto ; > else > goto ; > > : > iftmp.0_3 = MIN_EXPR ; > > : > # iftmp.0_5 = PHI <0(2), iftmp.0_3(3)> > value_4 = (short int) iftm

Re: [PATCH] Optimize certain end of loop conditions into min/max operation

2015-10-01 Thread Michael Collison
ChangeLog formatting and test case fixed. On 09/30/2015 12:30 PM, Marc Glisse wrote: On Fri, 18 Sep 2015, Marc Glisse wrote: +(bit_and:c (op @0 @1) (op @0 @2)) :c seems useless here. On the other hand, it might make sense to use op:s since this is mostly useful if it removes the 2 original

Re: [PATCH 2/2] call scev analysis in scop-detection as in sese-to-poly

2015-10-01 Thread Tobias Grosser
On 10/01/2015 12:11 AM, Sebastian Pop wrote: Before our rewrite of the scop detection, we used to not have a valid SESE region under hand, and so we used to do more ad-hoc analysis of data references by trying to prove that at all levels of a loop nest the data references would be still valid. N

Re: [PATCH] Optimize certain end of loop conditions into min/max operation

2015-10-01 Thread Marc Glisse
On Thu, 1 Oct 2015, Michael Collison wrote: ChangeLog formatting and test case fixed. Oups, sorry for the lack of precision, but I meant indenting the code in match.pd, I hadn't even looked at the ChangeLog. -- Marc Glisse

Re: [gomp4] remove goacc locking

2015-10-01 Thread Thomas Schwinge
Hi Nathan! On Mon, 28 Sep 2015 11:56:09 -0400, Nathan Sidwell wrote: > I've committed this to remove the now no longer needed lock and unlock > builtins > and related infrastructure. If I understand correctly, it is an implementation detail of the nvptx offloading implementation that it doesn'

Re: [PATCH] Optimize certain end of loop conditions into min/max operation

2015-10-01 Thread Michael Collison
Marc, Ah I did misunderstand you. Patch with match.pd formatting fix. On 10/01/2015 01:05 AM, Marc Glisse wrote: On Thu, 1 Oct 2015, Michael Collison wrote: ChangeLog formatting and test case fixed. Oups, sorry for the lack of precision, but I meant indenting the code in match.pd, I hadn't

Re: [Patch 2/2 ARM/AArch64] Add a new Cortex-A53 scheduling model

2015-10-01 Thread Kyrill Tkachov
On 25/09/15 08:59, James Greenhalgh wrote: Hi, Hi James, This patch introduces a new scheduling model for Cortex-A53. Bootstrapped and tested on arm-none-linux-gnueabi and aarch64-none-linux-gnu and checked with a variety of popular benchmarking and microbenchmarking suites to show a benef

Re: [Patch 2/2 ARM/AArch64] Add a new Cortex-A53 scheduling model

2015-10-01 Thread Marcus Shawcroft
On 25/09/15 08:59, James Greenhalgh wrote: Hi, This patch introduces a new scheduling model for Cortex-A53. Bootstrapped and tested on arm-none-linux-gnueabi and aarch64-none-linux-gnu and checked with a variety of popular benchmarking and microbenchmarking suites to show a benefit. OK? Than

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-01 Thread Richard Biener
On Wed, 30 Sep 2015, Jan Hubicka wrote: > Hi, > this implements the idea we discussed at Cauldron to not use TYPE_CANONICAL > for > useless_type_conversion_p. The basic idea is that TYPE_CANONICAL is language > specific and should not be part of definition of the Gimple type system that > shoul

Re: Re: Ping: New suggested patch for pr 62242 & pr 52332

2015-10-01 Thread Paul Richard Thomas
Dear Louis, I have just a minor nit to pick; otherwise your patch is OK for trunk. I do not think that quoting the code in the first comment is necessary. If anybody is interested, they can walz off to expand_expr_real_1 themselves. The textual part of your comment is perfectly clear. Many thank

Re: [GCC, ARM] armv8 linux toolchain asan testcase fail due to stl missing conditional code

2015-10-01 Thread Kyrill Tkachov
On 30/09/15 17:39, Kyrill Tkachov wrote: On 09/06/15 09:17, Kyrill Tkachov wrote: On 05/06/15 14:14, Kyrill Tkachov wrote: On 05/06/15 14:11, Richard Earnshaw wrote: On 05/06/15 14:08, Kyrill Tkachov wrote: Hi Shiva, On 05/06/15 10:42, Shiva Chen wrote: Hi, Kyrill I add the testcase as st

Re: [PATCH] Add new hooks ASM_OUTPUT_START_FUNCTION_HEADER ...

2015-10-01 Thread Bernd Schmidt
On 10/01/2015 08:30 AM, Dominik Vogt wrote: However, you probably should add a sentence or two to the documentation to specify ordering wrt other parts of the header of a function. Any suggestions where that information should be placed in the documentation? Just in the hook definition. Be

Re: Re: Re: Ping: New suggested patch for pr 62242 & pr 52332

2015-10-01 Thread Louis Krupp
Paul, I'll delete the code in the comment. I'm doing one more update and build just to make sure everything still works as intended. I'm not sure what paperwork I need. Shall I try to do "svn commit" and see what happens? Louis On Thu, 01 Oct 2015 02:10:34 -0700 Paul Richard Thomas wr

Re: [Patch ifcvt costs 0/3] Introduce a new target hook for ifcvt costs.

2015-10-01 Thread Bernd Schmidt
On 09/29/2015 04:31 PM, James Greenhalgh wrote: On the other side of the equation, we want a cost for the converted sequence. We can build a cost of the generated rtl sequence, but for targets like AArch64 this is going to be wildly off. AArch64 will expand (a > b) ? x : y; as a set to the CC reg

Re: [Patch 2/2 ARM/AArch64] Add a new Cortex-A53 scheduling model

2015-10-01 Thread James Greenhalgh
On Thu, Oct 01, 2015 at 09:33:07AM +0100, Marcus Shawcroft wrote: > On 25/09/15 08:59, James Greenhalgh wrote: > > > > Hi, > > > > This patch introduces a new scheduling model for Cortex-A53. > > > > Bootstrapped and tested on arm-none-linux-gnueabi and aarch64-none-linux-gnu > > and checked with a

Re: [PATCH] Fix warnings building pdp11 port

2015-10-01 Thread Richard Biener
On Wed, Sep 30, 2015 at 6:43 PM, Jeff Law wrote: > On 09/30/2015 01:48 AM, Richard Biener wrote: >> >> On Tue, Sep 29, 2015 at 6:55 PM, Jeff Law wrote: >>> >>> The pdp11 port fails to build with the trunk because of a warning. >>> Essentially VRP determines that the result of using BRANCH_COST is

Re: [PATCH] Update SSA_NAME manager to use two lists

2015-10-01 Thread Richard Biener
On Wed, Sep 30, 2015 at 7:44 PM, Jeff Law wrote: > > The SSA_NAME manager currently has a single free list. As names are > released, they're put on the free list and recycled immediately. > > This has led to several problems through the years -- in particular removal > of an edge may result in re

Re: Fold acc_on_device

2015-10-01 Thread Richard Biener
On Wed, Sep 30, 2015 at 9:22 PM, Jakub Jelinek wrote: > On Wed, Sep 30, 2015 at 03:01:22PM -0400, Nathan Sidwell wrote: >> On 09/30/15 08:46, Richard Biener wrote: >> >> >>>Please don't add any new GENERIC based builtin folders. Instead add to >> >>>gimple-fold.c:gimple_fold_builtin >> >> Is this

Re: [ARM] Use vector wide add for mixed-mode adds

2015-10-01 Thread Michael Collison
Kyrill, I have modified the patch to address your comments. I also modified check_effective_target_vect_widen_sum_hi_to_si_pattern in target-supports.exp to indicate that arm neon supports vector widen sum of HImode to SImode. This resolved several test suite failures. Successfully tested on

[C PATCH, committed] Explain parameters better for convert_for_assignment

2015-10-01 Thread Marek Polacek
The location parameters description was IMHO inadequate. The following should be much clearer. Applying to trunk. 2015-10-01 Marek Polacek * c-typeck.c (convert_for_assignment): Improve commentary. diff --git gcc/c/c-typeck.c gcc/c/c-typeck.c index a11ccb2..11e487c 100644 --- gcc/c/

[PATCH, testsuite]: Fix gcc.target/i386/pr65105-1.c test

2015-10-01 Thread Uros Bizjak
Hello! Attached patch fixes gcc.target/i386/pr65105-1.c: a) As a runtime SSE2 test, we have to check for target SSE2 support and use proper test infrastructure. b) A runtime test can't check output assembly without -save-temps. The patch also use another misuse of -save-temps in gcc.target/i386

Re: [PATCH] rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)

2015-10-01 Thread Richard Biener
On Thu, Oct 1, 2015 at 8:08 AM, Segher Boessenkool wrote: > After the shrink-wrapping patches the prologue will often be pushed > "deeper" into the function, which in turn means the software trace cache > pass will more often want to duplicate the basic block containing the > prologue. This cause

Re: [PATCH, testsuite]: Fix gcc.target/i386/pr65105-1.c test

2015-10-01 Thread Ilya Enkovich
2015-10-01 13:12 GMT+03:00 Uros Bizjak : > Hello! > > Attached patch fixes gcc.target/i386/pr65105-1.c: Thanks! Ilya > > a) As a runtime SSE2 test, we have to check for target SSE2 support > and use proper test infrastructure. > > b) A runtime test can't check output assembly without -save-temps.

[PATCH, i386, AVX-512] Update extract_even_odd w/ AVX-512BW insns.

2015-10-01 Thread Kirill Yukhin
Hello, Patch in the bottom improves insns sequences for strided loads. E.g. on `-march=skylake-avx512' for this test: unsigned char yy[1]; unsigned char xx[1]; void __attribute__ ((noinline)) generateMTFValues (unsigned char s) { unsigned char i; for (i = 0; i < s; i++)

Re: [PATCH] rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)

2015-10-01 Thread Bernd Schmidt
Do we have other ports with local labels in define_insns? I see some in darwin.md as well which your patch doesn't handle btw., otherwise suspicious %0: also appears (only) in h8300.md. arc.md also has a suspicious case in its doloop_end_i pattern. It is reasonably common, and defining cannot

Re: [patch] Leave errno unchanged by successful std::stoi etc

2015-10-01 Thread Jonathan Wakely
commit 502928c8061343e82e982e06299c11d465f64b6c Author: Jonathan Wakely Date: Wed Sep 30 14:10:58 2015 +0100 Save-and-restore errno more carefully in libstdc++ * doc/xml/manual/diagnostics.xml: Document use of errno. * config/locale/generic/c_locale.cc (_Save_errno): New he

Re: [PATCH] Clarify __atomic_compare_exchange_n docs

2015-10-01 Thread Andrew Haley
On 09/29/2015 04:21 PM, Sandra Loosemore wrote: > What is "weak compare_exchange", and what is "the strong variation", and > how do they differ in terms of behavior? It's in C++11 29.6.5: Remark: The weak compare-and-exchange operations may fail spuriously, that is, return false while leaving th

[PATCH] Fix PR67783, quadraticness in IPA inline analysis

2015-10-01 Thread Richard Biener
The following avoids quadraticness in the loop depth by only considering loop header defs as IVs for the analysis of the loop_stride predicate. This will miss cases like foo (int inv) { for (i = inv; i < n; ++i) { int derived_iv = i + i * inv; ... } } but I doubt that's important in

Re: [PATCH] fortran/66979 -- FLUSH requires a UNIT number in the spec-list

2015-10-01 Thread Mikael Morin
Le 01/10/2015 01:58, Steve Kargl a écrit : When FLUSH is used with a flulsh-spec-list, a unit is required. Thus, a statement like 'flush(iostat=i)' would lead to an ICE because gfortran was dereference a pointer to a non-existant unit number. The attached patch was built and tested on x86-*-free

Re: [build] Support PIE on Solaris

2015-10-01 Thread Rainer Orth
Rainer Orth writes: > Rainer Orth writes: > >> Beyond the reasons for the bundled Solaris CRTs already cited in >> >> https://gcc.gnu.org/ml/gcc-patches/2015-09/msg01638.html >> >> they need to be PIC to support position independent executables (PIE). >> >> While linker support for PIE has

[gomp4.1] Fixup doacross lastprivate handling

2015-10-01 Thread Jakub Jelinek
On Thu, Sep 24, 2015 at 08:32:10PM +0200, Jakub Jelinek wrote: > some edge for that case and condition checking), lastprivate also needs > checking for all the cases, This patch handles lastprivate in the doacross loops. In certain cases (C++ class iterators and addressable iterators) the user IV

Re: [PATCH] fortran/67758 -- Prevent ICE caused by misplaced COMMON

2015-10-01 Thread Mikael Morin
Le 01/10/2015 02:07, Steve Kargl a écrit : On Wed, Sep 30, 2015 at 05:06:30PM -0700, Steve Kargl wrote: Patch built and regression tested on x86_64-*-freebsd. OK to commit? The patch prevents the dereferencing of a NULL pointer by jumping out of the cleanup of a list of COMMON blocks. Hold on,

Re: [PATCH] Fix PR67783, quadraticness in IPA inline analysis

2015-10-01 Thread Richard Biener
On Thu, 1 Oct 2015, Richard Biener wrote: > > The following avoids quadraticness in the loop depth by only considering > loop header defs as IVs for the analysis of the loop_stride predicate. > This will miss cases like > > foo (int inv) > { > for (i = inv; i < n; ++i) > { > int derived_i

Re: [PATCH] fortran/67616 -- Fix ICE in BLOCK with a DATA statement

2015-10-01 Thread Mikael Morin
Le 01/10/2015 02:03, Steve Kargl a écrit : The attached patch was built and tested on x86_64-*-freebsd. OK to commit? The patch prevents an ICE in a BLOCK construct that uses a DATA statement and default initialization. The problem was that the derived typed was declared in the host and was not

Re: [gomp4] remove goacc locking

2015-10-01 Thread Nathan Sidwell
On 10/01/15 04:14, Thomas Schwinge wrote: Hi Nathan! On Mon, 28 Sep 2015 11:56:09 -0400, Nathan Sidwell wrote: I've committed this to remove the now no longer needed lock and unlock builtins and related infrastructure. If I understand correctly, it is an implementation detail of the nvptx of

Re: Fold acc_on_device

2015-10-01 Thread Nathan Sidwell
On 10/01/15 06:03, Richard Biener wrote: On Wed, Sep 30, 2015 at 9:22 PM, Jakub Jelinek wrote: Wouldn't it be better to just emit GIMPLE here instead? So tree res = make_ssa_name (boolean_type_node); gimple g = gimple_build_assign (res, EQ_EXPR, arg0,

Re: [PATCH] x86 interrupt attribute

2015-10-01 Thread Yulia Koval
Ok, here is the patch. The interrupt and exception handlers are called by x86 processors. X86 hardware pushes information onto stack and calls the handler. The requirements are 1. Both interrupt and exception handlers must use the 'IRET' instruction, instead of the 'RET' instruction, to return f

[PATCH] Tune for lakemont

2015-10-01 Thread Yulia Koval
Hi, The patch below contains some tuning changes for Lakemont, introduced by H.J. Lu. Bootstraped/regtested for Linux/x86_64. Ok for trunk? * gcc/config/i386/x86-tune.def (X86_TUNE_USE_BT): Enable for Lakemont. (X86_TUNE_ZERO_EXTEND_WITH_AND): Disable for Lakemont. Julia

Re: [SH][committed] Improve treg_set_expr matching

2015-10-01 Thread Oleg Endo
On Mon, 2015-09-28 at 23:03 +0900, Oleg Endo wrote: > Hi, > > This patch has been hanging around in my queue for a while. Basically, > it uses reverse_condition to get better matching for treg_set_expr. > Tested on sh-elf with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-m

Re: [PATCH] Tune for lakemont

2015-10-01 Thread Uros Bizjak
On Thu, Oct 1, 2015 at 2:37 PM, Yulia Koval wrote: > Hi, > > The patch below contains some tuning changes for Lakemont, introduced > by H.J. Lu. Bootstraped/regtested for Linux/x86_64. Ok for trunk? > > * gcc/config/i386/x86-tune.def (X86_TUNE_USE_BT): Enable > for Lakemont. >

[patch] Add counter inits to zero_iter_bb in expand_omp_for_init_counts

2015-10-01 Thread Tom de Vries
Hi, this patch adds initialization in zero_iter_bb of counters introduced in expand_omp_for_init_counts. This removes the need to set TREE_NO_WARNING on those counters. Build on x86_64 and reg-tested with gomp.exp and target-libgomp c.exp. OK for trunk, if bootstrap and reg-test on x86_64 su

Re: Fold acc_on_device

2015-10-01 Thread Richard Biener
On Thu, Oct 1, 2015 at 2:33 PM, Nathan Sidwell wrote: > On 10/01/15 06:03, Richard Biener wrote: >> >> On Wed, Sep 30, 2015 at 9:22 PM, Jakub Jelinek wrote: > > >>> Wouldn't it be better to just emit GIMPLE here instead? >>> So >>>tree res = make_ssa_name (boolean_type_node); >>>gimple g

Re: [patch] Add counter inits to zero_iter_bb in expand_omp_for_init_counts

2015-10-01 Thread Jakub Jelinek
On Thu, Oct 01, 2015 at 02:46:01PM +0200, Tom de Vries wrote: > this patch adds initialization in zero_iter_bb of counters introduced in > expand_omp_for_init_counts. > > This removes the need to set TREE_NO_WARNING on those counters. Why do you think it is a good idea? I'd be afraid it slows th

[PATCH, testsuite]: Skip gcc.dg/lto/pr55113_0.c on all x86 targets.

2015-10-01 Thread Uros Bizjak
Hello! There is no point to use -fshort-double on x86 targets, although it works with -mno-sse, where it avoids construction of DFmode based vector builtins. So, disable non-sensical test on all x86 targets. 2015-10-01 Uros Bizjak * gcc.dg/lto/pr55113_0.c: Skip on all x86 targets. Teste

[PATCH][AArch64] Don't allow -mgeneral-regs-only to change the .arch assembler directives

2015-10-01 Thread Kyrill Tkachov
Hi all, As part of the SWITCHABLE_TARGET work I inadvertently changed the behaviour of -mgeneral-regs-only with respect to the .arch directives that we emit. The behaviour of -mgeneral-regs-only in GCC 5 and earlier is such that it disallows the usage of FP/SIMD registers but does *not* stop th

[PATCH][RTL ifcvt] PR 67786, 67787: Check that intermediate instructions in the basic block don't clobber a reg used in condition

2015-10-01 Thread Kyrill Tkachov
Hi all, This patch fixes the two wrong-code PRs. The problem is related to the way the noce_emit_cmove helper function emits conditional moves. For some targets it re-emits the comparison from the condition block and then the conditional move after we have emitted the two basic blocks. Later pa

Re: [PATCH] Clear flow-sensitive info in phiopt (PR tree-optimization/67769)

2015-10-01 Thread Marek Polacek
On Thu, Oct 01, 2015 at 09:57:54AM +0200, Richard Biener wrote: > On Wed, 30 Sep 2015, Marek Polacek wrote: > > > Another instance of out of date SSA range info. Before phiopt1 we had > > > > : > > if (N_2(D) >= 0) > > goto ; > > else > > goto ; > > > > : > > iftmp.0_3 = MIN_E

Re: [PATCH] fortran/67758 -- Prevent ICE caused by misplaced COMMON

2015-10-01 Thread Mikael Morin
Le 01/10/2015 14:16, Mikael Morin a écrit : Le 01/10/2015 02:07, Steve Kargl a écrit : On Wed, Sep 30, 2015 at 05:06:30PM -0700, Steve Kargl wrote: Patch built and regression tested on x86_64-*-freebsd. OK to commit? The patch prevents the dereferencing of a NULL pointer by jumping out of the

Re: [PATCH] Clear flow-sensitive info in phiopt (PR tree-optimization/67769)

2015-10-01 Thread Marek Polacek
On Thu, Oct 01, 2015 at 03:26:34PM +0200, Richard Biener wrote: > No, this looks fine. Thanks. Let me do proper testing then. (And I suppose we might want this in gcc-5 as well.) Marek

Re: [PATCH] Clear flow-sensitive info in phiopt (PR tree-optimization/67769)

2015-10-01 Thread Richard Biener
On Thu, 1 Oct 2015, Marek Polacek wrote: > On Thu, Oct 01, 2015 at 09:57:54AM +0200, Richard Biener wrote: > > On Wed, 30 Sep 2015, Marek Polacek wrote: > > > > > Another instance of out of date SSA range info. Before phiopt1 we had > > > > > > : > > > if (N_2(D) >= 0) > > > goto ; > >

Re: [PATCH] Clear flow-sensitive info in phiopt (PR tree-optimization/67769)

2015-10-01 Thread Richard Biener
On Thu, 1 Oct 2015, Marek Polacek wrote: > On Thu, Oct 01, 2015 at 03:26:34PM +0200, Richard Biener wrote: > > No, this looks fine. > > Thanks. Let me do proper testing then. (And I suppose we might want this > in gcc-5 as well.) Yes. All the bugs are latent for GCC 5 (and also 4.9), they ar

Re: [patch] Add counter inits to zero_iter_bb in expand_omp_for_init_counts

2015-10-01 Thread Tom de Vries
On 01/10/15 14:49, Jakub Jelinek wrote: On Thu, Oct 01, 2015 at 02:46:01PM +0200, Tom de Vries wrote: this patch adds initialization in zero_iter_bb of counters introduced in expand_omp_for_init_counts. This removes the need to set TREE_NO_WARNING on those counters. Why do you think it is a g

Re: [PATCH] Tune for lakemont

2015-10-01 Thread H.J. Lu
On Thu, Oct 1, 2015 at 5:42 AM, Uros Bizjak wrote: > On Thu, Oct 1, 2015 at 2:37 PM, Yulia Koval wrote: >> Hi, >> >> The patch below contains some tuning changes for Lakemont, introduced >> by H.J. Lu. Bootstraped/regtested for Linux/x86_64. Ok for trunk? >> >> * gcc/config/i386/x86-tune.

[PATCH] Remove gimplifier use from PRE

2015-10-01 Thread Richard Biener
The following patch from the match-and-simplify branch removes gimplifier use from PRE replacing it with use of the gimple_build API building GIMPLE directly. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2015-10-01 Richard Biener * tree-ssa-pre.c (create_c

Add a build_real_truncate helper function

2015-10-01 Thread Richard Sandiford
...which simplifies the match.pd patterns I'm about to add. Bootstrapped & regression-tested on x86_64-linux-gnu. OK to install? Thanks, Richard gcc/ * real.h (build_real_truncate): Declare. * real.c (build_real_truncate): New function. (strip_float_extensions): Use it.

Cache reals for 1/4, 1/6 and 1/9

2015-10-01 Thread Richard Sandiford
We have a global 1/2 and a cached 1/3, but recalculate 1/4, 1/6 and 1/9 each time we need them. That seems a bit arbitrary and makes the folding code more noisy (especially once it's moved to match.pd). This patch caches the other three constants too. Bootstrapped & regression-tested on x86_64-l

Re: Add a build_real_truncate helper function

2015-10-01 Thread Bernd Schmidt
On 10/01/2015 03:48 PM, Richard Sandiford wrote: ...which simplifies the match.pd patterns I'm about to add. Bootstrapped & regression-tested on x86_64-linux-gnu. OK to install? Ok. Bernd

[gomp4] backport some changes

2015-10-01 Thread Nathan Sidwell
I've applied this to gomp4 to apply some changes to these areas that occurred on merging to trunk. nathan 2015-10-01 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_validate_dims): Rename to ... (nvptx_goacc_validate_dims): ... here. (TARGET_GOACC_VALIDATE_DIMS): Update. * target.def (valid

[Patch match.pd] Add a simplify rule for x * copysign (1.0, y);

2015-10-01 Thread James Greenhalgh
Hi, If it is cheap enough to treat a floating-point value as an integer and to do bitwise arithmetic on it (as it is for AArch64) we can rewrite: x * copysign (1.0, y) as: x ^ (y & (1 << sign_bit_position)) This patch implements that rewriting rule in match.pd, and a testcase expecting th

Re: Cache reals for 1/4, 1/6 and 1/9

2015-10-01 Thread Bernd Schmidt
On 10/01/2015 03:51 PM, Richard Sandiford wrote: We have a global 1/2 and a cached 1/3, but recalculate 1/4, 1/6 and 1/9 each time we need them. That seems a bit arbitrary and makes the folding code more noisy (especially once it's moved to match.pd). This patch caches the other three constants

Re: [PATCH] rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)

2015-10-01 Thread David Edelsohn
On Thu, Oct 1, 2015 at 2:08 AM, Segher Boessenkool wrote: > After the shrink-wrapping patches the prologue will often be pushed > "deeper" into the function, which in turn means the software trace cache > pass will more often want to duplicate the basic block containing the > prologue. This cause

Re: [PATCH] rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)

2015-10-01 Thread David Edelsohn
On Thu, Oct 1, 2015 at 2:08 AM, Segher Boessenkool wrote: > After the shrink-wrapping patches the prologue will often be pushed > "deeper" into the function, which in turn means the software trace cache > pass will more often want to duplicate the basic block containing the > prologue. This cause

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-01 Thread Eric Botcazou
> After dropping the check I needed to solve two issues. First is that we need > a definition of useless conversions for aggregates. As discussed earlier I > made it to depend only on size. The basic idea is that only operations you > can do on gimple with those are moves and field accesses. Field

Re: Fold acc_on_device

2015-10-01 Thread Nathan Sidwell
On 10/01/15 08:46, Richard Biener wrote: On Thu, Oct 1, 2015 at 2:33 PM, Nathan Sidwell wrote: use TREE_TYPE (arg0) for the integer cst. Otherwise looks good to me. thanks, fixed up and applied (also noticed a copy & paste malfunction setting the location) nathan 2015-10-01 Nathan Sidw

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-01 Thread Richard Biener
On Thu, 1 Oct 2015, Eric Botcazou wrote: > > After dropping the check I needed to solve two issues. First is that we need > > a definition of useless conversions for aggregates. As discussed earlier I > > made it to depend only on size. The basic idea is that only operations you > > can do on gimp

Re: [Patch match.pd] Add a simplify rule for x * copysign (1.0, y);

2015-10-01 Thread pinskia
> > On Oct 1, 2015, at 6:57 AM, James Greenhalgh wrote: > > > Hi, > > If it is cheap enough to treat a floating-point value as an integer and > to do bitwise arithmetic on it (as it is for AArch64) we can rewrite: > > x * copysign (1.0, y) > > as: > > x ^ (y & (1 << sign_bit_position)) W

Re: Do not use TYPE_CANONICAL in useless_type_conversion

2015-10-01 Thread Eric Botcazou
> Do we require that to match? I don't remember that we do. For scalar types (and arrays of scalars), the alignment is essentially encoded in the size/mode pair but that's not the case for non-array aggregate types, so declaring a conversion that changes the alignment as useless seems weird. -

[PATCH, MIPS, PR/61114] Migrate to reduc_..._scal optabs.

2015-10-01 Thread Simon Dardis
Hello, This patch migrates the MIPS backend to the new vector reduction optabs. No new regressions, ok to apply? Thanks, Simon gcc/ChangeLog: * config/mips/loongson.md (vec_loongson_extract_lo_): New, extract low part to scalar. (reduc_uplus_): Remove. (reduc_p

Go patch committed: Only check OPT_m32 if TARGET_CAN_SPLIT_STACK_64BIT

2015-10-01 Thread Ian Lance Taylor
The option OPT_m32 is not defined on all targets. This patch only checks for it if TARGET_CAN_SPLIT_STACK_64BIT is defined, which is the only case where we need to know the value. Bootstrapped on x86_64-unknown-linux-gnu. Committed to mainline. Ian 2015-10-01 Ian Lance Taylor PR go/66870 *

C PATCH for c/65345 (file-scope _Atomic expansion with floats)

2015-10-01 Thread Marek Polacek
Joseph reminded me that I had forgotten about this patch. As mentioned here , I'm removing the XFAILs in the tests so people are likely to see new FAILs. I think the following targets will need similar fix as the one below: * MIPS * rs6000

Re: [Patch match.pd] Add a simplify rule for x * copysign (1.0, y);

2015-10-01 Thread James Greenhalgh
On Thu, Oct 01, 2015 at 03:28:22PM +0100, pins...@gmail.com wrote: > > > > On Oct 1, 2015, at 6:57 AM, James Greenhalgh > > wrote: > > > > > > Hi, > > > > If it is cheap enough to treat a floating-point value as an integer and > > to do bitwise arithmetic on it (as it is for AArch64) we can r

[PATCH, i386, AVX-512, doc] Mention all AVX-512 switches in invoke.texi.

2015-10-01 Thread Kirill Yukhin
Hello, This patch adds missing AVX-512 switches to invoke.texi. `make pdf` looks ok. Is it ok for trunk and gcc-5-branch (a week after check in to trunk)? gcc/ * doc/invoke.texi: Mention -mavx512vl, -mavx512bw, -mavx512dq, -mavx521vbmi, -mavx512ifma. Add missing opindex-es. -- T

Re: C PATCH for c/65345 (file-scope _Atomic expansion with floats)

2015-10-01 Thread David Edelsohn
On Thu, Oct 1, 2015 at 10:49 AM, Marek Polacek wrote: > Joseph reminded me that I had forgotten about this patch. As mentioned > here , I'm > removing the XFAILs in the tests so people are likely to see new FAILs. > > I think the following

Re: [Patch match.pd] Add a simplify rule for x * copysign (1.0, y);

2015-10-01 Thread pinskia
> On Oct 1, 2015, at 7:51 AM, James Greenhalgh wrote: > > On Thu, Oct 01, 2015 at 03:28:22PM +0100, pins...@gmail.com wrote: >>> >>> On Oct 1, 2015, at 6:57 AM, James Greenhalgh >>> wrote: >>> >>> >>> Hi, >>> >>> If it is cheap enough to treat a floating-point value as an integer and >>> t

[gomp4] gimple fold acc_on_device

2015-10-01 Thread Nathan Sidwell
I've applied this version of the acc_on_device folding to gomp4. See https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00074.html for the trunk discussion. nathan 2015-10-01 Nathan Sidwell * builtins.c: Don't include gomp-constants.h. (fold_builtin_1): Don't fold acc_on_device here. * gimpl

Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947)

2015-10-01 Thread Alan Hayward
On 30/09/2015 13:45, "Richard Biener" wrote: >On Wed, Sep 23, 2015 at 5:51 PM, Alan Hayward >wrote: >> >> >> On 18/09/2015 14:53, "Alan Hayward" wrote: >> >>> >>> >>>On 18/09/2015 14:26, "Alan Lawrence" wrote: >>> On 18/09/15 13:17, Richard Biener wrote: > > Ok, I see. >

RE: [PATCH][AArch64] Add separate insn sched class for vector LDP & STP

2015-10-01 Thread Evandro Menezes
Hi, Rama. My patch changed the type of a couple of A64 insns from "neon_load2_2reg_q" and "neon_store2_2reg_q". However, neither ThunderX nor Xgene referred to these types, only A57 and A53 did. So I didn't feel that I'd be the best person to add them to those machines. Thank you, -- Evand

Re: [Patch match.pd] Add a simplify rule for x * copysign (1.0, y);

2015-10-01 Thread Michael Matz
Hi, On Thu, 1 Oct 2015, James Greenhalgh wrote: > > > x * copysign (1.0, y) > > > > > > x ^ (y & (1 << sign_bit_position)) > > > > Also I think this can only be done for finite and non trapping types. > > That may be well true, I swithered either way and went for no checks, > but I'd happi

Re: [PATCH] Fix warnings building pdp11 port

2015-10-01 Thread Jeff Law
On 10/01/2015 03:49 AM, Richard Biener wrote: On Wed, Sep 30, 2015 at 6:43 PM, Jeff Law wrote: On 09/30/2015 01:48 AM, Richard Biener wrote: On Tue, Sep 29, 2015 at 6:55 PM, Jeff Law wrote: The pdp11 port fails to build with the trunk because of a warning. Essentially VRP determines that t

Re: [Patch match.pd] Add a simplify rule for x * copysign (1.0, y);

2015-10-01 Thread Jakub Jelinek
On Thu, Oct 01, 2015 at 05:43:15PM +0200, Michael Matz wrote: > Hi, > > On Thu, 1 Oct 2015, James Greenhalgh wrote: > > > > > x * copysign (1.0, y) > > > > > > > > x ^ (y & (1 << sign_bit_position)) > > > > > > Also I think this can only be done for finite and non trapping types. > > > > Th

Re: [PATCH] x86 interrupt attribute

2015-10-01 Thread Uros Bizjak
On Thu, Oct 1, 2015 at 2:24 AM, H.J. Lu wrote: > On Wed, Sep 30, 2015 at 12:53 PM, Yulia Koval wrote: >> Done. >> > > + /* If true, the current function is an interrupt service > + routine as specified by the "interrupt" attribute. */ > + BOOL_BITFIELD is_interrupt : 1; > + > + /* If true

Re: [Patch match.pd] Add a simplify rule for x * copysign (1.0, y);

2015-10-01 Thread Joseph Myers
On Thu, 1 Oct 2015, Michael Matz wrote: > both cases. The catch is that strictly speaking (NaN * -1.0) needs to > deliver NaN, not -NaN (operations involving quiet NaNs need to provide > one of the input NaNs as result), and here both are not equivalent. OTOH > the sign of NaNs isn't specifie

Re: [PATCH] x86 interrupt attribute

2015-10-01 Thread H.J. Lu
On Thu, Oct 1, 2015 at 8:59 AM, Uros Bizjak wrote: > On Thu, Oct 1, 2015 at 2:24 AM, H.J. Lu wrote: >> On Wed, Sep 30, 2015 at 12:53 PM, Yulia Koval wrote: >>> Done. >>> >> >> + /* If true, the current function is an interrupt service >> + routine as specified by the "interrupt" attribute.

Re: [Patch match.pd] Add a simplify rule for x * copysign (1.0, y);

2015-10-01 Thread Michael Matz
Hi, On Thu, 1 Oct 2015, Jakub Jelinek wrote: > But if x is a sNaN, then the multiplication will throw an exception, while > the transformed operation will not. Hmm, that's right, silly me. > So perhaps it should be guarded by > !HONOR_SNANS (TYPE_MODE (type)) > ? That makes sense, yes. Ciao,

Re: [PATCH] Update SSA_NAME manager to use two lists

2015-10-01 Thread Jeff Law
On 10/01/2015 04:00 AM, Richard Biener wrote: Apart from what Jakub said - this keeps the list non-recycled for example after DCE if that doesnt call cleanup_cfg. Likewise after passes that call cleanup_cfg manually. It also doesn't get called after IPA transform passes (which would require c

Re: [Patch match.pd] Add a simplify rule for x * copysign (1.0, y);

2015-10-01 Thread Michael Matz
Hi, On Thu, 1 Oct 2015, Joseph Myers wrote: > On Thu, 1 Oct 2015, Michael Matz wrote: > > > both cases. The catch is that strictly speaking (NaN * -1.0) needs to > > deliver NaN, not -NaN (operations involving quiet NaNs need to provide > > one of the input NaNs as result), and here both are

Re: [PATCH] x86 interrupt attribute

2015-10-01 Thread Uros Bizjak
On Thu, Oct 1, 2015 at 6:08 PM, H.J. Lu wrote: > On Thu, Oct 1, 2015 at 8:59 AM, Uros Bizjak wrote: >> On Thu, Oct 1, 2015 at 2:24 AM, H.J. Lu wrote: >>> On Wed, Sep 30, 2015 at 12:53 PM, Yulia Koval wrote: Done. >>> >>> + /* If true, the current function is an interrupt service >>>

Re: C PATCH for c/65345 (file-scope _Atomic expansion with floats)

2015-10-01 Thread Marek Polacek
On Thu, Oct 01, 2015 at 11:02:09AM -0400, David Edelsohn wrote: > On Thu, Oct 1, 2015 at 10:49 AM, Marek Polacek wrote: > > Joseph reminded me that I had forgotten about this patch. As mentioned > > here , I'm > > removing the XFAILs in th

Re: [PATCH] fortran/67758 -- Prevent ICE caused by misplaced COMMON

2015-10-01 Thread Steve Kargl
On Thu, Oct 01, 2015 at 03:29:05PM +0200, Mikael Morin wrote: > Le 01/10/2015 14:16, Mikael Morin a écrit : > > Le 01/10/2015 02:07, Steve Kargl a écrit : > >> On Wed, Sep 30, 2015 at 05:06:30PM -0700, Steve Kargl wrote: > >>> Patch built and regression tested on x86_64-*-freebsd. > >>> OK to commi

[PATCH] correctly handle non affine data references

2015-10-01 Thread Sebastian Pop
PR tree-optimization/66980 * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Return false when data reference analysis has failed. --- gcc/graphite-scop-detection.c| 7 +++ gcc/testsuite/gcc.dg/graphite/scop-pr66980.c | 10 ++ 2 files c

Re: Fold acc_on_device

2015-10-01 Thread Andrew MacLeod
On 09/30/2015 08:46 AM, Richard Biener wrote: On Wed, Sep 30, 2015 at 2:18 PM, Nathan Sidwell wrote: Please don't add any new GENERIC based builtin folders. Instead add to gimple-fold.c:gimple_fold_builtin Otherwise you're just generating more work for us who move foldings from builtins.c to

Do not describe -std=c11 etc. as experimental in c.opt help text

2015-10-01 Thread Joseph Myers
I noticed that c.opt still described -std=c11 and related options as experimental in the --help text. This patch fixes this. Jason, note that -std=gnu++11 and -std=gnu++14 still have that text, contrary to the descriptions of -std=c++11 and -std=c++14. Bootstrapped with no regressions on x86_64-

Re: Fold acc_on_device

2015-10-01 Thread Nathan Sidwell
On 10/01/15 13:00, Andrew MacLeod wrote: btw, not that it's necessarily important, but I'm about to submit the include reduction patches today, and it turns out this line is the first use of anything from cgraph.h in builtins.c. So if this is "the way" of doing the test, be aware it adds a dep

Re: [PATCH] rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)

2015-10-01 Thread Segher Boessenkool
On Thu, Oct 01, 2015 at 12:14:44PM +0200, Richard Biener wrote: > On Thu, Oct 1, 2015 at 8:08 AM, Segher Boessenkool > wrote: > > After the shrink-wrapping patches the prologue will often be pushed > > "deeper" into the function, which in turn means the software trace cache > > pass will more ofte

Re: [patch] libstdc++/67747 Allocate space for dirent::d_name

2015-10-01 Thread Jonathan Wakely
On 30/09/15 09:30 -0600, Martin Sebor wrote: On 09/30/2015 05:01 AM, Jonathan Wakely wrote: On 29/09/15 12:54 -0600, Martin Sebor wrote: On 09/29/2015 05:37 AM, Jonathan Wakely wrote: POSIX says that dirent::d_name has an unspecified length, so calls to readdir_r must pass a buffer with enough

Re: [PATCH] Clarify __atomic_compare_exchange_n docs

2015-10-01 Thread Jonathan Wakely
On 01/10/15 12:28 +0100, Andrew Haley wrote: On 09/29/2015 04:21 PM, Sandra Loosemore wrote: What is "weak compare_exchange", and what is "the strong variation", and how do they differ in terms of behavior? It's in C++11 29.6.5: Remark: The weak compare-and-exchange operations may fail spurio

Re: [PATCH] Clarify __atomic_compare_exchange_n docs

2015-10-01 Thread Andrew Haley
On 10/01/2015 06:32 PM, Jonathan Wakely wrote: > I would suggest we don't try to reproduce the standard definition, but > just say the weak version can fail spuriously and the strong can't. > IMHO this isn't the place to educate people in the fine points of > low-level atomics. As it says, "when in

Re: [PATCH] rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)

2015-10-01 Thread Segher Boessenkool
On Thu, Oct 01, 2015 at 10:08:50AM -0400, David Edelsohn wrote: > Is this expensive enough that it is worth limiting the definition of > the hook to configurations that include 32-bit SVR4 support so that > not every configuration incurs the overhead? I don't think so. That won't save the call to

Re: [PATCH] Clarify __atomic_compare_exchange_n docs

2015-10-01 Thread Jonathan Wakely
On 01/10/15 18:34 +0100, Andrew Haley wrote: On 10/01/2015 06:32 PM, Jonathan Wakely wrote: I would suggest we don't try to reproduce the standard definition, but just say the weak version can fail spuriously and the strong can't. IMHO this isn't the place to educate people in the fine points of

  1   2   >