Re: [patch,avr] minor tweaks for 8-bit operations

2016-07-13 Thread Senthil Kumar Selvaraj
Georg-Johann Lay writes: > This patch contains some unrelated tweaks > > - Supplying no-ldregs variant for andqi3, iorqi3 where a const_int mask > affects > only 1 bit > > - Some patterns that match situations with zero_extend that can be performed > with less instructions / register

Re: [PATCH, rs6000] Fix PR target/71733, ICE with -mcpu=power9 -mno-vsx

2016-07-13 Thread Alan Modra
On Thu, Jul 14, 2016 at 12:14:10PM +0930, Alan Modra wrote: > (Which is a bug, since the advent of multi-char constraints, and > potentially affects us with our use of constraint strings like "?*wb".) On looking into this, I see it is just a documentation bug. -- Alan Modra Australia

Re: [PATCH, rs6000] Fix PR target/71733, ICE with -mcpu=power9 -mno-vsx

2016-07-13 Thread Alan Modra
On Wed, Jul 13, 2016 at 06:46:22AM -0500, Segher Boessenkool wrote: > On Wed, Jul 13, 2016 at 02:57:01PM +0930, Alan Modra wrote: > > This is what I've bootstrapped and regression tested on > > powerpc64le-linux. I'm using Peter's testcases from this thread > > rather than the one in the original

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-07-13 Thread Manuel López-Ibáñez
On 01/07/16 19:15, Martin Sebor wrote: + /* Differentiate between an exact and inexact buffer overflow +or truncation. */ + const char *fmtstr; + if (res->number_chars < 0) + fmtstr = info->bounded + ? "output may

Re: [v3 PATCH] Implement P0032R3, Homogeneous interface for variant, any and optional, for the parts concerning any and optional.

2016-07-13 Thread Ville Voutilainen
On 14 July 2016 at 02:23, Ville Voutilainen wrote: > On 14 July 2016 at 02:14, Ville Voutilainen > wrote: >> * include/std/any (_Storage()): Make constexpr and have it >> initialize _M_ptr. > > > This bit had a stale left-over

Re: [PATCH] Add missing OBJCOPY variable to Makefile.in

2016-07-13 Thread JonY
On 7/14/2016 06:22, Jeff Law wrote: > On 07/03/2016 05:56 AM, JonY wrote: >> This patch allows OBJCOPY to be set by configure. It was missing in >> Makefile.in. >> >> Patch OK? > With a ChangeLog and verification that some host/target combination > still builds this is OK. > > jeff > > Hi

Re: [v3 PATCH] Implement P0032R3, Homogeneous interface for variant, any and optional, for the parts concerning any and optional.

2016-07-13 Thread Ville Voutilainen
On 14 July 2016 at 02:14, Ville Voutilainen wrote: > * include/std/any (_Storage()): Make constexpr and have it > initialize _M_ptr. This bit had a stale left-over comment in it. Removed in the updated patch. P0032R3_2.diff.gz Description: GNU Zip

[v3 PATCH] Implement P0032R3, Homogeneous interface for variant, any and optional, for the parts concerning any and optional.

2016-07-13 Thread Ville Voutilainen
Tested on Linux-x64. 2016-07-14 Ville Voutilainen Implement P0032R3, Homogeneous interface for variant, any and optional, for the parts concerning any and optional. * include/std/any (_Storage()): Make constexpr and have it initialize _M_ptr.

Re: Implement -Wswitch-fallthrough: rs6000

2016-07-13 Thread Marek Polacek
On Wed, Jul 13, 2016 at 03:35:10PM -0700, Bruce Korb wrote: > Actually, it occurs to me: > > On Wed, Jul 13, 2016 at 11:23 AM, Marek Polacek wrote: > > My current implementation warns here, but the warning can be suppressed > > by adding /* FALLTHRU */ or [...] > > that the

Re: Implement -Wswitch-fallthrough: rs6000

2016-07-13 Thread Bruce Korb
Actually, it occurs to me: On Wed, Jul 13, 2016 at 11:23 AM, Marek Polacek wrote: > My current implementation warns here, but the warning can be suppressed > by adding /* FALLTHRU */ or [...] that the traditional "lint-ean" spelling is "/* FALLTHROUGH */", so why would the

Re: [PATCH] correct atomic_compare_exchange_n return type (c++/71675)

2016-07-13 Thread Jeff Law
On 06/28/2016 09:56 AM, Martin Sebor wrote: c++/71675 - __atomic_compare_exchange_n returns wrong type for typed enum __atomic_compare_exchange_n is documented to return bool but when its operands are of one of the character types or derived from it (such as a class enum in C++) it converts the

Re: [PATCH] Add missing OBJCOPY variable to Makefile.in

2016-07-13 Thread Jeff Law
On 07/03/2016 05:56 AM, JonY wrote: This patch allows OBJCOPY to be set by configure. It was missing in Makefile.in. Patch OK? With a ChangeLog and verification that some host/target combination still builds this is OK. jeff

Re: [PATCH 2/2] gcc/genrecog: Don't warn for missing mode on special predicates

