libgo patch committed: Pass -funwind-tables when compiling C code

2017-08-17 Thread Ian Lance Taylor
This patch to the go tool in libgo changes it to use -funwind-tables when compiling C code to support the cgo tool. Using -funwind-tables is necessary to permit Go code to correctly throw a panic through C code. This hasn't been necessary in the past as -funwind-tables is the default on x86.

[PATCH] detect incompatible aliases (PR c/81854)

2017-08-17 Thread Martin Sebor
Joseph, while looking into implementing enhancement your request pr81824 I noticed that GCC silently accepts incompatible alias declarations (pr81854) so as sort of a proof-concept for the former I enhanced the checking already done for other kinds of incompatibilities to also detect those

Re: [PATCH, rs6000] 2/3 Add x86 SSE intrinsics to GCC PPC64LE taget

2017-08-17 Thread Steven Munroe
On Thu, 2017-08-17 at 00:28 -0500, Segher Boessenkool wrote: > Hi! > > On Wed, Aug 16, 2017 at 03:35:40PM -0500, Steven Munroe wrote: > > +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, > > __artificial__)) > > +_mm_add_ss (__m128 __A, __m128 __B) > > +{ > > +#ifdef

[PATCH, rs6000] Fix PR target/80210: ICE in extract_insn

2017-08-17 Thread Peter Bergner
PR target/80210 exposes a problem in rs6000_set_current_function() where is fails to correctly clear the rs6000_previous_fndecl cache correctly. With the test case, we notice that rs6000_previous_fndecl is set (when it shouldn't be) and we end up restoring options from it. In this case, we end up

[PATCH], Delete some PowerPC debug switches

2017-08-17 Thread Michael Meissner
This patch deletes some of the debug switches that I've added over the years, and now don't use any more. I did bootstrap builds and make check runs on a little endian power8 system. There were no regressions. Can I check this into the trunk? 2017-08-17 Michael Meissner

Re: [PING] Re: [PATCH] C++: fix ordering of missing std #include suggestion (PR c++/81514)

2017-08-17 Thread Jason Merrill
OK. On Thu, Aug 17, 2017 at 7:50 AM, David Malcolm wrote: > Ping > > On Thu, 2017-07-27 at 17:36 -0400, David Malcolm wrote: >> PR c++/81514 reports a problem where >> g++.dg/lookup/missing-std-include-2.C >> fails on Solaris, offering the suggestion: >> >> error:

Re: RFC: [PATCH] Add warn_if_not_aligned attribute

2017-08-17 Thread Jason Merrill
On Thu, Aug 17, 2017 at 7:56 AM, H.J. Lu wrote: > On Thu, Aug 17, 2017 at 6:52 AM, Joseph Myers wrote: >> On Sat, 8 Jul 2017, H.J. Lu wrote: >> >>> +@item -Wpacked-not-aligned @r{(C, C++, Objective-C and Objective-C++ only)} >>> +@opindex

Re: [C++ PATCH] TYPE_TEMPLATE_INFO

2017-08-17 Thread Jason Merrill
On Thu, Aug 17, 2017 at 12:00 PM, Nathan Sidwell wrote: > This patch concludes with simplifying TYPE_TEMPLATE_INFO. It was too > tricky, given the time available, to make TYPE_TEMPLATE_INFO require a > templatable _TYPE node, so it remains returning NULL_TREE if you give it a >

[PING from 2013][PATCH] fixincludes: handle symlinks with multiple slashes

2017-08-17 Thread Sergei Trofimovich
Looks like the following patch falled through the cracks https://gcc.gnu.org/ml/gcc-patches/2012-12/msg01397.html https://bugs.gentoo.org/show_bug.cgi?id=434180#c16 Thanks! -- Sergei pgpUpEUwrmHQi.pgp Description: Цифровая подпись OpenPGP

Re: [PATCH] correct documentation of attribute ifunc (PR 81882)

2017-08-17 Thread Martin Sebor
On 08/17/2017 01:26 PM, Alexander Monakov wrote: On Thu, 17 Aug 2017, Martin Sebor wrote: returns a pointer to the selected implementation function. The implementation functions' declarations must match the API of the -function being implemented, the resolver's declaration is be a -function

Re: [PATCH] correct documentation of attribute ifunc (PR 81882)

2017-08-17 Thread Alexander Monakov
On Thu, 17 Aug 2017, Martin Sebor wrote: > returns a pointer to the selected implementation function. The > implementation functions' declarations must match the API of the > -function being implemented, the resolver's declaration is be a > -function returning pointer to void function

[C++ PATCH] TYPE_TEMPLATE_INFO

2017-08-17 Thread Nathan Sidwell
This patch concludes with simplifying TYPE_TEMPLATE_INFO. It was too tricky, given the time available, to make TYPE_TEMPLATE_INFO require a templatable _TYPE node, so it remains returning NULL_TREE if you give it a random _TYPE node. That'd be nice to clean up though. I can't recall the

Re: [PATCH, rs6000] Remove TARGET_VSX_TIMODE and -mno-vsx-timode usage

2017-08-17 Thread Peter Bergner
On 8/16/17 5:49 PM, Segher Boessenkool wrote: >> - (TI "TARGET_VSX_TIMODE")]) >> + (TI "TARGET_VSX")]) > > You can completely remove the condition here as far as I see. [snip] > Okay for trunk with that simplification. Thanks! Good catch. I

