[PATCH] Add TARGET_IFUNC_REF_LOCAL_OK

2021-06-19 Thread H.J. Lu via Gcc-patches
1. On some targets, like PowerPC, reference to ifunc function resolver must be non-local so that compiler will properly emit PLT call. Add TARGET_IFUNC_REF_LOCAL_OK to allow binding indirect function resolver locally for targets which don't require special PLT call sequence. 2. Add ix86_call_use_p

[PATCH 7/7] Port most of the A CMP 0 ? A : -A to match

2021-06-19 Thread apinski--- via Gcc-patches
From: Andrew Pinski To improve phiopt and be able to remove abs_replacement, this ports most of "A CMP 0 ? A : -A" from fold_cond_expr_with_comparison to match.pd. There is a few extra changes that are needed to remove the "A CMP 0 ? A : -A" part from fold_cond_expr_with_comparison: * Need to

[PATCH 5/7] Allow match-and-simplified phiopt to run in early phiopt

2021-06-19 Thread apinski--- via Gcc-patches
From: Andrew Pinski To move a few things more to match-and-simplify from phiopt, we need to allow match_simplify_replacement to run in early phiopt. To do this, we need to mark some match patterns if they can be done in early phiopt or not. OK? Bootstrapped and tested on x86_64-linux-gnu with n

[PATCH 6/7] Lower for loops before lowering cond in genmatch

2021-06-19 Thread apinski--- via Gcc-patches
From: Andrew Pinski While converting some fold_cond_expr_with_comparison to match, I found that I wanted to use "for cnd (cond vec_cond)" but that was not causing the lowering of cond to happen. What was happening was the lowering of the for loop was happening after the lowering of the cond. So s

[PATCH 4/7] Expand the comparison argument of fold_cond_expr_with_comparison

2021-06-19 Thread apinski--- via Gcc-patches
From: Andrew Pinski To make things slightly easiler to convert fold_cond_expr_with_comparison over to match.pd, expanding the arg0 argument into 3 different arguments is done. Also this was simple because we don't use arg0 after grabbing the code and the two operands. Also since we do this, we do

[PATCH 3/7] Try inverted comparison for match_simplify in phiopt

2021-06-19 Thread apinski--- via Gcc-patches
From: Andrew Pinski Since match and simplify does not have all of the inverted comparison patterns, it make sense to just have phi-opt try to do the inversion and try match and simplify again. OK? Bootstrapped and tested on x86_64-linux-gnu. Thanks, Andrew Pinski gcc/ChangeLog: * tree

[PATCH 2/7] Duplicate the range information of the phi onto the new ssa_name

2021-06-19 Thread apinski--- via Gcc-patches
From: Andrew Pinski Since match_simplify_replacement uses gimple_simplify, there is a new ssa name created sometimes and then we go and replace the phi edge with this new ssa name, the range information on the phi is lost. I don't have a testcase right now where we lose the range information thou

[PATCH 1/7] Reset the range info on the moved instruction in PHIOPT

2021-06-19 Thread apinski--- via Gcc-patches
From: Andrew Pinski I had missed this when wrote the patch which allowed the gimple to be moved from inside the conditional as it. It was also missed in the review. Anyways the range information needs to be reset for the moved gimple as it was under a conditional and the flow has changed to be

[PATCH] c++: REF_PARENTHESIZED_P wrapper inhibiting NRVO [PR67302]

2021-06-19 Thread Patrick Palka via Gcc-patches
Here, in C++14 or later, we remember the parentheses around 'a' in the return statement by using a REF_PARENTHESIZED_P wrapper, which ends up inhibiting NRVO because we don't look through this wrapper before checking the conditions for NRVO. This patch fixes this by calling maybe_undo_parenthesize

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