2016-07-13 Thread Jeff Law
On 07/06/2016 01:42 PM, Andrew Burgess wrote: * Richard Sandiford [2016-07-04 09:47:20 +0100]: Thanks for removing the duplicated error check for unknown predicates. I think that error gets reported later though, so we should check for null here: return pred

Re: [PATCH v5] Allocate constant size dynamic stack space in the prologue

2016-07-13 Thread Jeff Law
On 07/11/2016 05:44 AM, Dominik Vogt wrote: On Thu, Jul 07, 2016 at 12:57:16PM +0100, Dominik Vogt wrote: On Wed, Jul 06, 2016 at 02:01:06PM +0200, Bernd Schmidt wrote: There's one thing I don't quite understand and which seems to have changed since v1: On 07/04/2016 02:19 PM, Dominik Vogt

Re: [PATCH 2/2] C++ FE: handle misspelled identifiers and typenames

2016-07-13 Thread Jeff Law
On 06/30/2016 12:53 PM, David Malcolm wrote: This is a port of the C frontend's r237714 [1] to the C++ frontend: https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01052.html offering spelling suggestions for misspelled identifiers, macro names, and some keywords (e.g. "singed" vs "signed" aka PR

Re: [PATCH 1/2] C: convert return type of lookup_name_fuzzy from tree to const char *

2016-07-13 Thread Jeff Law
On 06/30/2016 12:53 PM, David Malcolm wrote: The followup patch implements lookup_name_fuzzy for the C++ frontend. It's cleaner for that implementation to return a const char *, so this patch updates the implementation in the C frontend to have the same return type. Successfully bootstrapped on

Re: Problem in cxx_fundamental_alignment_p?

2016-07-13 Thread Jeff Law
On 07/01/2016 03:56 AM, Bernd Schmidt wrote: On 07/01/2016 10:34 AM, Dodji Seketeli wrote: The patch below was bootstrapped and tested on x86_64-linux, without issues, The patch looks good to me, thanks. Alright. I think we need a C frontend maintainer or maybe Jason to approve it.

Re: [PATCH 3/6] Add dg-final-scan-autofdo and dg-final-scan-not-autofdo

2016-07-13 Thread Andi Kleen
Jeff Law writes: > On 06/26/2016 07:50 PM, Andi Kleen wrote: >> From: Andi Kleen >> >> Autofdo outputs to different dump files and doesn't support some >> transformation that normal profiling. Add dg-final-scan-autofdo >> and dg-final-scan-not-autofdo

RE: [PATCH] Fix FFI return type for proxy classes

2016-07-13 Thread Matthew Fortune
Tom Tromey writes: > > "Matthew" == Matthew Fortune writes: > > Matthew> Tested on: x86_64-pc-linux-gnu (default and -m32), mips-linux-gnu > Matthew> mipsel-linux-gnuabi64 with no regressions. The new test only failed > Matthew> on mips-linux-gnu

RE: [PATCH] Fix FFI return type for closures in the java interpreter

2016-07-13 Thread Matthew Fortune
Tom Tromey writes: > > "Matthew" == Matthew Fortune writes: > > Matthew> Sorry for the long delay... > > No problem. > > >> This is ok. > >> Could you check? I think a -m32 build ought to show it. Maybe your > >> x86-64 build already did

Re: [PATCH, contrib] download_prerequisites: check for existing symlinks before making new ones

2016-07-13 Thread Jeff Law
On 06/27/2016 08:10 PM, Eric Gallager wrote: The last time I ran ./contrib/download_prerequisites, I already had previous symlinks set up from a previous run of the script, so `ln` followed the existing symlinks and created the new ones in the directories to which the symlinks pointed. This

Re: [PATCH 6/6] Some fixes for profile test cases for autofdo

2016-07-13 Thread Jeff Law
On 06/26/2016 07:50 PM, Andi Kleen wrote: From: Andi Kleen This fixes some basic issues with the profile test cases with autofdo. - Disable checking for value transformations that autofdo does not support. - Disable checking for fixed hit counts which autofdo does not

Re: [PATCH 1/6] Print indirect call changes in afdo dump file

2016-07-13 Thread Jeff Law
On 06/26/2016 07:50 PM, Andi Kleen wrote: From: Andi Kleen Print some information about indirect call promotions in the afdo dump file. Do it in the same format as the instrumented profiler so that the test suite can match on it. gcc/: 2016-06-26 Andi Kleen

Re: [PATCH 5/6] Clean up imports files in test suite

2016-07-13 Thread Jeff Law
On 06/26/2016 07:50 PM, Andi Kleen wrote: From: Andi Kleen autofdo create_gcov creates an extra .imports file. Always remove that too when running an autofdo test case. gcc/testsuite/: * 2016-06-26 Andi Kleen * lib/profopt.exp

Re: [PATCH 4/6] Always print gcc-auto-profile line in dump file

2016-07-13 Thread Jeff Law
On 06/26/2016 07:50 PM, Andi Kleen wrote: From: Andi Kleen not just when verbose. This ensures all command lines needed to reproduce the test case are always logged gcc/testsuite/: * 2016-06-26 Andi Kleen * lib/profopt.exp

