libgo patch committed: Pass -X option to ar on AIX

2017-11-22 Thread Ian Lance Taylor
This libgo patch by Tony Reix passes a -X option to ar on AIX, so that it does the right object file handling. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === -

[RFA][PATCH] Use SCEV conditionally within vr-values and evrp range analysis

2017-11-22 Thread Jeff Law
Clients of the evrp range analysis may not have initialized the SCEV infrastructure, and in fact my not want to (DOM for example). Yet inside both vr-values.c and gimple-ssa-evrp-analyze.c we have calls into SCEV (that will fault/abort if SCEV is not properly initialized). This patch allows clie

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

2017-11-22 Thread Jeff Law
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 PM, Martin Sebor wrote: >>> On 11/18/2017 12:53 AM, Jeff Law wrote: On 11/17/2017 12:36 PM, Martin Sebor wrote: > The attached patch enhances -Wstringop-overflow to detect more

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

2017-11-22 Thread Jeff Law
On 11/16/2017 02:29 PM, Martin Sebor wrote: > Ping. > > I've fixed the outstanding false positive exposed by the Linux > kernel.  The kernel builds with four instances of the warning, > all of them valid (perfect overlap in memcpy). > > I also built Glibc.  It shows one instance of the warning, a

Re: [RFA][PATCH] 8/n Pull evrp range analyzer into its own file

2017-11-22 Thread Jeff Law
On 11/22/2017 02:01 PM, Marc Glisse wrote: > On Sat, 18 Nov 2017, Jeff Law wrote: > >> * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c. > > With the move to C++, wasn't there a policy to name new files *.cc > instead of *.c? I'd wondered about that myself. The only three file

Re: [C++ PATCH] Fix qsort checking ICE on member_name_cmp (PR c++/82401)