Re: [PATCH, rs6000] Fix PR target/72804: Poor code gen with -mvsx-timode

2017-08-17 Thread Peter Bergner
On 8/16/17 5:56 PM, Peter Bergner wrote: > On 8/16/17 5:30 PM, Segher Boessenkool wrote: > I'll make the above changes and commit after another quick test cycle. Testing the changes came up clean, so I committed it. Thanks. Peter

[PATCH] correct documentation of attribute ifunc (PR 81882)

2017-08-17 Thread Martin Sebor
The attached patch adjusts the documentation of attribute ifunc to avoid warnings (in C) and errors (in C++) due to the resolver returning a pointer to a function of incompatible type. Martin PR c/81882 - attribute ifunc documentation uses invalid code gcc/ChangeLog: PR c/81882 *

Re: [PATCH] use strnlen in pretty printer for "%.*s" (PR 81859)

2017-08-17 Thread Martin Sebor
On 08/16/2017 02:55 PM, David Malcolm wrote: On Wed, 2017-08-16 at 10:12 -0600, Martin Sebor wrote: PR c/81859 - [8 Regression] valgrind error from warn_about_normalization gcc/ChangeLog: PR c/81859 * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading

Re: [PATCH] Harden variably_modified_type_p

2017-08-17 Thread Eric Botcazou
> It seems with Ada one can have cycles in types via pointer types > and calling variably_modified_type_p on such type recurses indefinitely. > The following is an attempt to fix that (albeit I'm not 100% sure > there's no caller of the function using TREE_VISITED itself). > > Cures c38102a.adb

Re: [PATCH 1/3] improve detection of attribute conflicts (PR 81544)

2017-08-17 Thread Martin Sebor
Attached is an updated patch with just the minor editorial tweaks for the issues pointed out by Marek (stray comments and spaces), and with the C++ and libstdc++ bits removed and posted separately. I also added some text to the manual to clarify the const/pure effects. I thought quite a bit

[C++ PATCH] BOUND_TEMPLATE_TEMPLATE_PARM_TYPE

2017-08-17 Thread Nathan Sidwell
Now that template info is on TYPE_LANG_SLOT_1, B_T_T_P_Types don't need type_lang_specific. Excised thusly. nathan -- Nathan Sidwell 2017-08-17 Nathan Sidwell * lex.c (maybe_add_lang_type_raw): BOUND_TEMPLATE_TEMPLATE_PARMs don't need lang_type. (cxx_make_type): Use