Re: [PATCH 3/6] Add dg-final-scan-autofdo and dg-final-scan-not-autofdo

2016-07-13 Thread Jeff Law
On 06/26/2016 07:50 PM, Andi Kleen wrote: From: Andi Kleen Autofdo outputs to different dump files and doesn't support some transformation that normal profiling. Add dg-final-scan-autofdo and dg-final-scan-not-autofdo statements to the test suite so that the test cases

Re: [PATCH 2/6] Don't run instrumented value profiler changes with afdo

2016-07-13 Thread Jeff Law
On 06/26/2016 07:50 PM, Andi Kleen wrote: From: Andi Kleen The pass to transform gimple based on value profiling runs with autofdo on, but currently every transformation fails. For indirect calls autofdo does it on its own, and it doesn't suppport other value profiling.

Re: [RFC: Patch 6/6 v2] Remove second cost model from noce_try_store_flag_mask

2016-07-13 Thread Jeff Law
On 06/21/2016 09:50 AM, James Greenhalgh wrote: Hi, This transformation tries two cost models, one estimating the number of insns to use, one estimating the RTX cost of the transformed sequence. This is inconsistent with the other cost models used in ifcvt.c and unneccesary - eliminate the

Re: [RFC: Patch 5/6 v2] Improve the cost model for multiple-sets

2016-07-13 Thread Jeff Law
On 06/21/2016 09:50 AM, James Greenhalgh wrote: Hi, This patch is rewrites the cost model for bb_ok_for_noce_multiple_sets to use the max_seq_cost heuristic added in earlier patch revisions. As with the previous patch, I've used the new parameters to ensure that the testsuite is still testing

Re: [RFC: Patch 4/6 v2] Modify cost model for noce_cmove_arith

2016-07-13 Thread Jeff Law
On 06/21/2016 09:50 AM, James Greenhalgh wrote: Hi, This patch clears up the cost model for noce_try_cmove_arith. We lose the "??? FIXME: Magic number 5" comment, and gain a more realistic cost model for if-converting memory accesses. This is the patch that has the chance to cause the largest

Re: [RFC: Patch 2/6 v2] Factor out the comparisons against magic numbers in ifcvt

2016-07-13 Thread Jeff Law
On 06/21/2016 09:50 AM, James Greenhalgh wrote: Hi, This patch pulls the comparisons between if_info->branch_cost and a magic number representing an instruction count to a common function. While I'm doing it, I've documented the instructions that the magic numbers relate to, and updated them

Re: [RFC: Patch 3/6 v2] Remove if_info->branch_cost

2016-07-13 Thread Jeff Law
On 06/21/2016 09:50 AM, James Greenhalgh wrote: Hi, This patch removes what is left of branch_cost uses, moving them to use the new hook and tagging each left over spot with a TODO to revisit them. All these uses are in rtx costs units, so we don't have more work to do at this point.

Re: [RFC: Patch 1/6 v2] New target hook: max_noce_ifcvt_seq_cost

2016-07-13 Thread Jeff Law
On 06/21/2016 09:50 AM, James Greenhalgh wrote: On Fri, Jun 03, 2016 at 12:39:42PM +0200, Richard Biener wrote: On Thu, Jun 2, 2016 at 6:53 PM, James Greenhalgh wrote: Hi, This patch introduces a new target hook, to be used like BRANCH_COST but with a guaranteed

Re: [PATCH PR68030/PR69710][RFC]Introduce a simple local CSE interface and use it in vectorizer

2016-07-13 Thread Jeff Law
On 05/25/2016 05:22 AM, Bin Cheng wrote: Hi, As analyzed in PR68303 and PR69710, vectorizer generates duplicated computations in loop's pre-header basic block when creating base address for vector reference to the same memory object. Not a huge surprise. Loop optimizations generally have a

Re: [PATCH] Fix PR31096

2016-07-13 Thread Jeff Law
On 04/14/2016 12:45 AM, Hurugalawadi, Naveen wrote: Hi, >> I think we should handle at least INTEGER_CST and SSA_NAME >> with VRP, and it seems natural to add a VRP check The check should be added in the tree_single_nonzero_warnv_p for SSA_NAME case for tree_expr_nonzero_p. However, for

Re: [PATCH][AArch64] Allow multiple-of-8 immediate offsets for TImode LDP/STP

2016-07-13 Thread Evandro Menezes
On 07/13/16 11:14, Kyrill Tkachov wrote: Hi all, The most common way to load and store TImode value in aarch64 is to perform an LDP/STP of two X-registers. This is the *movti_aarch64 pattern in aarch64.md. There is a bug in the logic in aarch64_classify_address where it validates the offset

Re: [JAVA PATCH] Enable more array bounds check elimination

2016-07-13 Thread Jeff Law
On 02/22/2016 11:10 AM, ro...@nextmovesoftware.com wrote: It has been a while since my last contribution. The following patch allows GCC's optimizers to more aggressively eliminate and optimize java array bounds checks. The results are quite impressive, for example producing a 26%