2017-11-22 Thread Nathan Sidwell
On 11/22/2017 03:57 PM, Jakub Jelinek wrote: Hi! My reading of insert_late_enum_def_bindings etc. is that it intentionally appends stuff into the vector without checking if the trees are already present there (on the testcase below in particular CONST_DECLs for the e1 and e2 enumerators which ar

Fix PR rtl-optimization/83030

2017-11-22 Thread Eric Botcazou
This is a regression present on mainline for SPARC under the form of the failure of g++.dg/tree-prof/partition1.C. The delayed-branch scheduling pass happily deletes a CROSSING_JUMP_P jump insn, which was precisely added to bridge the gap between the hot and cold section. It turns out that CRO

Re: Adjust empty class parameter passing ABI (PR c++/60336)

2017-11-22 Thread Marek Polacek
On Wed, Nov 22, 2017 at 10:07:04PM +0100, Jakub Jelinek wrote: > On Mon, Nov 13, 2017 at 11:32:14AM +0100, Marek Polacek wrote: > > * g++.dg/abi/pr68355.C: New test. > > This testcase FAILs on i686-linux, my understanding is that the ABI > changed only if TARGET_64BIT on x86_64/i686-linux. C

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Marc Glisse
(please try to convince your mailer to use something other than Content-Type: application/octet-stream for a patch) On Tue, 21 Nov 2017, Dominik Inführ wrote: this patch tries to extend tree-ssa-dce.c to remove unnecessary new/delete-pairs (it already does that for malloc/free). Clang does it

Re: RFC/A: Stop cselib.c recording sets of the frame pointer

2017-11-22 Thread Richard Sandiford
Jakub Jelinek writes: > On Wed, Nov 22, 2017 at 05:46:26PM +, Richard Sandiford wrote: >> 2017-11-22 Richard Sandiford >> >> gcc/ >> * cselib.c (expand_loc, cselib_expand_value_rtx_1): Change >> justification for checking for the stack and hard frame pointers. >> Check them

[committed] jit: update test suite for change to -Warray-bounds

2017-11-22 Thread David Malcolm
jit.dg/test-error-array-bounds.c is a test of how libgccjit handles errors coming from the middle-end, using -Warray-bounds as an example. It started failing as of r254830 (aka 987b3316c4e7c908e3c7d2151c20971f9707ad66), due to that commit changing the wording of the message. This commit fixes the

Re: Adjust empty class parameter passing ABI (PR c++/60336)

2017-11-22 Thread Jakub Jelinek
On Mon, Nov 13, 2017 at 11:32:14AM +0100, Marek Polacek wrote: > * g++.dg/abi/pr68355.C: New test. This testcase FAILs on i686-linux, my understanding is that the ABI changed only if TARGET_64BIT on x86_64/i686-linux. The following patch fixes it for me, ok for trunk? 2017-11-22 Jakub Jel

[committed] One further -Wno-return-type testcase tweak

2017-11-22 Thread Jakub Jelinek
Hi! In the bootstrap today I've noticed another testcase that FAILs, dunno how it happened I've missed it earlier. Fixed thusly, committed as obvious to trunk. 2017-11-22 Jakub Jelinek * g++.dg/graphite/pr41562.C: Add -Wno-return-type. --- gcc/testsuite/g++.dg/graphite/pr41562.C.jj

Re: [RFA][PATCH] 8/n Pull evrp range analyzer into its own file

2017-11-22 Thread Marc Glisse
On Sat, 18 Nov 2017, Jeff Law wrote: * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c. With the move to C++, wasn't there a policy to name new files *.cc instead of *.c? -- Marc Glisse

[PATCH] Fix expand_assignment with complex modes with the same size but different inner mode (PR middle-end/82253)

2017-11-22 Thread Jakub Jelinek
Hi! store_expr which is called if to_rtx is a CONCAT and from has complex mode covering the whole to_rtx can handle the case when from expands to a CONCAT or if it has the same complex mode, but if e.g. one mode is CTImode and the other mode is TCmode and from expands to something other than a CON

[C++ PATCH] Fix qsort checking ICE on member_name_cmp (PR c++/82401)

2017-11-22 Thread Jakub Jelinek
Hi! My reading of insert_late_enum_def_bindings etc. is that it intentionally appends stuff into the vector without checking if the trees are already present there (on the testcase below in particular CONST_DECLs for the e1 and e2 enumerators which are already there before), then qsorts the vector

Re: [PATCH] Fix Werror=stringop-overflow in target.c

2017-11-22 Thread Jakub Jelinek
On Mon, Nov 20, 2017 at 02:58:49PM +0100, Martin Liška wrote: > Hello. > > This is fix of compilation error I see with > --enable-offload-targets=nvptx-none=. It's explained > in very detail way here: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83007#c1 > > Ready for trunk? > Martin > > libg

[committed] v5: C/C++: fix quoting of "aka" typedef information (PR 62170)

2017-11-22 Thread David Malcolm
Looks like this got dropped on the floor back in June. Jason approved an earlier version of this, so I've gone ahead and updated it, and committed it to trunk. Here's the version I've committed to trunk (as r255076), having verified bootstrap®rtest (on x86_64-pc-linux-gnu). Changed in v5: * te

Re: [PATCH] Make shift argument to eoshift0 be of type index_type

2017-11-22 Thread Janne Blomqvist
On Wed, Nov 22, 2017 at 10:25 PM, Thomas Koenig wrote: > Am 22.11.2017 um 21:06 schrieb Janne Blomqvist: >> >> Is that better? Ok for trunk? > > > Yes, OK. > > Thanks a lot for the patch! Thanks, committed as r255077! -- Janne Blomqvist

[PATCH, testsuite]: Remove bswap16, bswap32 and bswap64 effective targets

2017-11-22 Thread Uros Bizjak
These are the same as bswap effective target. Also, all listed targets are capable of int32plus. 2017-11-22 Uros Bizjak * lib/target-supports.exp (check_effective_target_bswap16): Remove (check_effective_target_bswap32): Ditto. (check_effective_target_bswap64): Ditto. * gcc.dg/

Re: [RFA][PATCH] 10/n Various class definition cleanups

2017-11-22 Thread Jeff Law
On 11/20/2017 03:06 AM, Richard Biener wrote: > On Sat, Nov 18, 2017 at 9:39 AM, Jeff Law wrote: >> >> A batch of random cleanups in the various vrp related bits. >> >> The goal here is to start banging some of the classes into shape. >> Included in this patch: >> >> >> For evrp_folder: >> Accep

Re: [PATCH] Fix PR83089

2017-11-22 Thread Christophe Lyon
On 22 November 2017 at 09:44, Richard Biener wrote: > > The following fixes if-conversion to free SCEV/niter estimates because > it DCEs stmts. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. > > Richard. > > 2017-11-22 Richard Biener > > PR tree-optimization/83089 >

Re: [PATCH] Make shift argument to eoshift0 be of type index_type

2017-11-22 Thread Thomas Koenig
Am 22.11.2017 um 21:06 schrieb Janne Blomqvist: Is that better? Ok for trunk? Yes, OK. Thanks a lot for the patch! Regards Thomas

Re: [PATCH, i386] Fix behavior for –mprefer-vector-width= option

2017-11-22 Thread Uros Bizjak
On Wed, Nov 22, 2017 at 3:58 PM, Shalnov, Sergey wrote: > Hi, > This patch making –mprefer-vector-width= option inclusive. This means that > if we use –mprefer-vector-width=128 it should switch TARGET_PREFER_AVX128=ON > and TARGET_PREFER_AVX256=ON also. > It is minor change to generate “xmm” with

Re: [PATCH] Make shift argument to eoshift0 be of type index_type

2017-11-22 Thread Janne Blomqvist
On Wed, Nov 22, 2017 at 8:03 PM, Thomas Koenig wrote: > Hi Janne, > >> Regtested on x86_64-pc-linux-gnu, Ok for trunk? >> >> libgfortran/ChangeLog: >> >> 2017-11-22 Janne Blomqvist >> >> * intrinsics/eoshift0.c (eoshift0): Make shift an index_type. > > > Looks good in principle. Is it pos

[PATCH] Make shift argument to eoshift0 and eoshift2 be of type index_type

2017-11-22 Thread Janne Blomqvist
Test case that requires 4 GB RAM that exercises eoshift0: program main implicit none integer(1) :: line(2_8**31+10) line = 42 line = eoshift(line, 2_8**31+7) print *, line(1:4) print *, line((ubound(line, 1, kind=8)-4):ubound(line, 1, kind=8)) end program main Before patch: ❯ ./a.out

Re: Simplify ptr - 0

2017-11-22 Thread Marc Glisse
On Wed, 22 Nov 2017, Jakub Jelinek wrote: On Wed, Nov 22, 2017 at 06:34:08PM +0100, Marc Glisse wrote: Hello, I hadn't implemented this simplification because I think it is invalid code, but apparently people do write it, so we might as well handle it sensibly. This also happens to work around

Re: [PATCH] Use __BYTE_ORDER__ predefined macro instead of runtime check

2017-11-22 Thread Janne Blomqvist
On Wed, Nov 22, 2017 at 8:16 PM, Thomas Koenig wrote: > Hi janne, > >> Regtested on x86_64-pc-linux-gnu, Ok for trunk? > > > Jerry already OK'd this, so you can commit if you want. > What you could do is to hide the macro invocation behind > a macro in libgfortran.h, something like > > #define BIG

[PATCH] Add myself as GCC maintainer

2017-11-22 Thread Sudakshina Das
Added myself as GCC maintainer with r255071 *** ChangeLog *** 2017-11-22 Sudakshina Das * MAINTAINERS (Write After Approval): Add myself. Thanks Sudi diff --git a/ChangeLog b/ChangeLog index 13b0321..adaec62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-11-22 Sudaks

Re: [PATCH] Use __BYTE_ORDER__ predefined macro instead of runtime check

2017-11-22 Thread Andreas Schwab
On Nov 22 2017, Thomas Koenig wrote: > Jerry already OK'd this, so you can commit if you want. > What you could do is to hide the macro invocation behind > a macro in libgfortran.h, something like > > #define BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) That can easily be confused with th

Re: [RFA][PATCH] Stack clash protection 07/08 -- V4 (aarch64 bits)

2017-11-22 Thread Jeff Law
On 11/21/2017 04:57 AM, James Greenhalgh wrote: > I've finally built up enough courage to start getting my head around this... Can't blame you for avoiding :-) This stuff isn't my idea of fun either. > > I see one outstanding issue sitting on this patch version: > > On Sat, Oct 28, 2017 at 05:08