Re: [PATCH v2] Simplify pow with constant

2017-08-17 Thread Alexander Monakov
On Thu, 17 Aug 2017, Wilco Dijkstra wrote: > This patch simplifies pow (C, x) into exp (x * C1) if C > 0, C1 = log (C). Note this changes the outcome for C == +Inf, x == 0 (pow is specified to return 1.0 in that case, but x * C1 == NaN). There's another existing transform with the same issue,

[PATCH] Harden variably_modified_type_p

2017-08-17 Thread Richard Biener
It seems with Ada one can have cycles in types via pointer types and calling variably_modified_type_p on such type recurses indefinitely. The following is an attempt to fix that (albeit I'm not 100% sure there's no caller of the function using TREE_VISITED itself). Cures c38102a.adb with LTO

Re: RFC: [PATCH] Add warn_if_not_aligned attribute

2017-08-17 Thread H.J. Lu
On Thu, Aug 17, 2017 at 6:52 AM, Joseph Myers wrote: > On Sat, 8 Jul 2017, H.J. Lu wrote: > >> +@item -Wpacked-not-aligned @r{(C, C++, Objective-C and Objective-C++ only)} >> +@opindex Wpacked-not-aligned >> +@opindex Wno-packed-not-aligned >> +Warn if a structure field

Re: [PATCH] Fix ancient wrong-code with ?: (PR middle-end/81814)

2017-08-17 Thread Marek Polacek
On Thu, Aug 17, 2017 at 04:36:02PM +0200, Richard Biener wrote: > On Thu, 17 Aug 2017, Marek Polacek wrote: > > > On Thu, Aug 17, 2017 at 04:17:54PM +0200, Richard Biener wrote: > > > On Thu, 17 Aug 2017, Marek Polacek wrote: > > > > > > > This PR is about wrong-code and has gone undetected for

[PING] Re: [PATCH] C++: fix ordering of missing std #include suggestion (PR c++/81514)

2017-08-17 Thread David Malcolm
Ping On Thu, 2017-07-27 at 17:36 -0400, David Malcolm wrote: > PR c++/81514 reports a problem where > g++.dg/lookup/missing-std-include-2.C > fails on Solaris, offering the suggestion: > > error: 'string' is not a member of 'std' > note: suggested alternative: 'sprintf' > > instead of the

Re: [PATCH] Fix build of --enable-gather-detailed-mem-stats (PR bootstrap/81864).

2017-08-17 Thread Richard Biener
On Thu, Aug 17, 2017 at 3:43 PM, Martin Liška wrote: > Hello. > > As described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81864#c5 we > should not > introduce a new static hash_table variable in order to be sure > mem_alloc_descriptors > are initialized earlier. > > > Patch

Re: Improve ECF_NOTHROW flags for direct internal functions

2017-08-17 Thread Richard Biener
On Thu, Aug 17, 2017 at 1:06 PM, Richard Sandiford wrote > Richard Biener writes: >> On Thu, Aug 17, 2017 at 11:49 AM, Richard Sandiford >> wrote: >>> Internal functions that map directly to an optab can

Re: [PATCH] Fix ancient wrong-code with ?: (PR middle-end/81814)

2017-08-17 Thread Richard Biener
On Thu, 17 Aug 2017, Marek Polacek wrote: > On Thu, Aug 17, 2017 at 04:17:54PM +0200, Richard Biener wrote: > > On Thu, 17 Aug 2017, Marek Polacek wrote: > > > > > This PR is about wrong-code and has gone undetected for over 10 years (!). > > > The issue is that e.g. the following > > > > > >

Re: [PATCH] Fix ancient wrong-code with ?: (PR middle-end/81814)