2021-06-19 Thread Marc Glisse
On Fri, 18 Jun 2021, Richard Biener wrote: Option 2: Add a new pattern to support scenarios that the existing nop_convert pattern bails out on. Existing pattern: (simplify (minus (nop_convert1? @0) (nop_convert2? (minus (nop_convert3? @@0) @1))) (view_convert @1)) I tried to check wit

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-19 Thread Segher Boessenkool
On Sat, Jun 19, 2021 at 09:09:05AM -0500, Segher Boessenkool wrote: > powerpc64-linux now is building, and is running the tetsuite. My > powerpc64le-linux build used --enable-languages=all, but Ada fails to > build, so I'll redo that without Ada. For powerpc64le-linux I get === g

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-19 Thread Segher Boessenkool
Hi! On Fri, Jun 18, 2021 at 10:00:40PM +0100, Gaius Mulley wrote: > Segher Boessenkool writes: > > On Thu, Jun 17, 2021 at 11:26:41PM +0100, Gaius Mulley via Gcc-patches > > wrote: > >> Debian Stretch using make -j 4, x86_64 GNU/Linux Debian Stretch built > >> using make -j 24 and also under x86

Re: [Ping^2, Patch, Fortran] PR100337 Should be able to pass non-present optional arguments to CO_BROADCAST

2021-06-19 Thread Andre Vehreschild via Gcc-patches
PING! On Fri, 4 Jun 2021 18:05:18 +0200 Andre Vehreschild wrote: > Ping! > > On Fri, 21 May 2021 15:33:11 +0200 > Andre Vehreschild wrote: > > > Hi, > > > > the attached patch fixes an issue when calling CO_BROADCAST in > > -fcoarray=single mode, where the optional but non-present (in the calli

Re: [Patch, fortran V3] PR fortran/100683 - Array initialization refuses valid

2021-06-19 Thread dhumieres.dominique--- via Gcc-patches
Hi José, The logic is now much clearer. OK for the new version. Thanks for the work. Dominique

Re: [Patch, fortran v2] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling

2021-06-19 Thread dhumieres.dominique--- via Gcc-patches
Le 2021-06-06 19:58, dhumieres.domini...@free.fr a écrit : Hi José, Patch tested only on x86_64-pc-linux-gnu. Also tested on darwin20. The patch is OK for me provided the updated PR94331.c test file replaces the original one. Since the PRs are about wrong code, I think the patch should be bac

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-19 Thread Matthias Klose
On 6/19/21 9:53 AM, Gaius Mulley wrote: > Matthias Klose writes: > >> x86_64-linux-gnu-g++-10 is the compiler used for the bootstrap. I haven't >> checked if that is also seen for a normal bootstrap. Apparently it tries to >> re-bootstrap the compiler. >> >> The build is configured with --with-b

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-19 Thread Gaius Mulley via Gcc-patches
Matthias Klose writes: > x86_64-linux-gnu-g++-10 is the compiler used for the bootstrap. I haven't > checked if that is also seen for a normal bootstrap. Apparently it tries to > re-bootstrap the compiler. > > The build is configured with --with-build-config=bootstrap-lto-lean, built > with > m

Re: [PATCH] tree-optimization/101014 - Remove poor value computations.

2021-06-19 Thread Richard Biener via Gcc-patches
On June 18, 2021 11:46:08 PM GMT+02:00, Andrew MacLeod wrote: >I am pleased to say that this patch kills the poor value computations >in >the ranger's cache. > >Its been a bit of a thorn, and is mostly a hack that was applied early >on to enable getting some opportunities that were hard to get

[PATCH] mips: check MSA support for vector modes [PR100760,PR100761,PR100762]

2021-06-19 Thread Xi Ruoyao via Gcc-patches
Check if the vector mode is really supported by MSA in certain cases, instead of testing ISA_HAS_MSA. Simply testing ISA_HAS_MSA can cause ICE when MSA is enabled besides other MIPS SIMD extensions (notably, Loongson MMI). Bootstrapped and tested on mips64el-linux-gnu. OK to commit? gcc/