Re: [PATCH] Use __BYTE_ORDER__ predefined macro instead of runtime check

2017-11-22 Thread Thomas Koenig
Hi janne, Regtested on x86_64-pc-linux-gnu, Ok for trunk? Jerry already OK'd this, so you can commit if you want. What you could do is to hide the macro invocation behind a macro in libgfortran.h, something like #define BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) Also, I have opened

Re: Add support for bitwise reductions

2017-11-22 Thread Richard Sandiford
Richard Sandiford writes: > This patch adds support for the SVE bitwise reduction instructions > (ANDV, ORV and EORV). It's a fairly mechanical extension of existing > REDUC_* operators. > > Tested on aarch64-linux-gnu (with and without SVE), x86_64-linux-gnu > and powerpc64le-linux-gnu. Here's

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-22 Thread Thomas Koenig
Hi Janne, So, attached is a new version of the patch. No update on the ChangeLog. OK for trunk? Yup, just really fix the copyright and string length stuff first. Thanks! Committed as rev 255070 with the fixes. There are still some files which mention Fortran 95, that can be fixed later. Tha

Re: SLP reductions with variable-length vectors

2017-11-22 Thread Richard Sandiford
Richard Sandiford writes: > Two things stopped us using SLP reductions with variable-length vectors: > > (1) We didn't have a way of constructing the initial vector. > This patch does it by creating a vector full of the neutral > identity value and then using a shift-and-insert function >

Re: [070/nnn] poly_int: vectorizable_reduction

2017-11-22 Thread Richard Sandiford
Richard Sandiford writes: > This patch makes vectorizable_reduction cope with variable-length vectors. > We can handle the simple case of an inner loop reduction for which > the target has native support for the epilogue operation. For now we > punt on other cases, but patches after the main SVE

Re: [PATCH] Make shift argument to eoshift0 be of type index_type

2017-11-22 Thread Thomas Koenig
Hi Janne, Regtested on x86_64-pc-linux-gnu, Ok for trunk? libgfortran/ChangeLog: 2017-11-22 Janne Blomqvist * intrinsics/eoshift0.c (eoshift0): Make shift an index_type. Looks good in principle. Is it possible to come up with a test case? This might not be executable on all systems

