[PATCH] predcom: Refactor more using auto_vec

2021-07-18 Thread Kewen.Lin via Gcc-patches
Hi Martin & Richard, >> A further improvement worth considering (if you're so inclined :) >> is replacing the pcom_worker vec members with auto_vec (obviating >> having to explicitly release them) and for the same reason also >> replacing the comp_ptrs bare pointer members with auto_vecs. >> There

Re: [RFC/PATCH] Use range-based for loops for traversing loops

2021-07-18 Thread Andrew Pinski via Gcc-patches
On Sun, Jul 18, 2021 at 11:21 PM Kewen.Lin via Gcc-patches wrote: > > Hi, > > This patch follows Martin's suggestion here[1], to support > range-based for loops for traversing loops, analogously to > the patch for vec[2]. > > Bootstrapped and regtested on powerpc64le-linux-gnu P9, > x86_64-redhat-

[RFC/PATCH] Use range-based for loops for traversing loops

2021-07-18 Thread Kewen.Lin via Gcc-patches
Hi, This patch follows Martin's suggestion here[1], to support range-based for loops for traversing loops, analogously to the patch for vec[2]. Bootstrapped and regtested on powerpc64le-linux-gnu P9, x86_64-redhat-linux and aarch64-linux-gnu, also bootstrapped on ppc64le P9 with bootstrap-O3 conf

PING^1: [PATCH] ipa-devirt: check precision mismatch of enum values [PR101396]

2021-07-18 Thread Xi Ruoyao via Gcc-patches
Ping. On Sun, 2021-07-11 at 01:48 +0800, Xi Ruoyao wrote: > We are comparing enum values (in wide_int) to check ODR violation. > However, if we compare two wide_int values with different precision, > we'll trigger an assert, leading to ICE.  With enum-base introduced > in C++11, it's easy to sink

Ping [PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952]

2021-07-18 Thread HAO CHEN GUI via Gcc-patches
Hi,   Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574503.html Thanks. On 6/7/2021 上午 11:11, HAO CHEN GUI wrote: Hi    The patch changed matching conditions in pr81384.c and pr56605.c. The original conditions failed to match due to mode promotion disabled.    The

Ping [PATCH, rs6000] fix execution failure of parity_1.f90 on P10 [PR100952]

2021-07-18 Thread HAO CHEN GUI via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575036.html Thanks On 13/7/2021 上午 9:38, HAO CHEN GUI wrote: Hi,    I refined the patch according to Segher's advice. Is this okay for trunk? Any recommendations? Thanks a lot. On 6/7/2021 上午 11:01, HAO CHEN GU

Re: [PATCH] Fold bswap32(x) != 0 to x != 0 (and related transforms)

2021-07-18 Thread Marc Glisse
On Sun, 18 Jul 2021, Roger Sayle wrote: +(if (GIMPLE || !TREE_SIDE_EFFECTS (@0)) I don't think you need to worry about that, the general genmatch machinery is already supposed to take care of it. All the existing cases in match.pd are about cond_expr, where counting the occurrences of ea

RE: [PATCH] tree-optimization/101186 - extend FRE with "equivalence map" for condition prediction

2021-07-18 Thread Di Zhao OS via Gcc-patches
I tried to improve the patch following your advices and to catch more opportunities. Hope it'll be helpful. On 6/24/21 8:29 AM, Richard Biener wrote: > On Thu, Jun 24, 2021 at 11:55 AM Di Zhao via Gcc-patches patc...@gcc.gnu.org> wrote: > > I have some reservations about extending the ad-hoc "

Re: [PATCH] ix86: Enable the GPR only instructions for -mgeneral-regs-only

2021-07-18 Thread Uros Bizjak via Gcc-patches
On Sun, Jul 18, 2021 at 3:40 AM H.J. Lu wrote: > > For -mgeneral-regs-only, enable the GPR only instructions which are > enabled implicitly by SSE ISAs unless they have been disabled explicitly. > > gcc/ > > PR target/101492 > * common/config/i386/i386-common.c (ix86_handle_option)

Re: [PATCH] x86: Don't issue vzeroupper if callee returns AVX register

2021-07-18 Thread Uros Bizjak via Gcc-patches
On Sun, Jul 18, 2021 at 6:47 PM H.J. Lu wrote: > > Don't issue vzeroupper before function call if callee returns AVX > register since callee must be compiled with AVX. > > gcc/ > > PR target/101495 > * config/i386/i386.c (ix86_check_avx_upper_stores): Moved before > ix86_av

[PATCH] x86: Don't issue vzeroupper if callee returns AVX register

2021-07-18 Thread H.J. Lu via Gcc-patches
Don't issue vzeroupper before function call if callee returns AVX register since callee must be compiled with AVX. gcc/ PR target/101495 * config/i386/i386.c (ix86_check_avx_upper_stores): Moved before ix86_avx_u128_mode_needed. (ix86_avx_u128_mode_needed): Return

[PATCH] Fold bswap32(x) != 0 to x != 0 (and related transforms)

2021-07-18 Thread Roger Sayle
This patch to match.pd implements several closely related folding simplifications at the tree-level, that make use of the property that bit permutation functions, rotate and bswap have inverses. [1] bswap(X) eq/ne C, for constant C, simplifies to X eq/ne C' where C'=bswap(C), generaliz

Re: [PATCH] Fix PR 101453: ICE with optimize and large integer constant

2021-07-18 Thread Andreas Schwab
On Jul 18 2021, Segher Boessenkool wrote: > On Sat, Jul 17, 2021 at 03:13:59PM -0700, Andrew Pinski wrote: >> On Sat, Jul 17, 2021 at 2:31 PM Segher Boessenkool >> wrote: >> > On Fri, Jul 16, 2021 at 11:35:25AM -0700, apinski--- via Gcc-patches wrote: >> > > --- a/gcc/c-family/c-common.c >> > > +

Re: [PATCH] Fix PR 101453: ICE with optimize and large integer constant

2021-07-18 Thread Segher Boessenkool
On Sat, Jul 17, 2021 at 03:13:59PM -0700, Andrew Pinski wrote: > On Sat, Jul 17, 2021 at 2:31 PM Segher Boessenkool > wrote: > > On Fri, Jul 16, 2021 at 11:35:25AM -0700, apinski--- via Gcc-patches wrote: > > > --- a/gcc/c-family/c-common.c > > > +++ b/gcc/c-family/c-common.c > > > @@ -5799,7 +579