Re: [PATCH] Fix Bug 17896: The expression (a>0 & b>0) should give clearer warning message (-Wparentheses)

2016-07-13 Thread Jeff Law
On 01/30/2016 06:35 AM, Prasad Ghangal wrote: Hi! This is my first proposed patch for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17896. I was willing to do it using "APPEARS_TO_BE_BOOLEAN_EXPR_P(CODE, ARG)" to check booleans but gcc doesn't allow (bootstraping fails). Hence I am using

Re: [PATCH] simplify-rtx.c: start adding selftests (v2)

2016-07-13 Thread Jeff Law
On 07/06/2016 01:30 PM, David Malcolm wrote: This might be a bit confusing when more tests are added, since pointer equality is only useful in certain specific cases (e.g. when you know you're dealing with CONST_INTs or pseudo registers). How about making ASSERT_RTX_EQ check for rtx_equal_p

Re: Implement -Wswitch-fallthrough

2016-07-13 Thread Marc Glisse
On Wed, 13 Jul 2016, Marek Polacek wrote: On Wed, Jul 13, 2016 at 08:39:28PM +0200, Marc Glisse wrote: On Wed, 13 Jul 2016, Marek Polacek wrote: Does "__attribute__((fallthrough));" have any advantages over "__builtin_fallthrough()"? Not a strong argument, but compilers that don't know the

Re: Implement -Wswitch-fallthrough: rs6000

2016-07-13 Thread Bruce Korb
On Wed, Jul 13, 2016 at 11:39 AM, Marek Polacek wrote: > Most likely what you saw was in cxx_pretty_printer::declaration_specifiers. I only saw it once and, of course, it was once too often. ;) If you fix it, it would sooth my sensibilities as the fixincludes maintainer,

Re: Implement -Wswitch-fallthrough

2016-07-13 Thread Marek Polacek
On Wed, Jul 13, 2016 at 08:39:28PM +0200, Marc Glisse wrote: > On Wed, 13 Jul 2016, Marek Polacek wrote: > > > Does "__attribute__((fallthrough));" have any advantages over > > "__builtin_fallthrough()"? > > Not a strong argument, but compilers that don't know the construct will give > an error

Re: Implement -Wswitch-fallthrough: rs6000

2016-07-13 Thread Marek Polacek
On Wed, Jul 13, 2016 at 11:30:34AM -0700, Bruce Korb wrote: > > On Mon, Jul 11, 2016 at 01:36:02PM -0700, Bruce Korb wrote: > > [[putrid code deleted]] > >> Does this patch mean that the above got fixed? I mean, if you're > >> going to fret over linguistic tags to make falling through explicit, >

Re: Implement -Wswitch-fallthrough

2016-07-13 Thread Marc Glisse
On Wed, 13 Jul 2016, Marek Polacek wrote: Does "__attribute__((fallthrough));" have any advantages over "__builtin_fallthrough()"? Not a strong argument, but compilers that don't know the construct will give an error on the builtin, and just a warning on the attribute (and ignore the

Re: [v3 PATCH] Implement P0307R2, Making Optional Greater Equal Again.

2016-07-13 Thread Ville Voutilainen
On 13 July 2016 at 21:25, Daniel Krügler wrote: > How would you feel about the introduction of an internal trait > __is_boolean_testable, that would test both is_convertible bool> and is_constructible for now, so that we could > reuse that at places like

Re: Implement -Wswitch-fallthrough: rs6000

2016-07-13 Thread Bruce Korb
> On Mon, Jul 11, 2016 at 01:36:02PM -0700, Bruce Korb wrote: > [[putrid code deleted]] >> Does this patch mean that the above got fixed? I mean, if you're >> going to fret over linguistic tags to make falling through explicit, >> it would seem the above code is pretty sore-thumby, yes? > > My

Re: [v3 PATCH] Implement P0307R2, Making Optional Greater Equal Again.

2016-07-13 Thread Daniel Krügler
2016-07-13 12:05 GMT+02:00 Ville Voutilainen : > On 13 July 2016 at 01:31, Jonathan Wakely wrote: >> On 11/07/16 23:41 +0300, Ville Voutilainen wrote: >>> >>> @@ -785,41 +785,60 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >>> } >>> }; >>> >>> +

Re: Implement -Wswitch-fallthrough: rs6000

2016-07-13 Thread Marek Polacek
On Mon, Jul 11, 2016 at 01:36:02PM -0700, Bruce Korb wrote: > I'm curious about this. In the process of developing a code analysis > tool, I found some GCC code that was, basically: > > switch (v) { > case 0: > if (e) { > do_something(); > } else { > case 1: > do_something_else(); >

Re: Implement -Wswitch-fallthrough

2016-07-13 Thread Marek Polacek
On Mon, Jul 11, 2016 at 04:28:32PM -0400, NightStrike wrote: > On Mon, Jul 11, 2016 at 3:43 PM, Marek Polacek wrote: > > But then the [[fallthrough]] attribute was > > approved for C++17 [1], and that's what has got me to do all this. > > ... > > I added a new builtin, > >

Re: Debug algorithms