Re: RFC/A: Stop cselib.c recording sets of the frame pointer

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 05:46:26PM +, Richard Sandiford wrote: > 2017-11-22 Richard Sandiford > > gcc/ > * cselib.c (expand_loc, cselib_expand_value_rtx_1): Change > justification for checking for the stack and hard frame pointers. > Check them by pointer rather than regis

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Jeff Law
On 11/22/2017 03:31 AM, Martin Jambor wrote: > On Tue, Nov 21 2017, Jeff Law wrote: >> On 11/21/2017 04:14 AM, Dominik Inführ wrote: >>> Hi, >>> >>> this patch tries to extend tree-ssa-dce.c to remove unnecessary >>> new/delete-pairs (it already does that for malloc/free). Clang does it too >>> a

RFC/A: Stop cselib.c recording sets of the frame pointer

2017-11-22 Thread Richard Sandiford
One of the effects of: https://gcc.gnu.org/ml/gcc-patches/2017-10/msg02066.html is that we now emit: (set (hard-frame-pointer) (stack-pointer)) instead of the previous non-canonical: (set (hard-frame-pointer) (plus (stack-pointer) (const_int 0))) However, recent changes to aarch64_ex

Re: Simplify ptr - 0

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 06:34:08PM +0100, Marc Glisse wrote: > Hello, > > I hadn't implemented this simplification because I think it is invalid code, > but apparently people do write it, so we might as well handle it sensibly. > This also happens to work around PR 83104 (already fixed). > > boot

Re: [PATCH 1/7]: SVE: Add CLOBBER_HIGH expression

2017-11-22 Thread Jeff Law
On 11/22/2017 04:31 AM, Alan Hayward wrote: > >> On 21 Nov 2017, at 03:13, Jeff Law wrote: >>> You might also look at TARGET_HARD_REGNO_CALL_PART_CLOBBERED. I'd totally forgotten about it. And in fact it seems to come pretty close to what you need… >>> >>> Yes, some of the c

Simplify ptr - 0

2017-11-22 Thread Marc Glisse
Hello, I hadn't implemented this simplification because I think it is invalid code, but apparently people do write it, so we might as well handle it sensibly. This also happens to work around PR 83104 (already fixed). bootstrap+regtest on powerpc64le-unknown-linux-gnu. 2017-11-22 Marc Gliss

refine default dwarf settings on VxWorks

2017-11-22 Thread Olivier Hainque
Hello, The Vxworks ports have specific default settings controlling the dwarf output to accomodate the possible use of old non-gdb debuggers provided with the VxWorks environment. Those settings are hardcoded today, even though different versions of VxWorks come with different constraints. This

RE: [patch] remove cilk-plus

2017-11-22 Thread Joseph Myers
This patch version does not appear to address my comment that you're leaving behind comments in c-parser.c relating to Cilk array notations while removing the subsequent code. (Or in one case actually reindenting the comment that is no longer relevant, rather than removing it.) -- Joseph S. M

Re: [SH][committed] Cleanup div and mul patterns

2017-11-22 Thread Tom de Vries
On 05/03/2016 08:50 AM, Oleg Endo wrote: Hi, The attached patch cleans up the SH div and mul patterns a bit. Almost no changes in CSiBE, except for a few minor improvements. Tested on sh-elf with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb, -m2a/-mb,-m4/-ml,-m4/-mb,-m4a/

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-11-22 Thread Kilian Verhetsel
Thank you both for your comments. I have added the check to ensure the index vector won't cause an overflow. I also added tests to the testsuite in order to check that the loop is vectorized for UINT_MAX - 1 iterations but not UINT_MAX iterations. I was not able to write code that triggers INTEGE

[committed] PR 83104: Avoid two_valued_val_range_p for pointers