2017-08-17 Thread Marek Polacek
On Thu, Aug 17, 2017 at 04:17:54PM +0200, Richard Biener wrote: > On Thu, 17 Aug 2017, Marek Polacek wrote: > > > This PR is about wrong-code and has gone undetected for over 10 years (!). > > The issue is that e.g. the following > > > > (signed char) x == 0 ? (unsigned long long) x : 0 > > >

[PATCH, rs6000] testcase coverage for vec_perm built-ins

2017-08-17 Thread Will Schmidt
Hi, [Patch, rs6000] testcase coverage for vec_perm built-ins Add some Testcase coverage for the vector permute intrinsics. Tested across power platforms. OK for trunk? Thanks, -Will [gcc/testsuite] 2017-08-17 Will Schmidt *

[PATCH, rs6000] testcase coverage for vec_perm built-ins

2017-08-17 Thread Will Schmidt
Hi, [PATCH, rs6000] testcase coverage for vec_perm built-ins Add testcase coverage for the vec_ld intrinsic builtins. Tested across power platforms (p6 and newer). OK for trunk? Thanks, -Will [gcc/testsuite] 2017-08-17 Will Schmidt *

[PATCH, rs6000] Add testcase coverage for vec_sums built-in

2017-08-17 Thread Will Schmidt
Hi, [Patch, rs6000] Add testcase coverage for vec_sums built-in Add some testcase coverage for the vec_sums() built-in. Tested across power platforms (p6 and newer). OK for trunk? Thanks, -Will [gcc/testsuite] 2017-08-17 Will Schmidt *

Re: [PATCH] Fix ancient wrong-code with ?: (PR middle-end/81814)

2017-08-17 Thread Richard Biener
On Thu, 17 Aug 2017, Marek Polacek wrote: > This PR is about wrong-code and has gone undetected for over 10 years (!). > The issue is that e.g. the following > > (signed char) x == 0 ? (unsigned long long) x : 0 > > was wrongly folded to 0, because fold_cond_expr_with_comparison will fold > A

Re: C PATCH to remove unused block of code

2017-08-17 Thread Joseph Myers
On Thu, 17 Aug 2017, Marek Polacek wrote: > I've been itching to remove this code for some time now. The comment suggests > that the code is actually unused, so I replaced the body of that "else if" > with > gcc_unreachable (); and ran regtest/bootstrap and nothing broke, so I propose > to do

Re: [PATCH v2] Simplify pow with constant

2017-08-17 Thread Wilco Dijkstra
This patch simplifies pow (C, x) into exp (x * C1) if C > 0, C1 = log (C). Do this only for fast-math as accuracy is reduced. This is much faster since pow is more complex than exp - with current GLIBC the speedup is more than 7 times for this transformation. The worst-case ULP error of the

Re: RFC: [PATCH] Add warn_if_not_aligned attribute

2017-08-17 Thread Joseph Myers
On Sat, 8 Jul 2017, H.J. Lu wrote: > +@item -Wpacked-not-aligned @r{(C, C++, Objective-C and Objective-C++ only)} > +@opindex Wpacked-not-aligned > +@opindex Wno-packed-not-aligned > +Warn if a structure field with explicitly specified alignment in a > +packed struct or union is misaligned. For

[PATCH] Fix build of --enable-gather-detailed-mem-stats (PR bootstrap/81864).

2017-08-17 Thread Martin Liška
Hello. As described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81864#c5 we should not introduce a new static hash_table variable in order to be sure mem_alloc_descriptors are initialized earlier. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be

[PATCH] Fix PR81878

2017-08-17 Thread Richard Biener
Currently non-bootstrap of --enable-languages=ada fails, the following fixes this. Bootstrapped and non-bootstrapped on x86_64-unknown-linux-gnu. Approved by Eric in the PR, applied. Richard. 2017-08-17 Richard Biener PR ada/81878 * Makefile.in

Re: [AArch64, PATCH] Improve Neon store of zero