2016-07-13 Thread Jonathan Wakely
On 22/06/16 22:05 +0200, François Dumont wrote: Hi Here is eventually the so long promized patch to introduce Debug algos similarly to Debug containers. I'm trying to decide how much benefit this really gives us, and whether the obfuscation to the code (even more namespaces involved, and

Re: Fix PR44281 (bad RA with global regs)

2016-07-13 Thread Bernd Schmidt
On 07/13/2016 05:29 PM, Dominik Vogt wrote: Unfortunately this patch (or whatever got actually committed) has broken the gcc.target/s390/pr679443.c test case, which is a bit fishy (see code snippet below). I assign most registers to global variables and then use some complicated arithmetics

[PATCH] libstdc++/71856 Define _GLIBCXX_PARALLEL_ASSERTIONS

2016-07-13 Thread Jonathan Wakely
This fixes a conflict between how Parallel Mode has always used the _GLIBCXX_ASSERTIONS macro and the new meaning we gave it for GCC 6 (enabling the lightweight debug checks). It doesn't make sense for Parallel Mode to own that macro, and it might be useful to enable Parallel Mode assertions

[patch] Make basic_string::replace forward to different overload

2016-07-13 Thread Jonathan Wakely
Currently the overload of basic_string::replace taking an initializer_list forwards to the overload taking two const _Char* arguments, which does some debug checks, then forwards to the overload taking a const _Char* and a size_type, which repeats the debug checks. The initializer_list overload

[patch] Make __allocated_ptr::_S_raw_ptr static

2016-07-13 Thread Jonathan Wakely
These functions should have been static members all along. tested x86_64-linux, committed to trunk. commit 421ccb84e555efcd7e3e0123dc85dd40155f1e82 Author: Jonathan Wakely Date: Wed Jul 13 17:34:04 2016 +0100 Make __allocated_ptr::_S_raw_ptr static *

Re: [PATCH] Amend dump expectation in slsr-8.c (PR, tree-optimization/71490)