2017-11-22 Thread Marc Glisse
Hello, with POINTER_DIFF_EXPR, checking if the result is integral does not imply that the arguments are as well, so this check needed a tweak. Bootstrap+regtest on gcc112, pre-approved by Richard. 2017-11-22 Marc Glisse PR tree-optimization/83104 gcc/ * vr-values.c (simpli

Re: [PATCH] Use __BYTE_ORDER__ predefined macro instead of runtime check

2017-11-22 Thread Jerry DeLisle
On 11/22/2017 04:34 AM, Janne Blomqvist wrote: > By using the __BYTE_ORDER__ predefined macro we don't need the > determine_endianness function anymore. > > Regtested on x86_64-pc-linux-gnu, Ok for trunk? > Looks good, thanks for patch! Jerry

Re: [patch] Add support for #pragma GCC unroll

2017-11-22 Thread Sandra Loosemore
On 11/21/2017 03:18 AM, Eric Botcazou wrote: First of all, the structuring in this section is screwed up. The discussion and examples for the previous item (#pragma ivdep) should be moved inside the @table so that you don't have to introduce another @table here, just insert another entry into th

Re: [PATCH] Fix up -Wreturn-type (PR c++/83045)

2017-11-22 Thread Christophe Lyon
Hi, On 21 November 2017 at 18:23, Jeff Law wrote: > On 11/21/2017 06:52 AM, Jakub Jelinek wrote: >> Hi! >> >> The C++ FE now emits __builtin_unreachable () with BUILTINS_LOCATION >> on spots that return from functions/methods returning non-void without >> proper return. This breaks the -Wreturn

Re: [PATCH][ARM] Fix test armv8_2-fp16-move-1.c

2017-11-22 Thread Sudakshina Das
On 22/11/17 15:21, Kyrill Tkachov wrote: On 22/11/17 11:25, Sudi Das wrote: Hi Kyrill and Christophe In case of soft fp testing, there are other assembly directives apart from the vmov one which are also failing. The directives probably make more sense in the hard fp context so instead of

[PATCH] C++: avoid most reserved words as misspelling suggestions (PR c++/81610 and PR c++/80567)

2017-11-22 Thread David Malcolm
lookup_name_fuzzy can offer some reserved words as suggestions for misspelled words, helping with "singed"/"signed" typos. PR c++/81610 and PR c++/80567 report problems where the C++ frontend suggested "if", "for" and "else" as corrections for misspelled variable names. The root cause is that in

Re: [PATCH] Add fields to struct gomp_thread for debugging purposes

2017-11-22 Thread Kevin Buettner
On Sat, 4 Nov 2017 21:39:14 -0700 Kevin Buettner wrote: > On Tue, 31 Oct 2017 08:03:22 +0100 > Jakub Jelinek wrote: > > > On Mon, Oct 30, 2017 at 04:06:15PM -0700, Kevin Buettner wrote: > > > This patch adds a new member named "pthread_id" to the gomp_thread > > > struct. It is initialized i

Re: [PATCH][ARM] Fix test armv8_2-fp16-move-1.c

2017-11-22 Thread Kyrill Tkachov
On 22/11/17 11:25, Sudi Das wrote: Hi Kyrill and Christophe In case of soft fp testing, there are other assembly directives apart from the vmov one which are also failing. The directives probably make more sense in the hard fp context so instead of removing the vmov, I have added the -mfloa

Re: [PATCH] PR libstdc++/48101 improve errors for invalid container specializations

2017-11-22 Thread Ian Lance Taylor
On Wed, Nov 22, 2017 at 3:06 AM, Jonathan Wakely wrote: > On 22/11/17 10:56 +, Jonathan Wakely wrote: >> >> On 22/11/17 11:23 +0100, Rainer Orth wrote: >>> >>> Hi Jonathan, >>> This uses static_assert to improve the errors when attempting to instantiate invalid specializations of con

Re: [PATCH, GCC/ARM] Factor out CMSE register clearing code

2017-11-22 Thread Kyrill Tkachov
On 22/11/17 15:07, Thomas Preudhomme wrote: On 22/11/17 14:45, Kyrill Tkachov wrote: Hi Thomas, On 15/11/17 17:12, Thomas Preudhomme wrote: Hi, Functions cmse_nonsecure_call_clear_caller_saved and cmse_nonsecure_entry_clear_before_return both contain very similar code to clear registers. W

Re: [PATCH, GCC/ARM] Factor out CMSE register clearing code

2017-11-22 Thread Thomas Preudhomme
On 22/11/17 14:45, Kyrill Tkachov wrote: Hi Thomas, On 15/11/17 17:12, Thomas Preudhomme wrote: Hi, Functions cmse_nonsecure_call_clear_caller_saved and cmse_nonsecure_entry_clear_before_return both contain very similar code to clear registers. What's worse, they differ slightly at times so

[PATCH, i386] Fix behavior for –mprefer-vector-width= option

2017-11-22 Thread Shalnov, Sergey
Hi, This patch making –mprefer-vector-width= option inclusive. This means that if we use –mprefer-vector-width=128 it should switch TARGET_PREFER_AVX128=ON and TARGET_PREFER_AVX256=ON also. It is minor change to generate “xmm” with –mprefer-vector-width=128 on the platform with “zmm”. Sergey 2

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 12:01 PM, Alan Hayward wrote: > >> On 22 Nov 2017, at 09:14, Richard Biener wrote: >> >> On Tue, Nov 21, 2017 at 5:43 PM, Kilian Verhetsel >> wrote: >>> This is PR81179 I think, please mention that in the changelog. >>> >>> Correct, my bad for missing that. >>>

[Patch AArch64] Fixup floating point division with -march=armv8-a+nosimd

2017-11-22 Thread Ramana Radhakrishnan
Hi, I received a private report from a customer that gcc was putting out calls to __divdf3 when compiling with +nosimd. When the reciprocal math support was added this was probably an oversight or a typo. The canonical examples is : double foo (double x, double y) { ret

[C++ Patch] PR 82293 ("[8 Regression] ICE in nonlambda_method_basetype at gcc/cp/lambda.c:886")

2017-11-22 Thread Paolo Carlini
Hi, this ICE on valid is triggered by the existing cpp0x/lambda/lambda-ice20.C when -Wshadow is requested. Today I confirmed that it can be reproduced only after r251433, the "Reimplement handling of lambdas in templates." patch: then, as part of tsubst_lambda_expr, do_pushdecl calls check_lo

Re: PR83004: Accidental change to pr81136.c for VECTOR_BITS==128

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 3:17 PM, Richard Sandiford wrote: > Jakub Jelinek writes: >> On Wed, Nov 22, 2017 at 02:51:09PM +0100, Richard Biener wrote: >>> On Wed, Nov 22, 2017 at 10:30 AM, Richard Sandiford >>> wrote: >>> > r254589 was supposed to leave tests unchanged for the default setting >>>

Re: [PATCH, GCC/ARM] Factor out CMSE register clearing code

2017-11-22 Thread Kyrill Tkachov
Hi Thomas, On 15/11/17 17:12, Thomas Preudhomme wrote: Hi, Functions cmse_nonsecure_call_clear_caller_saved and cmse_nonsecure_entry_clear_before_return both contain very similar code to clear registers. What's worse, they differ slightly at times so if a bug is found in one careful thoughts is

Re: PR83004: Accidental change to pr81136.c for VECTOR_BITS==128

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 02:17:59PM +, Richard Sandiford wrote: > Jakub Jelinek writes: > > On Wed, Nov 22, 2017 at 02:51:09PM +0100, Richard Biener wrote: > >> On Wed, Nov 22, 2017 at 10:30 AM, Richard Sandiford > >> wrote: > >> > r254589 was supposed to leave tests unchanged for the default

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Nathan Sidwell
On 11/22/2017 08:59 AM, Richard Biener wrote: Anything else can be done as followup and need not be done as part of this patch. An enum for this would work I guess. I've added this to https://gcc.gnu.org/wiki/ImprovementProjects: Compress DECL flags tree-core defines a number of bit fla

Re: PR83004: Accidental change to pr81136.c for VECTOR_BITS==128

2017-11-22 Thread Richard Sandiford
Jakub Jelinek writes: > On Wed, Nov 22, 2017 at 02:51:09PM +0100, Richard Biener wrote: >> On Wed, Nov 22, 2017 at 10:30 AM, Richard Sandiford >> wrote: >> > r254589 was supposed to leave tests unchanged for the default setting >> > of VECTOR_BITS, but I must have got my sums wrong on pr81136.c.

Re: PR83004: Accidental change to pr81136.c for VECTOR_BITS==128

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 02:51:09PM +0100, Richard Biener wrote: > On Wed, Nov 22, 2017 at 10:30 AM, Richard Sandiford > wrote: > > r254589 was supposed to leave tests unchanged for the default setting > > of VECTOR_BITS, but I must have got my sums wrong on pr81136.c. > > Sorry for the breakage. >

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 1:47 PM, Nathan Sidwell wrote: > On 11/21/2017 06:14 AM, Dominik Inführ wrote: >> >> Hi, >> >> this patch tries to extend tree-ssa-dce.c to remove unnecessary >> new/delete-pairs (it already does that for malloc/free). Clang does it too >> and it seems to be allowed by >> h

[PATCH, GCC/ARM] Remove useless variable in CMSE code

2017-11-22 Thread Thomas Preudhomme
Hi, Functions cmse_nonsecure_call_clear_caller_saved () and cmse_nonsecure_entry_clear_before_return () use a separate variable holding a pointer to padding_bits_to_clear array's first entry which is used when calling function compute_not_to_clear_mask (). This does not save space over using &pa

Re: Replace REDUC_*_EXPRs with internal functions.

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 12:15 PM, Richard Sandiford wrote: > Jakub Jelinek writes: >> On Wed, Nov 22, 2017 at 10:09:08AM +, Richard Sandiford wrote: >>> This patch replaces the REDUC_*_EXPR tree codes with internal functions. >>> This is needed so that the support for in-order reductions can

Re: PR82547: Undetected overflow for UNSIGNED wide_ints

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 10:33 AM, Richard Sandiford wrote: > wi::add_large and wi::sub_large weren't setting the overflow bit > correctly for unsigned operations if the result needed fewer HWIs > than the precision. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. > OK

Re: PR83004: Accidental change to pr81136.c for VECTOR_BITS==128

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 10:30 AM, Richard Sandiford wrote: > r254589 was supposed to leave tests unchanged for the default setting > of VECTOR_BITS, but I must have got my sums wrong on pr81136.c. > Sorry for the breakage. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu

Re: Fix calculation of ptr_mode for MODE_PARTIAL_INT Pmode

2017-11-22 Thread Richard Biener
On Wed, Nov 22, 2017 at 10:26 AM, Richard Sandiford wrote: > This patch fixes a regression caused by r251469, where I'd incorrectly > converted a call to mode_for_size that sometimes needs MODE_PARTIAL_INTs. > > Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. > Also spot-c

Re: [PATCH, GCC/ARM] Use bitmap to control cmse_nonsecure_call register clearing

2017-11-22 Thread Thomas Preudhomme
Thanks Kyrill. Committed the attached rebased patch (same patch but without the last hunk because a better fix was done in an earlier commit). Best regards, Thomas On 22/11/17 11:57, Kyrill Tkachov wrote: Hi Thomas, On 15/11/17 17:08, Thomas Preudhomme wrote: Hi, As part of r253256, cmse

Re: [PATCH] Fix mult expansion ICE (PR middle-end/82875)

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 01:03:06PM +, Richard Sandiford wrote: > Richard Biener writes: > > On Wed, 22 Nov 2017, Jakub Jelinek wrote: > > > >> On Wed, Nov 22, 2017 at 10:41:19AM +0100, Richard Biener wrote: > >> > How much churn would it be to pass down a mode alongside the operands > >> > in

Re: [PATCH] Fix mult expansion ICE (PR middle-end/82875)

2017-11-22 Thread Richard Sandiford
Richard Biener writes: > On Wed, 22 Nov 2017, Jakub Jelinek wrote: > >> On Wed, Nov 22, 2017 at 10:41:19AM +0100, Richard Biener wrote: >> > How much churn would it be to pass down a mode alongside the operands >> > in expand_binop? Can't find it right now but didn't we introduce >> > some rtx_wi

Re: [PATCH] Handle VEC_SERIES with both constant args in simplify_binary_operation

2017-11-22 Thread Richard Sandiford
Jakub Jelinek writes: > Hi! > > I've noticed that if we construct a VEC_SERIES and later propagate > constants into both arguments (could happen e.g. in DEBUG_INSNs, or > during combine etc.) we don't simplify that. > > The following patch adds that, ok for trunk if it passes bootstrap/regtest? >

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Nathan Sidwell
On 11/21/2017 06:14 AM, Dominik Inführ wrote: Hi, this patch tries to extend tree-ssa-dce.c to remove unnecessary new/delete-pairs (it already does that for malloc/free). Clang does it too and it seems to be allowed by http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3664.html. I’ve

[PATCH] Use __BYTE_ORDER__ predefined macro instead of runtime check

2017-11-22 Thread Janne Blomqvist
By using the __BYTE_ORDER__ predefined macro we don't need the determine_endianness function anymore. Regtested on x86_64-pc-linux-gnu, Ok for trunk? libgfortran/ChangeLog: 2017-11-22 Janne Blomqvist * io/inquire.c (inquire_via_unit): Use __BYTE_ORDER__ predefined macro.

Re: [PATCH] vrp_prop::check_array_ref fixes (PR tree-optimization/83044)

2017-11-22 Thread Richard Biener
On Wed, 22 Nov 2017, Jakub Jelinek wrote: > Hi! > > On the following testcase we ICE, because eltsize is 0 and when we > int_const_binop (TRUNC_DIV_EXPR, maxbound, size_int (0)), that of course > returns NULL. > The upper bound for zero sized elements is just not meaningful, if we use > any index

Re: [PATCH, GCC/ARM] Use bitmap to control cmse_nonsecure_call register clearing

2017-11-22 Thread Kyrill Tkachov
Hi Thomas, On 15/11/17 17:08, Thomas Preudhomme wrote: Hi, As part of r253256, cmse_nonsecure_entry_clear_before_return has been rewritten to use auto_sbitmap instead of an integer bitfield to control which register needs to be cleared. This commit continue this work in cmse_nonsecure_call_clea

Re: [PATCH] Fix PR82991

2017-11-22 Thread Richard Biener
On Wed, 22 Nov 2017, Jakub Jelinek wrote: > On Wed, Nov 22, 2017 at 11:41:24AM +0100, Richard Biener wrote: > > > > I am testing the following (old) patch to value number call lhs > > according to the ERF_RETURNS_ARG annotation. This allows for > > more expression simplification and also changes

[PATCH] Handle VEC_SERIES with both constant args in simplify_binary_operation

2017-11-22 Thread Jakub Jelinek
Hi! I've noticed that if we construct a VEC_SERIES and later propagate constants into both arguments (could happen e.g. in DEBUG_INSNs, or during combine etc.) we don't simplify that. The following patch adds that, ok for trunk if it passes bootstrap/regtest? Or should it go into simplify_consta

[PATCH] Make shift argument to eoshift0 be of type index_type

2017-11-22 Thread Janne Blomqvist
Regtested on x86_64-pc-linux-gnu, Ok for trunk? libgfortran/ChangeLog: 2017-11-22 Janne Blomqvist * intrinsics/eoshift0.c (eoshift0): Make shift an index_type. --- libgfortran/intrinsics/eoshift0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libgfortran/int

Re: [PATCH 1/7]: SVE: Add CLOBBER_HIGH expression

2017-11-22 Thread Alan Hayward
> On 21 Nov 2017, at 03:13, Jeff Law wrote: >> >>> >>> You might also look at TARGET_HARD_REGNO_CALL_PART_CLOBBERED. I'd >>> totally forgotten about it. And in fact it seems to come pretty close >>> to what you need… >> >> Yes, some of the code is similar to the way >> TARGET_HARD_REGNO_CALL

Re: [PATCH][GCC][ARM] Dot Product NEON intrinsics [Patch (3/8)]

2017-11-22 Thread Kyrill Tkachov
Hi Tamar, On 06/11/17 16:53, Tamar Christina wrote: Hi All, This patch adds the NEON intrinsics for Dot product. Dot product is available from ARMv8.2-a and onwards. Regtested on arm-none-eabi, armeb-none-eabi, aarch64-none-elf and aarch64_be-none-elf with no issues found. Ok for trunk? gcc

Re: [PATCH][ARM] Fix test armv8_2-fp16-move-1.c

2017-11-22 Thread Sudi Das
Hi Kyrill and Christophe In case of soft fp testing, there are other assembly directives apart from the vmov one which are also failing. The directives probably make more sense in the hard fp context so instead of removing the vmov, I have added the -mfloat-abi=hard option. Is this ok for tr

Re: Replace REDUC_*_EXPRs with internal functions.

2017-11-22 Thread Richard Sandiford
Jakub Jelinek writes: > On Wed, Nov 22, 2017 at 10:09:08AM +, Richard Sandiford wrote: >> This patch replaces the REDUC_*_EXPR tree codes with internal functions. >> This is needed so that the support for in-order reductions can also use >> internal functions without too much complication. >>

Re: [PING] Plugin support on Windows/MinGW

2017-11-22 Thread Boris Kolpackov
JonY <10wa...@gmail.com> writes: > Is there a problem with using .so for internal libraries instead of > "dll"... I think not but I haven't tested it. The problem with using .so instead of .dll is that producing this non-standard extension may not be easy or possible depending on the build system

Re: [PATCH] PR libstdc++/48101 improve errors for invalid container specializations

2017-11-22 Thread Jonathan Wakely
On 22/11/17 10:56 +, Jonathan Wakely wrote: On 22/11/17 11:23 +0100, Rainer Orth wrote: Hi Jonathan, This uses static_assert to improve the errors when attempting to instantiate invalid specializations of containers, e.g. set, or unordered_set, hash> (which mixes up the order of the hasher

Re: [PATCH] Fix result for conditional reductions matching at index 0

2017-11-22 Thread Alan Hayward
> On 22 Nov 2017, at 09:14, Richard Biener wrote: > > On Tue, Nov 21, 2017 at 5:43 PM, Kilian Verhetsel > wrote: >> >>> This is PR81179 I think, please mention that in the changelog. >> >> Correct, my bad for missing that. >> >>> This unconditionally pessimizes code even if there is no valid

Re: [PATCH] Fix PR82991

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 11:41:24AM +0100, Richard Biener wrote: > > I am testing the following (old) patch to value number call lhs > according to the ERF_RETURNS_ARG annotation. This allows for > more expression simplification and also changes downstream > users of the argument to use the return

Re: [PATCH] PR libstdc++/48101 improve errors for invalid container specializations

2017-11-22 Thread Jonathan Wakely
On 22/11/17 11:23 +0100, Rainer Orth wrote: Hi Jonathan, This uses static_assert to improve the errors when attempting to instantiate invalid specializations of containers, e.g. set, or unordered_set, hash> (which mixes up the order of the hasher and equality predicate arguments). This means i

[PATCH] vrp_prop::check_array_ref fixes (PR tree-optimization/83044)

2017-11-22 Thread Jakub Jelinek
Hi! On the following testcase we ICE, because eltsize is 0 and when we int_const_binop (TRUNC_DIV_EXPR, maxbound, size_int (0)), that of course returns NULL. The upper bound for zero sized elements is just not meaningful, if we use any index we still won't reach maximum object size that way. Whil

[patch] Add support for #pragma GCC unroll v2

2017-11-22 Thread Eric Botcazou
Hi, this is a revised version of: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01452.html with the following changes: 1. integration of Bernhard's patch for the Fortran front-end, 2. Sandra's fix for the documentation, 3. minor tweaks to the C and C++ front-end, 4. change at the GIMPLE lev

Re: Replace REDUC_*_EXPRs with internal functions.

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 10:09:08AM +, Richard Sandiford wrote: > This patch replaces the REDUC_*_EXPR tree codes with internal functions. > This is needed so that the support for in-order reductions can also use > internal functions without too much complication. > > This came out of the revie

[PATCH] Fix PR82991

2017-11-22 Thread Richard Biener
I am testing the following (old) patch to value number call lhs according to the ERF_RETURNS_ARG annotation. This allows for more expression simplification and also changes downstream users of the argument to use the return value which should help register allocation and register lifetime in gene

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2017 at 10:30:29AM +0100, Richard Biener wrote: > --- a/gcc/tree-core.h > +++ b/gcc/tree-core.h > @@ -1787,7 +1787,9 @@ struct GTY(()) tree_function_decl { >unsigned has_debug_args_flag : 1; >unsigned tm_clone_flag : 1; >unsigned versioned_function : 1; > - /* No bits l

Re: [RFC][PATCH] Extend DCE to remove unnecessary new/delete-pairs

2017-11-22 Thread Martin Jambor
On Tue, Nov 21 2017, Jeff Law wrote: > On 11/21/2017 04:14 AM, Dominik Inführ wrote: >> Hi, >> >> this patch tries to extend tree-ssa-dce.c to remove unnecessary >> new/delete-pairs (it already does that for malloc/free). Clang does it too >> and it seems to be allowed by >> http://www.open-std

  1   2   >