2017-08-17 Thread Richard Earnshaw (lists)
On 16/08/17 16:19, Jackson Woodruff wrote: > Hi Richard, > > I have changed the condition as you suggest below. OK for trunk? > > Jackson. > I renamed the testcase to vect_str_zero.c, as that seems to more closely match the naming style, and checked this in. Thanks for the patch. R. > On

[C++ PATCH] move template_info field

2017-08-17 Thread Nathan Sidwell
With yesterday's patch to move TYPE_BINFO onto TYPE_MAX_VALUES_RAW, I freed up TYPE_LANG_SLOT_1 for class types. This patch moves template_info from lang_type to that field for both RECORD_TYPESs and BOUND_TEMPLATE_TEMPLATE_PARM_TYPEs. now, you'll notice that TYPE_LANG_SLOT_1 was where

PING: [PATCH] Add -static-pie to GCC driver to create static PIE

2017-08-17 Thread H.J. Lu
On Wed, Aug 9, 2017 at 3:39 AM, H.J. Lu wrote: > On Tue, Aug 8, 2017 at 10:36 PM, Richard Biener > wrote: >> On August 9, 2017 12:18:41 AM GMT+02:00, "H.J. Lu" >> wrote: >>>This patch adds -static-pie to GCC driver to

[PATCH] Fix ancient wrong-code with ?: (PR middle-end/81814)

2017-08-17 Thread Marek Polacek
This PR is about wrong-code and has gone undetected for over 10 years (!). The issue is that e.g. the following (signed char) x == 0 ? (unsigned long long) x : 0 was wrongly folded to 0, because fold_cond_expr_with_comparison will fold A != 0 ? A : 0 to 0. But for x = 0x0100 this is

Re: [RFC] propagate malloc attribute in ipa-pure-const pass

2017-08-17 Thread Prathamesh Kulkarni
On 8 August 2017 at 09:50, Prathamesh Kulkarni wrote: > On 31 July 2017 at 23:53, Prathamesh Kulkarni > wrote: >> On 23 May 2017 at 19:10, Prathamesh Kulkarni >> wrote: >>> On 19 May 2017 at 19:02,

Re: [1/2] PR 78736: New warning -Wenum-conversion

2017-08-17 Thread Prathamesh Kulkarni
On 8 August 2017 at 09:51, Prathamesh Kulkarni wrote: > On 1 August 2017 at 00:10, Prathamesh Kulkarni > wrote: >> On 11 July 2017 at 17:59, Prathamesh Kulkarni >> wrote: >>> On 13 June 2017 at

Re: PR81635: Use chrecs to help find related data refs

2017-08-17 Thread Bin.Cheng
On Thu, Aug 17, 2017 at 12:35 PM, Richard Sandiford wrote: > "Bin.Cheng" writes: >> On Wed, Aug 16, 2017 at 6:50 PM, Richard Sandiford >> wrote: >>> "Bin.Cheng" writes: On Wed, Aug

Re: [PATCH] Factor out division by squares and remove division around comparisons (1/2)

2017-08-17 Thread Joseph Myers
On Thu, 17 Aug 2017, Richard Biener wrote: > > Without global analysis it seems best to move constants/negates to the > > toplevel if they can't be trivially removed in a subexpression. Eg. -x > > / (a * b * -c). > > Sure. So both patterns are canonicalization which is fine for match.pd. >

[testsuite, committed] Require effective target nonlocal_goto for ipa/pr81696.c

2017-08-17 Thread Tom de Vries
Hi, this patch requires effective target nonlocal_goto for ipa/pr81696.c. Committed. Thanks, - Tom 2017-08-17 Tom de Vries * gcc.dg/ipa/pr81696.c: Require effective target nonlocal_goto. --- gcc/testsuite/gcc.dg/ipa/pr81696.c | 1 + 1 file changed, 1

Re: [PATCH] [PR target/81861] Save target specific options after ix86_stack_protector_guard_reg was changed

