Re: [PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Patrick Palka via Gcc-patches
On Wed, 2 Jun 2021, Jason Merrill wrote: > On 6/2/21 2:39 PM, Patrick Palka wrote: > > Here, the dependent template name in the return type of f() resolves to > > an alias of int& after substitution, and we end up complaining about > > qualifying this reference type with 'const' from cp_build_qual

Re: [EXTERNAL] Re: [PATCH] tree-optimization: Optimize division followed by multiply [PR95176]

2021-06-02 Thread Victor Tong via Gcc-patches
Hi Richard, Thanks for reviewing my patch. I did a search online and you're right -- there isn't a vector modulo instruction. I'll remove the X * (Y / X) --> Y - (Y % X) pattern and the existing X - (X / Y) * Y --> X % Y from triggering on vector types. I looked into why the following pattern

Re: [PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Patrick Palka via Gcc-patches
On Wed, 2 Jun 2021, Patrick Palka wrote: > On Wed, 2 Jun 2021, Jason Merrill wrote: > > > On 6/2/21 2:39 PM, Patrick Palka wrote: > > > Here, the dependent template name in the return type of f() resolves to > > > an alias of int& after substitution, and we end up complaining about > > > qualifyi

Re: [PATCH v2] REE: PR rtl-optimization/100264: Handle more PARALLEL SET expressions

2021-06-02 Thread Jim Wilson
On Mon, May 10, 2021 at 5:39 AM Christoph Muellner wrote: > gcc/ChangeLog: > PR rtl-optimization/100264 > * ree.c (get_sub_rtx): Ignore SET expressions without register > destinations and remove assertion, as it is not valid anymore > with this new behaviour. >

[PATCH][RFC] Sparse on entry cache for Ranger.

2021-06-02 Thread Andrew MacLeod via Gcc-patches
As mentioned earlier, I abstracted the on-entry cache at the beginning of stage1. This was to make it easier to port future changes back to GCC11 so we could provide alternate representations to deal with memory issues, or what have you. This patch introduces a sparse representation of the cac

Re: [PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/21 4:56 PM, Patrick Palka wrote: On Wed, 2 Jun 2021, Patrick Palka wrote: On Wed, 2 Jun 2021, Jason Merrill wrote: On 6/2/21 2:39 PM, Patrick Palka wrote: Here, the dependent template name in the return type of f() resolves to an alias of int& after substitution, and we end up complai

[PATCH] teach compute_objsize about placement new (PR 100876)

2021-06-02 Thread Martin Sebor via Gcc-patches
The two forms of placement operator new defined in return their pointer argument and may not be displaced by user-defined functions. But because they are ordinary (not built-in) functions this property isn't reflected in their declarations alone, and there's no user- level attribute to annotate t

Re: [PATCH] teach compute_objsize about placement new (PR 100876)

2021-06-02 Thread Marek Polacek via Gcc-patches
On Wed, Jun 02, 2021 at 03:40:49PM -0600, Martin Sebor via Gcc-patches wrote: > + if (!gimple_call_builtin_p (stmt, BUILT_IN_NORMAL)) > +{ > + /* See if this is a call to placement new. */ > + if (!fn > + || !DECL_IS_OPERATOR_NEW_P (fn) > + || DECL_IS_REPLACEABLE_OPERATO

[PATCH 0/2] rs6000: Add support for _mm_minpos_epu16

2021-06-02 Thread Paul A. Clarke via Gcc-patches
Added compatible implementation of _mm_minpos_epu16 for powerpc. Copied, improved, and fixed testcase from i386. Tested on BE, LE (32 and 64bit). Paul A. Clarke (2): rs6000: Add support for _mm_minpos_epu16 rs6000: Add test for _mm_minpos_epu16 gcc/config/rs6000/smmintrin.h |

[PATCH 1/2] rs6000: Add support for _mm_minpos_epu16

2021-06-02 Thread Paul A. Clarke via Gcc-patches
Add a naive implementation of the subject x86 intrinsic to ease porting. 2021-06-02 Paul A. Clarke gcc/ChangeLog: * config/rs6000/smmintrin.h (_mm_minpos_epu16): New. --- gcc/config/rs6000/smmintrin.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/gcc

[PATCH 2/2] rs6000: Add test for _mm_minpos_epu16

2021-06-02 Thread Paul A. Clarke via Gcc-patches
Copy the test for _mm_minpos_epu16 from gcc/testsuite/gcc.target/i386/sse4_1-phminposuw.c, with a few adjustments: - Adjust the dejagnu directives for powerpc platform. - Make the data not be monotonically increasing, such that some of the returned values are not always the first value (index

Re: [PATCH] rs6000: Support doubleword swaps removal in rot64 load store [PR100085]

2021-06-02 Thread Segher Boessenkool
On Wed, Jun 02, 2021 at 03:19:32AM -0500, Xionghu Luo wrote: > On P8LE, extra rot64+rot64 load or store instructions are generated > in float128 to vector __int128 conversion. > > This patch teaches pass swaps to also handle such pattens to remove > extra swap instructions. Did you check if this

RE: [backport gcc10, gcc9] Requet to backport PR97969

2021-06-02 Thread Przemyslaw Wirkus via Gcc-patches
Hi, > -Original Message- > From: Vladimir Makarov > Sent: 31 May 2021 16:52 > To: Przemyslaw Wirkus ; Richard Biener > > Cc: gcc-patches@gcc.gnu.org; ja...@redhat.com; ni...@redhat.com; > Richard Earnshaw ; Ramana Radhakrishnan > ; Kyrylo Tkachov > > Subject: Re: [backport gcc10, gcc9]

[Patch] Fortran/OpenMP: Add omp loop [PR99928]

2021-06-02 Thread Tobias Burnus
This patch adds support for 'omp loop' to gfortran including the combined constructs. It also fixes some splitting issues with clauses in combined constructs. It does not attempt to clean up all remaining Fortran issues with clauses in combined constructs (cf. below + PR). * * * Since 'paralle

Re: [PATCH] rtl: constm64_rtx..const64_rtx

2021-06-02 Thread Segher Boessenkool
Hi! On Wed, Jun 02, 2021 at 06:07:28PM +0100, Richard Sandiford wrote: > Segher Boessenkool writes: > > Since times immemorial there has been const_int_rtx for all values from > > -64 to 64, but only constm1_rtx..const2_rtx have been available for > > convenient use. Change this, so that we can

Re: [PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Patrick Palka via Gcc-patches
On Wed, 2 Jun 2021, Jason Merrill wrote: > On 6/2/21 4:56 PM, Patrick Palka wrote: > > On Wed, 2 Jun 2021, Patrick Palka wrote: > > > > > On Wed, 2 Jun 2021, Jason Merrill wrote: > > > > > > > On 6/2/21 2:39 PM, Patrick Palka wrote: > > > > > Here, the dependent template name in the return type

Re: [PATCH 01/11] gen: Emit error msg for empty split condition

2021-06-02 Thread Segher Boessenkool
On Wed, Jun 02, 2021 at 04:18:46PM +0800, Kewen.Lin wrote: > on 2021/6/2 下午3:43, Richard Biener wrote: > Yes, the "" in split condition does mean 'true' (always). Right -- which means it will be split whenever it matches. This *can* be intended, but in define_insn_and_split it is almost always a

Re: [RFC/PATCH 00/11] Fix up some unexpected empty split conditions

2021-06-02 Thread Segher Boessenkool
On Wed, Jun 02, 2021 at 06:32:13PM +0100, Richard Sandiford wrote: > Richard Biener writes: > > So what Richard suggests would be to disallow split conditions > > that do not start with "&& ", it's probably easy to do that as well > > and look for build fails. That should catch all cases to look

Re: [PATCH 1/2] rs6000: Add support for _mm_minpos_epu16

2021-06-02 Thread Segher Boessenkool
Hi! On Wed, Jun 02, 2021 at 05:13:15PM -0500, Paul A. Clarke wrote: > Add a naive implementation of the subject x86 intrinsic to > ease porting. > +/* Return horizontal packed word minimum and its index in bits [15:0] > + and bits [18:16] respectively. */ > +extern __inline __m128i __attribute

Re: match.pd: ~X & Y to X ^ Y in some cases

2021-06-02 Thread Andrew Pinski via Gcc-patches
On Fri, May 13, 2016 at 12:07 PM Marc Glisse wrote: > > Hello, > > maybe this would fit better in VRP, but it is easier (and not completely > useless) to put it in match.pd. > > Since the transformation is restricted to GIMPLE, I think I don't need to > check that @0 is SSA_NAME. I didn't test if

Re: [PATCH] rs6000: Support doubleword swaps removal in rot64 load store [PR100085]

2021-06-02 Thread Xionghu Luo via Gcc-patches
Hi, On 2021/6/3 06:20, Segher Boessenkool wrote: > On Wed, Jun 02, 2021 at 03:19:32AM -0500, Xionghu Luo wrote: >> On P8LE, extra rot64+rot64 load or store instructions are generated >> in float128 to vector __int128 conversion. >> >> This patch teaches pass swaps to also handle such pattens to re

Re: [PATCH 2/2, rs6000] Remove mode promotion for pseudos

2021-06-02 Thread HAO CHEN GUI via Gcc-patches
Hi,   Gentle ping this:   https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570854.html Thanks. On 20/5/2021 下午 5:49, HAO CHEN GUI wrote: Hi,    The patch removes mode promotion for pseudos on rs6000 target.    The attachments are the patch diff and change log file.     Bootstrapped and t

Re: [PATCH 2/2] rs6000: Add test for _mm_minpos_epu16

2021-06-02 Thread Segher Boessenkool
On Wed, Jun 02, 2021 at 05:13:16PM -0500, Paul A. Clarke wrote: > + for (i = 0; i < NUM; i++) > +src.s[i] = i * i - 68 * i + 1200; Could you do tests with some identical elements as well? Because that is where I think it fails on BE currently. Segher

[PATCH v2] predcom: Enabled by loop vect at O2 [PR100794]

2021-06-02 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2021/6/3 上午1:19, Richard Sandiford wrote: > "Kewen.Lin via Gcc-patches" writes: >> Hi, >> >> As PR100794 shows, in the current implementation PRE bypasses >> some optimization to avoid introducing loop carried dependence >> which stops loop vectorizer to vectorize the loop. At -O2

[PATCH] x86: Convert CONST_WIDE_INT to broadcast in move expanders

2021-06-02 Thread H.J. Lu via Gcc-patches
Update move expanders to convert the CONST_WIDE_INT operand to vector broadcast from a byte with AVX2. Add ix86_gen_scratch_sse_rtx to return a scratch SSE register which won't increase stack alignment requirement and blocks transformation by the combine pass. A small benchmark: https://gitlab.c

Re: [PATCH] c++: cv-qualified dependent name of alias tmpl [PR100592]

2021-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/21 7:05 PM, Patrick Palka wrote: On Wed, 2 Jun 2021, Jason Merrill wrote: On 6/2/21 4:56 PM, Patrick Palka wrote: On Wed, 2 Jun 2021, Patrick Palka wrote: On Wed, 2 Jun 2021, Jason Merrill wrote: On 6/2/21 2:39 PM, Patrick Palka wrote: Here, the dependent template name in the retur

[PATCH,rs6000] Fix operand order to subf for p10 fusion.

2021-06-02 Thread Aaron Sawdey via Gcc-patches
This certainly causes a bootstrap miscompare, and might also be responsible for PR/100820. The operands to subf were reversed in the logical-add/sub fusion patterns, and I screwed up my bootstrap test which is how it ended up getting committed. If bootstrap and regtest passes, ok for trunk (and ev

Re: [PATCH,rs6000] Fix operand order to subf for p10 fusion.

2021-06-02 Thread Segher Boessenkool
Hi! On Wed, Jun 02, 2021 at 11:05:00PM -0500, Aaron Sawdey wrote: > This certainly causes a bootstrap miscompare, and might also be > responsible for PR/100820. The operands to subf were reversed > in the logical-add/sub fusion patterns, and I screwed up my > bootstrap test which is how it ended u

Re: [RFC/PATCH 00/11] Fix up some unexpected empty split conditions

2021-06-02 Thread Kewen.Lin via Gcc-patches
Hi Richi/Richard/Jeff/Segher, Thanks for the comments! on 2021/6/3 上午7:52, Segher Boessenkool wrote: > On Wed, Jun 02, 2021 at 06:32:13PM +0100, Richard Sandiford wrote: >> Richard Biener writes: >>> So what Richard suggests would be to disallow split conditions >>> that do not start with "&& ",

[PATCH] Improve match_simplify_replacement in phi-opt

2021-06-02 Thread apinski--- via Gcc-patches
From: Andrew Pinski This improves match_simplify_replace in phi-opt to handle the case where there is one cheap (non-call) preparation statement in the middle basic block similar to xor_replacement and others. This allows to remove xor_replacement which it does too. OK? Bootstrapped and tested

Re: [PATCH 04/11] cris: Update unexpected empty split condition

2021-06-02 Thread Kewen.Lin via Gcc-patches
Hi Nilsson, on 2021/6/2 下午8:45, Hans-Peter Nilsson wrote: >> From: Kewen Lin >> Date: Wed, 2 Jun 2021 07:04:54 +0200 > >> gcc/ChangeLog: >> >> * config/cris/cris.md (*addi_reload): Fix empty split condition. >> --- >> gcc/config/cris/cris.md | 2 +- >> 1 file changed, 1 insertion(+), 1 del

Re: [PATCH] rs6000: Support doubleword swaps removal in rot64 load store [PR100085]

2021-06-02 Thread Xionghu Luo via Gcc-patches
On 2021/6/3 08:46, Xionghu Luo via Gcc-patches wrote: > Hi, > > On 2021/6/3 06:20, Segher Boessenkool wrote: >> On Wed, Jun 02, 2021 at 03:19:32AM -0500, Xionghu Luo wrote: >>> On P8LE, extra rot64+rot64 load or store instructions are generated >>> in float128 to vector __int128 conversion. >>>

[PATCH 1/2] CALL_INSN may not be a real function call.

2021-06-02 Thread liuhongt via Gcc-patches
Use "used" flag for CALL_INSN to indicate it's a fake call. If it's a fake call, it won't have its own function stack. gcc/ChangeLog PR target/82735 * df-scan.c (df_get_call_refs): When call_insn is a fake call, it won't use stack pointer reg. * final.c (leaf_funct

[PATCH 2/2] Fix _mm256_zeroupper by representing the instructions as call_insns in which the call has a special vzeroupper ABI.

2021-06-02 Thread liuhongt via Gcc-patches
When __builtin_ia32_vzeroupper is called explicitly, the corresponding vzeroupper pattern does not carry any CLOBBERS or SETs before LRA, which leads to incorrect optimization in pass_reload. In order to solve this problem, this patch refine instructions as call_insns in which the call has a specia

<    1   2