Re: [PATCH] fold more string comparison with known result (PR 90879)

2019-08-13 Thread Jeff Law
On 8/9/19 10:51 AM, Martin Sebor wrote: > > PR tree-optimization/90879 - fold zero-equality of strcmp between a longer > string and a smaller array > > gcc/c-family/ChangeLog: > > PR tree-optimization/90879 > * c.opt (-Wstring-compare): New option. > > gcc/testsuite/ChangeLog: > >

Re: [PATCH 2/2] Add more entries to the C++ get_std_name_hint array

2019-08-13 Thread Jason Merrill
On 8/13/19 9:36 AM, Jonathan Wakely wrote: This adds some commonly-used C++11/14 names, and some new C++17/20 names. The latter aren't available when using the -std=gnu++14 default, so the fix-it suggesting to use a newer dialect is helpful. * name-lookup.c (get_std_name_hint): Add more ent

Re: [PATCH 2/3] Add simplify rules for wrapped binary operations.

2019-08-13 Thread Jeff Law
On 8/13/19 2:33 AM, Robin Dapp wrote: > We would like to simplify code like > (larger_type)(var + const1) + const2 > to > (larger_type)(var + combined_const1_const2) > when we know that no overflow happens. > --- > gcc/match.pd | 101 +++ > 1 file

Re: [PATCH 2/3] Add simplify rules for wrapped binary operations.

2019-08-13 Thread Robin Dapp
> +/* ((T)(A + CST1)) + CST2 -> (T)(A) + CST */ > Do you want to handle MINUS? What about POINTER_PLUS_EXPR? When I last attempted this patch I had the MINUS still in it but got confused easily by needing to think of too many cases at once leading to lots of stupid mistakes. Hence, I left it ou

Re: [PATCH 2/3] Add simplify rules for wrapped binary operations.

2019-08-13 Thread Jeff Law
On 8/13/19 2:42 PM, Robin Dapp wrote: >> +/* ((T)(A + CST1)) + CST2 -> (T)(A) + CST */ >> Do you want to handle MINUS? What about POINTER_PLUS_EXPR? > > When I last attempted this patch I had the MINUS still in it but got > confused easily by needing to think of too many cases at once leading to

[PATCH 1/3] [og9] Wait at end of OpenACC asynchronous kernels regions

2019-08-13 Thread Julian Brown
This patch provides a workaround for unreliable operation of asynchronous kernels regions on AMD GCN. At present, kernels regions are decomposed into a series of parallel regions surrounded by a data region capturing the data-movement clauses needed by the region as a whole: #pragma acc kernels

[PATCH 0/3] [og9] OpenACC async fixes for AMD GCN

2019-08-13 Thread Julian Brown
These patches stabilise async support for AMD GCN. Several tests that previously failed (some intermittently) now work. Further commentary is provided alongside each patch. Tested with offloading to AMD GCN. I will apply shortly to the openacc-gcc-9-branch. Thanks, Julian Julian Brown (3): [

[PATCH 2/3] [og9] Use temporary buffers for async host2dev copies

2019-08-13 Thread Julian Brown
In libgomp, host-to-device transfers are instigated in several places where the source data is either on the stack, or in an unstable heap location (i.e. which is immediately freed after performing the host-to-device transfer). When the transfer is asynchronous, this means that taking the address

[PATCH 3/3] [og9] Wait on queue-full condition in AMD GCN libgomp offloading plugin

2019-08-13 Thread Julian Brown
This patch lets the AMD GCN libgomp plugin wait for asynchronous queues to have some space to push new operations when they are full, rather than just erroring out immediately on that condition. This fixes the libgomp.oacc-c-c++-common/da-4.c test. Julian ChangeLog libgomp/ * plu

Re: [PATCH] fold more string comparison with known result (PR 90879)

2019-08-13 Thread Martin Sebor
On 8/13/19 2:07 PM, Jeff Law wrote: On 8/9/19 10:51 AM, Martin Sebor wrote: PR tree-optimization/90879 - fold zero-equality of strcmp between a longer string and a smaller array gcc/c-family/ChangeLog: PR tree-optimization/90879 * c.opt (-Wstring-compare): New option. gcc/te

Re: [PATCH] fold more string comparison with known result (PR 90879)

2019-08-13 Thread Jeff Law
On 8/13/19 3:43 PM, Martin Sebor wrote: > On 8/13/19 2:07 PM, Jeff Law wrote: >> On 8/9/19 10:51 AM, Martin Sebor wrote: >>> >>> PR tree-optimization/90879 - fold zero-equality of strcmp between a >>> longer string and a smaller array >>> >>> gcc/c-family/ChangeLog: >>> >>> PR tree-optimization

Re: [PATCH 2/3] Add simplify rules for wrapped binary operations.

2019-08-13 Thread Marc Glisse
On Tue, 13 Aug 2019, Robin Dapp wrote: diff --git a/gcc/match.pd b/gcc/match.pd index 0317bc704f7..94400529ad8 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -2020,6 +2020,107 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (if (cst && !TREE_OVERFLOW (cst)) (plus { cst; } @0 +/* ((T)(A +

Re: types for VR_VARYING

2019-08-13 Thread Aldy Hernandez
On 8/12/19 7:46 PM, Jeff Law wrote: On 8/12/19 12:43 PM, Aldy Hernandez wrote: This is a fresh re-post of: https://gcc.gnu.org/ml/gcc-patches/2019-07/msg6.html Andrew gave me some feedback a week ago, and I obviously don't remember what it was because I was about to leave on PTO.  Howeve

Re: enforce canonicalization of value_range's

2019-08-13 Thread Aldy Hernandez
On 8/12/19 7:32 PM, Jeff Law wrote: On 8/12/19 12:48 PM, Aldy Hernandez wrote: This is a ping of: https://gcc.gnu.org/ml/gcc-patches/2019-07/msg8.html I have addressed the comments Jeff mentioned there. This patch goes before the VR_VARYING + types patch, but I can adapt either one to com

[Committed] PR fortran/87991 -- Pointer data object requires a target

2019-08-13 Thread Steve Kargl
Committed as obviously. 2019-08-13 Steven G. Kargl PR fortran/87991 * resolve.c (check_data_variable): data-stmt-object with pointer attribute requires a data-stmt-value with the target attribute. 2019-08-13 Steven G. Kargl PR fortran/87991 * gfort

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-13 Thread Tejas Joshi
Hi. Here is a clean patch that does not fold roundeven resulting for integer type and the conditions for folding functions round/ceil/floor/roundeven and trunc only checks for signaling NaN. This patch also conforms to GNU's coding style and standards. The fact that it should be CASE_MATHFN_FLOATN

Re: [PATCH][1/2][i386] STV changes, DImode chain cost

2019-08-13 Thread Uros Bizjak
On Tue, Aug 13, 2019 at 2:16 PM Richard Biener wrote: > > > The following splits out the DImode chain cost changes from the > patch adding SImode chain handling. There are two main parts: > > 1) fix REG_P (src) && REG_P (dst) costing which currently favors >SSE because we use COSTS_N_INSNS ba

<    1   2