[PATCH v6] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-11-08 Thread Marek Polacek via Gcc-patches
On Sat, Nov 06, 2021 at 03:29:57PM -0400, Jason Merrill wrote: > On 11/6/21 14:28, Marek Polacek wrote: > > On Sat, Nov 06, 2021 at 02:32:26AM +0100, Bernhard Reutner-Fischer wrote: > > > On 6 November 2021 01:21:43 CET, Marek Polacek via Gcc-patches > > > wrote: > > > > > > > > > > > Thanks, s

[PATCH] [pass_if_conversion] Extend is_cond_scalar_reduction to handle bit_and/bit_xor/bit_ior.

2021-11-08 Thread liuhongt via Gcc-patches
This will enable transformation like - # sum1_50 = PHI - # sum2_52 = PHI + # sum1_50 = PHI <_87(13), 0(4)> + # sum2_52 = PHI <_89(13), 0(4)> # ivtmp_62 = PHI i.2_7 = (long unsigned int) i_49; _8 = i.2_7 * 8; ... vec1_i_38 = vec1_29 >> _10; vec2_i_39 = vec2_31 >> _10; _11 =

[PATCH] fix up compute_objsize (including PR 103143)

2021-11-08 Thread Martin Sebor via Gcc-patches
The pointer-query code that implements compute_objsize() that's in turn used by most middle end access warnings now has a few warts in it and (at least) one bug. With the exception of the bug the warts aren't behind any user-visible bugs that I know of but they do cause problems in new code I've

Re: [PATCH 1/2] [Gimple] Simplify (trunc)fmax/fmin((extend)a, (extend)b) to MAX/MIN(a,b)

2021-11-08 Thread Hongtao Liu via Gcc-patches
On Mon, Nov 8, 2021 at 4:59 PM Richard Biener wrote: > > On Mon, Nov 8, 2021 at 2:30 AM Hongtao Liu wrote: > > > > On Fri, Nov 5, 2021 at 5:52 PM Richard Biener > > wrote: > > > > > > On Fri, Nov 5, 2021 at 6:38 AM liuhongt wrote: > > > > > > > > a and b are same type as trunc type and has less

[PATCH] PR tree-optimization/102232 Adding a missing pattern to match.pd

2021-11-08 Thread Navid Rahimi via Gcc-patches
Hi GCC community, This patch will add the missed pattern described in bug 102232 [1] to the match.pd. The testcase will test whether the multiplication and division has been removed from the code or not. The correctness proof for this pattern is here [2] in case anyone is curious. PR tree-opti

Re: [PATCH] PR tree-optimization/102232 Adding a missing pattern to match.pd

2021-11-08 Thread Navid Rahimi via Gcc-patches
Sorry, a last minute update via my editor changed the MIME type to application/octet-stream. You can find the patch with correct MIME (text/x-diff) attached to this email. (Same file and content, fixed MIME). Best wishes, Navid. From: Gcc-patches on b

Re: [RFA] Minor optimization of variable bit testing

2021-11-08 Thread Jeff Law via Gcc-patches
On 11/3/2021 2:15 AM, Richard Biener via Gcc-patches wrote: On Tue, Nov 2, 2021 at 4:53 PM Jeff Law wrote: I was wandering spec chasing down instances where we should be generating bit-test, bit-set and bit-clear types of instructions for our target when I ran across a generic missed optimiz

Re: [PATCH v6] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-11-08 Thread Jason Merrill via Gcc-patches
On 11/8/21 20:41, Marek Polacek wrote: On Sat, Nov 06, 2021 at 03:29:57PM -0400, Jason Merrill wrote: On 11/6/21 14:28, Marek Polacek wrote: On Sat, Nov 06, 2021 at 02:32:26AM +0100, Bernhard Reutner-Fischer wrote: On 6 November 2021 01:21:43 CET, Marek Polacek via Gcc-patches wrote: Than

Re: [PATCH] c++: bogus error w/ variadic concept-id as if cond [PR98394]

2021-11-08 Thread Jason Merrill via Gcc-patches
On 11/8/21 19:54, Patrick Palka wrote: On Mon, 8 Nov 2021, Jason Merrill wrote: On 11/8/21 10:35, Patrick Palka wrote: Here when tentatively parsing the if condition as a declaration, we try to treat C<1> as the start of a constrained placeholder type, which we quickly reject because C doesn't

Re: [PATCH] c++: Skip unnamed bit-fields more

2021-11-08 Thread Jason Merrill via Gcc-patches
On 11/8/21 14:49, Marek Polacek wrote: As Jason noticed in , we shouldn't require an initializer for an unnamed bit-field, because, as [class.bit] says, they cannot be initialized. Bootstrapped/regtested on x86_64-pc-linux-gnu,

Re: [tree-ssa-loop] Remove redundant check for number of loops in pass_vectorize::execute

2021-11-08 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 8 Nov 2021 at 16:42, Richard Biener wrote: > > On Mon, Nov 8, 2021 at 12:06 PM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > Hi, > > The attached patch removes redundant check for number of loops in > > pass_vectorize::execute, > > since it only calls vectorize_loops, and in vector

Re: [PATCH v6] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-11-08 Thread Bernhard Reutner-Fischer via Gcc-patches
On Tue, 9 Nov 2021 00:12:10 -0500 Jason Merrill wrote: > On 11/8/21 20:41, Marek Polacek wrote: > > On Sat, Nov 06, 2021 at 03:29:57PM -0400, Jason Merrill wrote: > > + for (auto opt : v) > > +{ > > + char *cln = strstr (opt, "::"); > > + /* We don't accept '::attr'. */ > > +

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, 8 Nov 2021, Jakub Jelinek wrote: > On Mon, Nov 08, 2021 at 12:46:04PM +0100, Jakub Jelinek via Gcc-patches wrote: > > So, if we want to make PCH work for PIEs, I'd say we can: > > 1) add a new GTY option, say callback, which would act like > >skip for non-PCH and for PCH would make us

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-08 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 12:47 AM Qing Zhao wrote: > > Hi, I tried both the following patches: > > Patch1: > > [opc@qinzhao-ol8u3-x86 gcc]$ git diff > diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c > index 0cba95411a6..ca49d2b4514 100644 > --- a/gcc/internal-fn.c > +++ b/gcc/internal-fn.c > @@ -

Re: [tree-ssa-loop] Remove redundant check for number of loops in pass_vectorize::execute

2021-11-08 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 7:34 AM Prathamesh Kulkarni wrote: > > On Mon, 8 Nov 2021 at 16:42, Richard Biener > wrote: > > > > On Mon, Nov 8, 2021 at 12:06 PM Prathamesh Kulkarni via Gcc-patches > > wrote: > > > > > > Hi, > > > The attached patch removes redundant check for number of loops in > > >

Re: [PATCH] ipa: Fix segfault when remapping debug_binds with expressions (PR 103132)

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, 8 Nov 2021, Martin Jambor wrote: > Hi, > > my initial implementation of the method > ipa_param_body_adjustments::remap_with_debug_expressions was based on > the assumption that if it was asked to remap an expression (as opposed > to a simple SSA_NAME), the expression would not contain an

Re: [PATCH] Introduce build_debug_expr_decl

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, 8 Nov 2021, Martin Jambor wrote: > Hi, > > this patch introduces a helper function build_debug_expr_decl to build > DEBUG_EXPR_DECL tree nodes in the most common way and replaces with a > call of this function all code pieces which build such a DECL itself > and sets its mode to the TYPE_

<    1   2