2017-08-17 Thread Uros Bizjak
On Thu, Aug 17, 2017 at 1:37 PM, Maxim Ostapenko wrote: > Hi, > > as discussed in PR, currently we are missing some SSP related options when > streaming target specific options in LTO mode. This leads to incorrect code > and segfaults (e.g. in ASan's pr64820.c testcase).

[PATCH] [PR target/81861] Save target specific options after ix86_stack_protector_guard_reg was changed

2017-08-17 Thread Maxim Ostapenko
Hi, as discussed in PR, currently we are missing some SSP related options when streaming target specific options in LTO mode. This leads to incorrect code and segfaults (e.g. in ASan's pr64820.c testcase). This patch fixes this by moving options saving machinery down to setting

Re: PR81635: Use chrecs to help find related data refs

2017-08-17 Thread Richard Sandiford
"Bin.Cheng" writes: > On Wed, Aug 16, 2017 at 6:50 PM, Richard Sandiford > wrote: >> "Bin.Cheng" writes: >>> On Wed, Aug 16, 2017 at 5:00 PM, Richard Sandiford >>> wrote: "Bin.Cheng"

Re: Improve ECF_NOTHROW flags for direct internal functions

2017-08-17 Thread Richard Sandiford
Richard Biener writes: > On Thu, Aug 17, 2017 at 11:49 AM, Richard Sandiford > wrote: >> Internal functions that map directly to an optab can only throw an >> exception for -fnon-call-exceptions. This patch handles that in >>

RE: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-08-17 Thread Tamar Christina
> -Original Message- > From: Richard Biener [mailto:rguent...@suse.de] > Sent: 08 June 2017 19:23 > To: Joseph Myers > Cc: Tamar Christina; Christophe Lyon; Markus Trippelsdorf; Jeff Law; GCC > Patches; Wilco Dijkstra; Michael Meissner; nd > Subject: Re: [PATCH][GCC][PATCHv3] Improve

Re: PR81635: Use chrecs to help find related data refs

2017-08-17 Thread Bin.Cheng
On Wed, Aug 16, 2017 at 6:50 PM, Richard Sandiford wrote: > "Bin.Cheng" writes: >> On Wed, Aug 16, 2017 at 5:00 PM, Richard Sandiford >> wrote: >>> "Bin.Cheng" writes: On Wed, Aug 16,

Re: Add missing ECF_NOTHROW flags to internal.def

2017-08-17 Thread Richard Sandiford
Richard Biener writes: > On Thu, Aug 17, 2017 at 11:47 AM, Richard Sandiford > wrote: >> This patch adds missing ECF_NOTHROW flags to the vectorisable >> integer internal functions. I noticed it while doing some SVE >> work but don't

Re: Improve ECF_NOTHROW flags for direct internal functions

2017-08-17 Thread Richard Biener
On Thu, Aug 17, 2017 at 11:49 AM, Richard Sandiford wrote: > Internal functions that map directly to an optab can only throw an > exception for -fnon-call-exceptions. This patch handles that in > internal_fn_flags, in a similar way to ATTR_*NOTHROW in builtins.def.

C PATCH to remove unused block of code

2017-08-17 Thread Marek Polacek
I've been itching to remove this code for some time now. The comment suggests that the code is actually unused, so I replaced the body of that "else if" with gcc_unreachable (); and ran regtest/bootstrap and nothing broke, so I propose to do away with it. Bootstrapped/regtested on x86_64-linux,

Re: Add missing ECF_NOTHROW flags to internal.def

2017-08-17 Thread Richard Biener
On Thu, Aug 17, 2017 at 11:47 AM, Richard Sandiford wrote: > This patch adds missing ECF_NOTHROW flags to the vectorisable > integer internal functions. I noticed it while doing some SVE > work but don't have a testcase that's useful now. > > Tested on

Re: [PATCH] Factor out division by squares and remove division around comparisons (1/2)

2017-08-17 Thread Richard Biener
On Thu, Aug 17, 2017 at 11:55 AM, Wilco Dijkstra wrote: > Richard Biener wrote: >> On Tue, Aug 15, 2017 at 4:11 PM, Wilco Dijkstra >> wrote: >> > Richard Biener wrote: > We also change the association of > > x / (y * C) -> (x /

Re: [PATCH] Factor out division by squares and remove division around comparisons (1/2)

2017-08-17 Thread Wilco Dijkstra
Richard Biener wrote: > On Tue, Aug 15, 2017 at 4:11 PM, Wilco Dijkstra > wrote: > > Richard Biener wrote: >>> > We also change the association of >>> > >>> >  x / (y * C) -> (x / C) / y >>> > >>> > If C is a constant. >>> >>> Why's that profitable? >> >> It enables

Improve ECF_NOTHROW flags for direct internal functions

2017-08-17 Thread Richard Sandiford
Internal functions that map directly to an optab can only throw an exception for -fnon-call-exceptions. This patch handles that in internal_fn_flags, in a similar way to ATTR_*NOTHROW in builtins.def. (Functions that don't throw even for flag_non_call_exceptions should be explicitly marked

Add missing ECF_NOTHROW flags to internal.def

2017-08-17 Thread Richard Sandiford
This patch adds missing ECF_NOTHROW flags to the vectorisable integer internal functions. I noticed it while doing some SVE work but don't have a testcase that's useful now. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard 2017-08-17 Richard Sandiford

Re: [PATCH] Factor out division by squares and remove division around comparisons (1/2)

2017-08-17 Thread Richard Biener
On Tue, Aug 15, 2017 at 4:11 PM, Wilco Dijkstra wrote: > Richard Biener wrote: >> > We also change the association of >> > >> > x / (y * C) -> (x / C) / y >> > >> > If C is a constant. >> >> Why's that profitable? > > It enables (x * C1) / (y * C2) -> (x * C1/C2) / y

Re: [PATCH] Fix always true condition in gimplify_adjust_omp_clauses

2017-08-17 Thread Richard Biener
On Thu, Aug 17, 2017 at 10:57 AM, Marek Polacek wrote: > Ping. Ok. Richard. > On Thu, Aug 10, 2017 at 08:50:44PM +0200, Marek Polacek wrote: >> My new warning triggered here and said "bitwise comparison always evaluates >> to >> true" and I believe it's right: GOVD_WRITTEN

[PATCH] Speed up PTA solving

2017-08-17 Thread Richard Biener
The following patch resulted from PR81827 analysis where I was on the wrong track initially. It still results in a small speedup because we avoid useless duplicate work in case nodes are unified and reduce the number of graph edges. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

Re: [PATCH] Fix always true condition in gimplify_adjust_omp_clauses

2017-08-17 Thread Marek Polacek
Ping. On Thu, Aug 10, 2017 at 08:50:44PM +0200, Marek Polacek wrote: > My new warning triggered here and said "bitwise comparison always evaluates to > true" and I believe it's right: GOVD_WRITTEN = 131072 which is 10... in > binary, so n->value & GOVD_WRITTEN can never be 1; I suppose 0 was

[PATCH] Fix PR81827

2017-08-17 Thread Richard Biener
I am currently testing the following patch to improve bitmap density during points-to analysis. This improves the testcase in PR81827 from > /usr/bin/time /space/rguenther/install/gcc-7.2/bin/gfortran -S t.f90 -O 1139.91user 1.99system 19:02.37elapsed 99%CPU (0avgtext+0avgdata

[PATCH] Fix fallout from VRP strict-overflow changes

2017-08-17 Thread Richard Biener
I was notifed I broke proper handling of undefined overflow in multiplicative ops handling. The following resurrects previous behavior (and adds a testcase). Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2017-08-17 Richard Biener

[PING][PATCH] [Aarch64] Optimize subtract in shift counts

2017-08-17 Thread Michael Collison
Ping. Original patch: https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00544.html