2016-07-13 Thread Jeff Law
On 07/13/2016 08:47 AM, Martin Liška wrote: Hello. As mentioned in [1], one slsr transformation is gone, thus we need to change expected number of multiplications. Ready to be installed? Thanks, Martin [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71490#c5 Isn't that a code quality

Re: [PATCH, DOC] Enhance documentation of -fipa-ra option.

2016-07-13 Thread Alexander Monakov
> --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -7260,7 +7260,9 @@ any called function. In that case it is not necessary > to save and restore > them around calls. This is only possible if called functions are part of > same compilation unit as current function and they are

[PATCH, DOC] Enhance documentation of -fipa-ra option.

2016-07-13 Thread Martin Liška
Hello. I accidentally learned that -fipa-ra option is disabled if: /* Do not use IPA optimizations for register allocation if profiler is active or port does not emit prologue and epilogue as RTL. */ if (profile_flag || !targetm.have_prologue () || !targetm.have_epilogue ())

[PATCH][AArch64] Allow multiple-of-8 immediate offsets for TImode LDP/STP

2016-07-13 Thread Kyrill Tkachov
Hi all, The most common way to load and store TImode value in aarch64 is to perform an LDP/STP of two X-registers. This is the *movti_aarch64 pattern in aarch64.md. There is a bug in the logic in aarch64_classify_address where it validates the offset in the address used to load a TImode value.

Re: [PATCH GCC]Improve loop-niter to handle possible infinite loop.

2016-07-13 Thread Bin.Cheng
On Fri, Jul 1, 2016 at 11:33 AM, Richard Biener wrote: > On Tue, Jun 28, 2016 at 8:18 AM, Bin Cheng wrote: >> Hi, >> At the moment, loop niter analyzer depends on simple_iv to understand >> control induction variable in order to do further niter

[PATCH test]Refine test string for scev-8.c

2016-07-13 Thread Bin Cheng
Hi, Dump information of IVOPT has been improved, while scanning string in gcc.dg/tree-ssa/scev-8.c was left over because it appears as PASS. This patch changes test string to what should be tested. Test result checked. This is an obvious change. Thanks, bin gcc/testsuite/ChangeLog 2016-07-12

Re: [PATCH] Add non-const overload of std::string::data()

2016-07-13 Thread Jonathan Wakely
On 13/07/16 15:59 +0100, Jonathan Wakely wrote: On 13/07/16 12:12 +0100, Jonathan Wakely wrote: Also fix confusion between pointer and _CharT*, so that allocators with fancy pointers work correctly. The _M_data() function returns pointer, but we were using it where _CharT* was required. This

Re: [PATCH, ARM 5/7] Add support for MOVT/MOVW to ARMv8-M Baseline

2016-07-13 Thread Thomas Preudhomme
On Wednesday 13 July 2016 17:14:52 Christophe Lyon wrote: > Hi Thomas, Hi Christophe, > > I'm seeing: > gcc.target/arm/pr42574.c: syntax error in target selector > "arm_thumb1_ok && { ! arm_thumb1_movt_ok }" for " dg-do 1 compile { > arm_thumb1_ok && { ! arm_thumb1_movt_ok } } " Oops. I

Re: Fix PR44281 (bad RA with global regs)

2016-07-13 Thread Dominik Vogt
On Fri, Feb 19, 2016 at 11:03:02PM +0100, Bernd Schmidt wrote: > In this PR, we generate unnecessarily bad code for code that > declares a global register var. Since global regs get added to > fixed_regs, IRA never considers them as candidates. However, we do > seem to have proper data flow

Re: [PATCH] Fix PR24574

2016-07-13 Thread Martin Liška
On 07/13/2016 04:15 PM, Richard Biener wrote: > so not exactly a 50/50 prediction. It is predicted by early return > predictor it seems. If I make the predictor not apply we predict > it as 50/50 chance. Hmm. Honza? Yes, following test-case eliminates the early return predictor: int foo(int

Re: [PATCH, ARM 5/7] Add support for MOVT/MOVW to ARMv8-M Baseline

2016-07-13 Thread Christophe Lyon
Hi Thomas, On 13 July 2016 at 12:01, Kyrill Tkachov wrote: > Hi Thomas, > > > On 07/07/16 15:32, Thomas Preudhomme wrote: >> >> Hi Kyrill, >> >> Please find an updated version in attachment. Please note I made quite a >> few >> other changes as well. The most

Re: [PATCH GCC]Resolve compilation time known alias checks in vectorizer

2016-07-13 Thread Bin.Cheng
On Fri, Jul 1, 2016 at 1:06 PM, Richard Biener wrote: > On Tue, Jun 28, 2016 at 8:18 AM, Bin.Cheng wrote: >> On Tue, Jun 14, 2016 at 1:57 PM, Richard Biener >> wrote: >>> On Mon, Jun 13, 2016 at 12:01 PM, Bin Cheng

Re: [PATCH] Add non-const overload of std::string::data()

2016-07-13 Thread Jonathan Wakely
On 13/07/16 12:12 +0100, Jonathan Wakely wrote: Also fix confusion between pointer and _CharT*, so that allocators with fancy pointers work correctly. The _M_data() function returns pointer, but we were using it where _CharT* was required. This introduces a new _M_c_str() function which returns

[PATCH] Amend dump expectation in slsr-8.c (PR, tree-optimization/71490)

2016-07-13 Thread Martin Liška
Hello. As mentioned in [1], one slsr transformation is gone, thus we need to change expected number of multiplications. Ready to be installed? Thanks, Martin [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71490#c5 >From ac130165f6c8166c28227fec2a6fa3afbccadb27 Mon Sep 17 00:00:00 2001 From:

Re: [PATCH] disable IPA-cp cloning for functions with target_clones attribute

2016-07-13 Thread Jeff Law
On 06/24/2016 02:41 PM, Evgeny Stupachenko wrote: Hi, Fix ICE when IPA-cp and target_clones are applied to the same function. Is the patch ok for trunk? Thanks, Evgeny 2016-06-24 Evgeny Stupachenko gcc/ * ipa-cp.c (determine_versionability): Do not create

Re: [PATCH] disable IPA-cp cloning for functions with target_clones attribute

2016-07-13 Thread Jeff Law
On 07/12/2016 03:31 AM, Martin Jambor wrote: Hi, On Fri, Jun 24, 2016 at 01:41:05PM -0700, Evgeny Stupachenko wrote: Hi, Fix ICE when IPA-cp and target_clones are applied to the same function. Is the patch ok for trunk? I can't approve anything but since I wrote most of IPA-CP, it may count

Rework C/C++ OpenACC routine parsing (was: C/C++: Simplify handling of location information for OpenACC routine directives)

2016-07-13 Thread Thomas Schwinge
Hi! On Wed, 13 Jul 2016 11:25:46 +0200, I wrote: > Working on something else regarding the C/C++ OpenACC routine directive, > I couldn't but untangle [...] > (Another C/C++ OpenACC routine > cleanup patch is emerging, depending on this one.) Here it is; likewise, OK for trunk? (Further cleanup

Re: [PATCH] Fix PR24574

2016-07-13 Thread Richard Biener
On Wed, 13 Jul 2016, Alexander Monakov wrote: > Hi, > > On Wed, 13 Jul 2016, Richard Biener wrote: > > The following adds the ability to transform > > > > if (x != 0) > >x = x / 10; > > > > to > > > > x = x / 10; > > > > as requested by PR. Plus it adds some more ops where such

[PATCH] Fix PR33315, simple store sinking/commoning

2016-07-13 Thread Richard Biener
The following adds a simple ad-hoc (matching other code) way to perform sinking and merging of common stores to a CFG merger to the SSA code sinking pass. On cc1-files (from the GCC 4.7 branch head) this performs 930 such merges out of which 366 are stores with the same value (and thus require

Re: [PATCH] Fix PR24574

2016-07-13 Thread Alexander Monakov
Hi, On Wed, 13 Jul 2016, Richard Biener wrote: > The following adds the ability to transform > > if (x != 0) >x = x / 10; > > to > > x = x / 10; > > as requested by PR. Plus it adds some more ops where such transform > is possible. In the bugzilla, you said, > Only for -Os, it's

Re: [PATCH] Fix Fortran DO loop fallback

2016-07-13 Thread Martin Liška
On 07/13/2016 12:32 PM, Richard Biener wrote: > Changelog has a swapped entry. > > Ok with fixing that. > Richard. Fixed and installed as r238300. M.

[PATCH] Fix PR24574

2016-07-13 Thread Richard Biener
The following adds the ability to transform if (x != 0) x = x / 10; to x = x / 10; as requested by PR. Plus it adds some more ops where such transform is possible. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2016-07-13 Richard Biener

Re: [gomp4] backport fixes for PR71704

2016-07-13 Thread Thomas Schwinge
Hi! On Tue, 12 Jul 2016 13:03:43 -0700, Cesar Philippidis wrote: > This patch contains both Jakub's OpenMP and my OpenACC fixes for > PR71704. For reference, the discussion for the original patches can be > found here

Re: Fix loop_only_exit_p

2016-07-13 Thread Jan Hubicka
> Ah, ok. I dove into the code and that indeed seems to be the case. > > Why is that function ignoring volatiles but not volatile asms or > old-style asms? I think the only control-flow transfer asms are > allowed to make are asm gotos? You mean if (gasm *asm_stmt = dyn_cast (t)) if

Re: [patch] Fix type merging deficiency during WPA

2016-07-13 Thread Eric Botcazou
> As tree merging really replaces trees it has to error on the side of not > merging while canonical type merging has to error on the side of "merging" > to make types alias. OK, then the former won't be sufficient for Ada, there are known cases where producers and clients of a package cannot

[Patch, testsuite] Fix some bogus testsuite failures for avr

2016-07-13 Thread Senthil Kumar Selvaraj
Hi, This patch requires int32plus and ptr32plus for a couple of tests, tweaks Wduplicated-cond-3.c to use a smaller constant that fits in 16 bits, and marks one test as too big for avr. Committed to trunk. Regards Senthil 2016-07-13 Senthil Kumar Selvaraj

Re: [PATCH, Fortran, OpenACC] Fix PR70598, Fortran host_data ICE (ping x3)

2016-07-13 Thread Chung-Lin Tang
Ping x3 On 06/21/2016 02:18 PM, Chung-Lin Tang wrote: Ping x2 On 2016/6/7 08:03 PM, Chung-Lin Tang wrote: Ping. On 2016/5/11 02:57 AM, Bernhard Reutner-Fischer wrote: On May 9, 2016 4:26:50 PM GMT+02:00, Chung-Lin Tang wrote: Hi, this patch resolves an ICE for

Re: [PATCH, rs6000] Fix PR target/71733, ICE with -mcpu=power9 -mno-vsx

2016-07-13 Thread Segher Boessenkool
On Wed, Jul 13, 2016 at 02:57:01PM +0930, Alan Modra wrote: > This is what I've bootstrapped and regression tested on > powerpc64le-linux. I'm using Peter's testcases from this thread > rather than the one in the original patch submission, because that one > relies on -O0 not reducing the

Re: Fix loop_only_exit_p

2016-07-13 Thread Richard Biener
On Wed, 13 Jul 2016, Jan Hubicka wrote: > > > > I'd rather not expose/change need_fake_edge_p as that has a very > > specific purpose. > > > > Why don't you simply add a call to is_ctrl_altering_stmt on the > > last stmt of the block in loop_only_exit_p? It's a waste of > > time doing stuff on

[PATCH] Add non-const overload of std::string::data()

2016-07-13 Thread Jonathan Wakely
Also fix confusion between pointer and _CharT*, so that allocators with fancy pointers work correctly. The _M_data() function returns pointer, but we were using it where _CharT* was required. This introduces a new _M_c_str() function which returns a _CharT* instead, and uses that for c_str() and

[patch,avr] minor tweaks for 8-bit operations

2016-07-13 Thread Georg-Johann Lay
This patch contains some unrelated tweaks - Supplying no-ldregs variant for andqi3, iorqi3 where a const_int mask affects only 1 bit - Some patterns that match situations with zero_extend that can be performed with less instructions / register pressure. - comparing HI against -1 Ok for

Re: [PATCH, ARM 6/7, ping1] Add support for CB(N)Z and (U|S)DIV to ARMv8-M Baseline

2016-07-13 Thread Thomas Preudhomme
On Tuesday 12 July 2016 15:57:41 Kyrill Tkachov wrote: > On 12/07/16 11:26, Thomas Preudhomme wrote: > > Hi Kyrill, > > Hi Thomas, > > > On Friday 20 May 2016 14:22:48 Kyrill Tkachov wrote: > >> Hi Thomas, > >> > >> On 17/05/16 11:14, Thomas Preudhomme wrote: > >>> Ping? > >>> > >>> ***

Re: [v3 PATCH] Implement P0307R2, Making Optional Greater Equal Again.

2016-07-13 Thread Jonathan Wakely
On 13/07/16 13:05 +0300, Ville Voutilainen wrote: Ha, that was indeed in just one place. See below. I made the above changes and also made converting assignment operators SFINAE. That SFINAE seems consistent with how constructors and relops work. And yes, there are still some members like

libgomp: In OpenACC testing, cycle though $offload_targets, and by default only build for the offload target that we're actually going to test

2016-07-13 Thread Thomas Schwinge
Hi! As discussed before, "offloading compilation is slow; I suppose because of having to invoke several tools (LTO streaming -> mkoffload -> offload compilers, assemblers, linkers -> combine the resulting images; but I have not done a detailed analysis on that)". For this reason it is beneficial

Re: [PATCH] Fix Fortran DO loop fallback

2016-07-13 Thread Richard Biener
On Tue, Jul 12, 2016 at 4:54 PM, Martin Liška wrote: > On 07/12/2016 03:15 PM, Richard Biener wrote: >> The scan for 1 *n_ after FRE looks still useful. Btw, the testcase >> doesn't fail for me, >> we _do_ hoist the division in PRE, just not with -m32 anymore. Can >> you confirm

Re: [v3 PATCH] Implement P0307R2, Making Optional Greater Equal Again.

2016-07-13 Thread Ville Voutilainen
On 13 July 2016 at 13:05, Ville Voutilainen wrote: >> Dunno why this has _Tp const& rather than const _Tp&, could you fix it >> while you're in the file anyway? It's a bit confusing to have one >> place using a different style. > > Ha, that was indeed in just one

Re: [v3 PATCH] Implement P0307R2, Making Optional Greater Equal Again.

2016-07-13 Thread Ville Voutilainen
On 13 July 2016 at 01:31, Jonathan Wakely wrote: > On 11/07/16 23:41 +0300, Ville Voutilainen wrote: >> >> @@ -785,41 +785,60 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >> } >> }; >> >> + template >> +using __optional_relop_t = >> +

Re: [PATCH, ARM 5/7] Add support for MOVT/MOVW to ARMv8-M Baseline

2016-07-13 Thread Kyrill Tkachov
Hi Thomas, On 07/07/16 15:32, Thomas Preudhomme wrote: Hi Kyrill, Please find an updated version in attachment. Please note I made quite a few other changes as well. The most important one was to add new ARMv8-M Baseline only alternatives to the two movt insns in order to have non predicable

Re: [PATCH] disable IPA-cp cloning for functions with target_clones attribute

2016-07-13 Thread Jan Hubicka
> Hi, > > On Fri, Jun 24, 2016 at 01:41:05PM -0700, Evgeny Stupachenko wrote: > > Hi, > > > > Fix ICE when IPA-cp and target_clones are applied to the same function. > > Is the patch ok for trunk? > > I can't approve anything but since I wrote most of IPA-CP, it may > count that I am fine with

Re: Fix loop_only_exit_p

2016-07-13 Thread Jan Hubicka
> > I'd rather not expose/change need_fake_edge_p as that has a very > specific purpose. > > Why don't you simply add a call to is_ctrl_altering_stmt on the > last stmt of the block in loop_only_exit_p? It's a waste of > time doing stuff on every stmt that can only make a difference > on the

C/C++: Simplify handling of location information for OpenACC routine directives

2016-07-13 Thread Thomas Schwinge
Hi! Working on something else regarding the C/C++ OpenACC routine directive, I couldn't but untangle that arcane location_t handling, currently using a dummy OMP_CLAUSE_SEQ. Along the way, I also updated some comments, and simplified some code. OK for trunk? (Another C/C++ OpenACC routine

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-07-13 Thread David Malcolm
On Tue, 2016-07-12 at 16:35 -0600, Martin Sebor wrote: > On 07/12/2016 10:12 AM, Manuel López-Ibáñez wrote: > > On 12/07/16 16:59, Martin Sebor wrote: > > > You're probably right. I suspect I have a tendency to overuse > > > the quotes (e.g, the -Wplacement-new warning also quotes the > > >

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-07-13 Thread Marek Polacek
On Tue, Jul 12, 2016 at 04:35:50PM -0600, Martin Sebor wrote: > Based on the gcc.pot file it does look like quoted numbers are > far less common than unquoted ones (just 10 messages where they > are quoted vs 528 unquoted). > > I've added this as a guideline to the Wiki and assuming no one >

Re: [PATCH] Fix PR71104 - call gimplification

2016-07-13 Thread Richard Biener
On Wed, May 18, 2016 at 7:43 PM, Jeff Law wrote: > On 05/17/2016 06:28 AM, Richard Biener wrote: >> >> >> The following patch addresses PR71104 which shows verify-SSA ICEs >> after gimplify-into-SSA. The issue is that for returns-twice calls >> we gimplify register uses in the

Re: [PATCH] Allow fwprop to undo vectorization harm (PR68961)

2016-07-13 Thread Richard Biener
On Wed, 13 Jul 2016, Uros Bizjak wrote: > On Sun, Jul 10, 2016 at 10:12 AM, Uros Bizjak wrote: > > On Wed, Jul 6, 2016 at 3:18 PM, Richard Biener wrote: > > > >>> > 2016-07-04 Richard Biener > >>> > > >>> > PR