Re: [PATCH 3/4 v2] ivopts: Consider cost_step on different forms during unrolling

2020-08-21 Thread Bin.Cheng via Gcc-patches
On Tue, Aug 18, 2020 at 5:03 PM Kewen.Lin wrote: > > Hi Bin, > > > I see, it's similar to the auto-increment case where cost should be > > recorded only once. So this is okay given 1) fine predicting > > rtl-unroll is likely impossible here; 2) the patch has very limited > > impact. > > > Really

Re: [PATCH][GCC][GCC-10 backport] arm: Require MVE memory operand for destination of vst1q intrinsic

2020-08-21 Thread Ramana Radhakrishnan via Gcc-patches
On Fri, Aug 21, 2020 at 2:28 PM Joe Ramsay wrote: > > From: Joe Ramsay > > Hi, > > Previously, the machine description patterns for vst1q accepted a generic > memory > operand for the destination, which could lead to an unrecognised builtin when > expanding vst1q* intrinsics. This change fixes

Re: [PATCH] arm: Fix -mpure-code support/-mslow-flash-data for armv8-m.base [PR94538]

2020-08-21 Thread Ramana Radhakrishnan via Gcc-patches
On Wed, Aug 19, 2020 at 10:32 AM Christophe Lyon via Gcc-patches wrote: > > armv8-m.base (cortex-m23) has the movt instruction, so we need to > disable the define_split to generate a constant in this case, > otherwise we get incorrect insn constraints as described in PR94538. > > We also need to

Re: [PATCH][Arm] Auto-vectorization for MVE: vsub

2020-08-21 Thread Ramana Radhakrishnan via Gcc-patches
On Mon, Aug 17, 2020 at 7:42 PM Dennis Zhang wrote: > > > Hi all, > > This patch enables MVE vsub instructions for auto-vectorization. > It adds RTL templates for MVE vsub instructions using 'minus' instead of > unspec expression to make the instructions recognizable for vectorization. > MVE

Re: [PATCH 0/6] Parallelize Intra-Procedural Optimizations using the LTO Engine.

2020-08-21 Thread Josh Triplett
On Thu, Aug 20, 2020 at 07:00:13PM -0300, Giuliano Belinassi wrote: > This patch series add a new flag "-fparallel-jobs=" to control if the > compiler should try to compile the current file in parallel. [...] > Bootstrapped and Regtested on Linux x86_64. > > Giuliano Belinassi (6): > Modify gcc

Re: [PATCH] c++: Implement P1009: Array size deduction in new-expressions.

2020-08-21 Thread Jason Merrill via Gcc-patches
On 8/20/20 4:22 PM, Marek Polacek wrote: This patch implements C++20 P1009, allowing code like new double[]{1,2,3}; // array bound will be deduced Since this proposal makes the initialization rules more consistent, it is applied to all previous versions of C++ (thus, effectively, all the

Re: [PATCH 2/5] C front end support to detect out-of-bounds accesses to array parameters

2020-08-21 Thread Martin Sebor via Gcc-patches
On 8/19/20 6:09 PM, Joseph Myers wrote: On Wed, 19 Aug 2020, Martin Sebor via Gcc-patches wrote: I think you need a while loop there, not just an if, to account for the case of multiple consecutive cdk_attrs. At least the GNU attribute syntax direct-declarator: [...] (

Re: [PATCH] hppa: Improve expansion of ashldi3 when !TARGET_64BIT

2020-08-21 Thread John David Anglin
Hi Roger, On 2020-08-21 8:53 a.m., Roger Sayle wrote: > I was wondering whether Dave or Jeff (or someone else with access > to real hardware) might "spin" this patch for me? This may be totally unrelated to this patch but I hit this error in stage2 testing your change: build/genattrtab

[PATCH] hppa: PR middle-end/87256: Improved hppa_rtx_costs avoids synth_mult madness.

2020-08-21 Thread Roger Sayle
This is my proposed fix to PR middle-end/87256 where synth_mult takes an unreasonable amount of CPU time determining an optimal sequence of instructions to perform multiplications by (large) integer constants on hppa. One workaround, proposed in bugzilla, is to increase the hash table used to

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread Uros Bizjak via Gcc-patches
On Fri, Aug 21, 2020 at 6:29 PM Hongtao Liu wrote: > > On Fri, Aug 21, 2020 at 11:50 PM Uros Bizjak wrote: > > > > On Fri, Aug 21, 2020 at 5:41 PM Hongtao Liu wrote: > > > > > > On Fri, Aug 21, 2020 at 9:15 PM Uros Bizjak wrote: > > > > > > > > > > > gcc/ > > > > > > > PR target/88808

Re: [Patch, fortran] PR fortran/95352 - ICE on select rank with assumed-size selector and lbound intrinsic

2020-08-21 Thread Thomas Koenig via Gcc-patches
Hi Jose, Proposed patch to PR95352 - ICE on select rank with assumed-size selector and lbound intrinsic. Patch tested only on x86_64-pc-linux-gnu. Add check for NULL pointer before trying to access structure member, patch by Steve Kargl. this is OK, but you'll have to adjust your

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread Hongtao Liu via Gcc-patches
On Sat, Aug 22, 2020 at 1:08 AM H.J. Lu wrote: > > On Fri, Aug 21, 2020 at 10:02 AM H.J. Lu wrote: > > > > On Fri, Aug 21, 2020 at 9:46 AM Hongtao Liu wrote: > > > > > > On Sat, Aug 22, 2020 at 12:36 AM H.J. Lu wrote: > > > > > > > > On Fri, Aug 21, 2020 at 9:29 AM Hongtao Liu wrote: > > > >

Re: [Patch, fortran] PR fortran/94110 - Passing an assumed-size to an assumed-shape argument should be rejected

2020-08-21 Thread Thomas Koenig via Gcc-patches
Hi Jose, Proposed patch to PR94110 - Passing an assumed-size to an assumed-shape argument should be rejected. OK for master. Thanks a lot for the patch! Best regards Thomas

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread H.J. Lu via Gcc-patches
On Fri, Aug 21, 2020 at 10:02 AM H.J. Lu wrote: > > On Fri, Aug 21, 2020 at 9:46 AM Hongtao Liu wrote: > > > > On Sat, Aug 22, 2020 at 12:36 AM H.J. Lu wrote: > > > > > > On Fri, Aug 21, 2020 at 9:29 AM Hongtao Liu wrote: > > > > > > > > On Fri, Aug 21, 2020 at 11:50 PM Uros Bizjak wrote: > >

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread H.J. Lu via Gcc-patches
On Fri, Aug 21, 2020 at 9:46 AM Hongtao Liu wrote: > > On Sat, Aug 22, 2020 at 12:36 AM H.J. Lu wrote: > > > > On Fri, Aug 21, 2020 at 9:29 AM Hongtao Liu wrote: > > > > > > On Fri, Aug 21, 2020 at 11:50 PM Uros Bizjak wrote: > > > > > > > > On Fri, Aug 21, 2020 at 5:41 PM Hongtao Liu wrote:

[PATCH] middle-end: PR tree-optimization/21137: STRIP_NOPS avoids missed optimization.

2020-08-21 Thread Roger Sayle
PR tree-optimization/21137 is now an old enhancement request pointing out that an optimization I added back in 2006, to optimize "((x>>31)&64) != 0" as "x < 0", doesn't fire in the presence of unanticipated type conversions. The fix is to call STRIP_NOPS at the appropriate point. I'd considered

[PATCH] middle-end: Simplify popcount/parity of bswap/rotate.

2020-08-21 Thread Roger Sayle
This simple patch to match.pd optimizes away bit permutation operations, specifically bswap and rotate, in calls to popcount and parity. Although this patch has been developed and tested on LP64, it relies on there being no truncations or extensions to "marry up" the appropriate PARITY, PARITYL

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread Hongtao Liu via Gcc-patches
On Sat, Aug 22, 2020 at 12:36 AM H.J. Lu wrote: > > On Fri, Aug 21, 2020 at 9:29 AM Hongtao Liu wrote: > > > > On Fri, Aug 21, 2020 at 11:50 PM Uros Bizjak wrote: > > > > > > On Fri, Aug 21, 2020 at 5:41 PM Hongtao Liu wrote: > > > > > > > > On Fri, Aug 21, 2020 at 9:15 PM Uros Bizjak wrote:

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread H.J. Lu via Gcc-patches
On Fri, Aug 21, 2020 at 9:35 AM H.J. Lu wrote: > > On Fri, Aug 21, 2020 at 9:29 AM Hongtao Liu wrote: > > > > On Fri, Aug 21, 2020 at 11:50 PM Uros Bizjak wrote: > > > > > > On Fri, Aug 21, 2020 at 5:41 PM Hongtao Liu wrote: > > > > > > > > On Fri, Aug 21, 2020 at 9:15 PM Uros Bizjak wrote: >

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread H.J. Lu via Gcc-patches
On Fri, Aug 21, 2020 at 9:29 AM Hongtao Liu wrote: > > On Fri, Aug 21, 2020 at 11:50 PM Uros Bizjak wrote: > > > > On Fri, Aug 21, 2020 at 5:41 PM Hongtao Liu wrote: > > > > > > On Fri, Aug 21, 2020 at 9:15 PM Uros Bizjak wrote: > > > > > > > > > > > gcc/ > > > > > > > PR target/88808

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread Hongtao Liu via Gcc-patches
On Fri, Aug 21, 2020 at 11:50 PM Uros Bizjak wrote: > > On Fri, Aug 21, 2020 at 5:41 PM Hongtao Liu wrote: > > > > On Fri, Aug 21, 2020 at 9:15 PM Uros Bizjak wrote: > > > > > > > > > gcc/ > > > > > > PR target/88808 > > > > > > * config/i386/i386.c

[OG10] cherry pick a bunch of OpenMP 5 patches

2020-08-21 Thread Tobias Burnus
OG10 = devel/omp/gcc-10 a GCC 10 branch with some additional OpenMP/OpenACC/offloading patches I have cherry-picked the following GCC 11 patches, related to OpenMP 5 features (newest commit first): commit 8ec8095634cab5053da4c49935eeba13f2aee2fa gcc/fortran/module.c: Fix indentation

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread Uros Bizjak via Gcc-patches
On Fri, Aug 21, 2020 at 5:41 PM Hongtao Liu wrote: > > On Fri, Aug 21, 2020 at 9:15 PM Uros Bizjak wrote: > > > > > > > gcc/ > > > > > PR target/88808 > > > > > * config/i386/i386.c (ix86_preferred_reload_class): Allow > > > > > QImode data go into mask registers. > > > >

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread H.J. Lu via Gcc-patches
On Fri, Aug 21, 2020 at 8:41 AM Hongtao Liu wrote: > > On Fri, Aug 21, 2020 at 9:15 PM Uros Bizjak wrote: > > > > > > > gcc/ > > > > > PR target/88808 > > > > > * config/i386/i386.c (ix86_preferred_reload_class): Allow > > > > > QImode data go into mask registers. > > > >

Re: [PATCH] Using gen_int_mode instead of GEN_INT to avoid ICE caused by type promotion.

2020-08-21 Thread Hongtao Liu via Gcc-patches
On Fri, Aug 21, 2020 at 5:44 PM Richard Sandiford wrote: > > Hongtao Liu via Gcc-patches writes: > > ping ^ 4, it's a very simple fix for ICE. > > OK, thanks. (Reviewing on the basis that I agree it's a simple rtx > correctness fix.) > Thanks for the review. > Richard > > > > > On Mon, Aug

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread Hongtao Liu via Gcc-patches
On Fri, Aug 21, 2020 at 9:15 PM Uros Bizjak wrote: > > > > > gcc/ > > > > PR target/88808 > > > > * config/i386/i386.c (ix86_preferred_reload_class): Allow > > > > QImode data go into mask registers. > > > > * config/i386/i386.md: (*movhi_internal): Adjust

[GCC 10][patch, committed] Backported: [LTO/offloading] Fix offloading-compilation ICE without -flto (PR84320)

2020-08-21 Thread Tobias Burnus
Seemingly, the patch which caused this made it now to GCC 10; at least it fails now with offloading on the OG10 branch, after merging the trunk into that branch. Hence, I committed this to GCC 10 to avoid this ICE. It occurs here for libgomp.c/../libgomp.c-c++-common/reduction-16.c when

[PATCH][GCC][GCC-10 backport] arm: Require MVE memory operand for destination of vst1q intrinsic

2020-08-21 Thread Joe Ramsay
From: Joe Ramsay Hi, Previously, the machine description patterns for vst1q accepted a generic memory operand for the destination, which could lead to an unrecognised builtin when expanding vst1q* intrinsics. This change fixes the pattern to only accept MVE memory operands. Tested on

Re: [PATCH 4/4][PR target/88808]Enable bitwise operator for AVX512 masks.

2020-08-21 Thread Uros Bizjak via Gcc-patches
> > > gcc/ > > > PR target/88808 > > > * config/i386/i386.c (ix86_preferred_reload_class): Allow > > > QImode data go into mask registers. > > > * config/i386/i386.md: (*movhi_internal): Adjust constraints > > > for mask registers. > > >

[PATCH] hppa: Improve expansion of ashldi3 when !TARGET_64BIT

2020-08-21 Thread Roger Sayle
This patch improves the code generated on PA-RISC for DImode (double word) left shifts by small constants (1-31). This target has a very cool shd instruction that can be recognized by combine for simple shifts, but relying on combine is fragile for more complicated functions. This patch tweaks

Re: [PATCH] Fix libstdc++ testsuite to handle VxWorks gthreads implementation

2020-08-21 Thread Alexandre Oliva
On Dec 20, 2019, Jonathan Wakely wrote: > On 10/12/19 15:58 +0100, Corentin Gay wrote: >> This patch was tested on x86_64-linux and is part of our nightly testing >> on all platforms, including VxWorks. > Was it tested on AIX? > I think dg-require-gthreads will prevent the tests running for

Re: [PATCH] libgccjit: update some comments in libgccjit.c

2020-08-21 Thread David Malcolm via Gcc-patches
On Wed, 2020-08-19 at 09:24 +0200, Andrea Corallo wrote: > Hi all, > > just a small patch updating some comments that apparently went out of > sync a while ago adding gcc_jit_context_new_rvalue_from_long. > Okay for trunk? Yes Thanks for fixing these Dave

Re: [OG10] merge GCC 10 into branch; cherry-pick two OpenMP patches

2020-08-21 Thread Tobias Burnus
On 8/21/20 9:55 AM, Tobias Burnus wrote: * c0db5b424d33577e633895c9c430bc1626336fb5 Backport of 'Fortran: Fix OpenMP's 'if(simd:' etc. conditions' Missed that OG10 has changed the warning to an error; this could be also something for the trunk, matching C/C++ which does print an error ...

[committed] libstdc++: Skip PSTL tests when installed TBB is too old [PR 96718]

2020-08-21 Thread Jonathan Wakely via Gcc-patches
These tests do not actually require TBB, because they only inspect the feature test macros present in the headers. However, if TBB is installed then its headers will be included, and the version will be checked. If the version is too old, compilation fails due to a #error directive. This change

[Patch, fortran] PR fortran/95352 - ICE on select rank with assumed-size selector and lbound intrinsic

2020-08-21 Thread José Rui Faustino de Sousa via Gcc-patches
Hi all! Proposed patch to PR95352 - ICE on select rank with assumed-size selector and lbound intrinsic. Patch tested only on x86_64-pc-linux-gnu. Add check for NULL pointer before trying to access structure member, patch by Steve Kargl. Thank you very much. Best regards, José Rui

Re: [PATCH] cmpelim: recognize extra clobbers in insns

2020-08-21 Thread Richard Sandiford
Pip Cet writes: >> Pip Cet via Gcc-patches writes: >> > I'm working on the AVR cc0 -> CCmode conversion (bug#92729). One >> > problem is that the cmpelim pass is currently very strict in requiring >> > insns of the form >> > >> > (parallel [(set (reg:SI) (op:SI ... ...)) >> >(clobber

Re: [PATCH] Using gen_int_mode instead of GEN_INT to avoid ICE caused by type promotion.

2020-08-21 Thread Richard Sandiford
Hongtao Liu via Gcc-patches writes: > ping ^ 4, it's a very simple fix for ICE. OK, thanks. (Reviewing on the basis that I agree it's a simple rtx correctness fix.) Richard > > On Mon, Aug 10, 2020 at 6:00 PM Hongtao Liu wrote: >> >> Ping^3 >> >> On Tue, Aug 4, 2020 at 4:21 PM Hongtao Liu

Re: [PATCH] aarch64: Don't generate invalid zero/sign-extend syntax

2020-08-21 Thread Richard Sandiford
Alex Coplan writes: > Hi Richard, > >> -Original Message- >> From: Richard Sandiford >> Sent: 18 August 2020 09:35 >> To: Alex Coplan >> Cc: gcc-patches@gcc.gnu.org; Richard Earnshaw ; >> Marcus Shawcroft ; Kyrylo Tkachov >> >> Subject: Re: [PATCH] aarch64: Don't generate invalid

回复:[RISC-V] Add support for AddressSanitizer on RISC-V GCC

2020-08-21 Thread joshua via Gcc-patches
Hi Palmer, The 64-bit RISC-V Linux port has a minimum of 39-bit virtual addresses, so it should be 1<<36 for 64-bit targets. In the implementation of address sanitizer, we need a shadow memory that is 1/8th of the memory size, which is where the 36 comes from. I don't think the choice of this

RE: [PATCH] ipa-inline: Improve growth accumulation for recursive calls

2020-08-21 Thread Tamar Christina
Hi Martin, > Hi, > > On Thu, Aug 20 2020, Richard Sandiford wrote: > >> > >> > >> Really appreciate for your detailed explanation. BTW, My previous > >> patch for PGO build on exchange2 takes this similar method by setting > >> each cloned node to 1/10th of the frequency several month agao :) >

Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3

2020-08-21 Thread Richard Sandiford
xiezhiheng writes: >> -Original Message- >> From: Richard Sandiford [mailto:richard.sandif...@arm.com] >> Sent: Thursday, August 20, 2020 4:55 PM >> To: xiezhiheng >> Cc: Richard Biener ; gcc-patches@gcc.gnu.org >> Subject: Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions >>

[OG10] merge GCC 10 into branch; cherry-pick two OpenMP patches

2020-08-21 Thread Tobias Burnus
OG10 = devel/omp/gcc-10 – a GCC 10 branch with some additional OpenMP/OpenACC/offloading patches Commits: * 16052969a54db5df3d37fdcc81acba6ed1ec8c6a moved OG10 ChangeLog items to ChangeLog.omp * 612fee635bbb1198bc550c9c328330cae3259ed5 Merged origin/releases/gcc-10 into branch *

Re: [PATCH] vxworks: Fix GCC selftests for *-wrs-vxworks7-* targets

2020-08-21 Thread Olivier Hainque
Hello Iain, > On 20 Aug 2020, at 14:54, Iain Buclaw wrote: > >> We have a batch of vxworks changes queued that we will be submitting soon, >> and we might get to rationalize this with other places along the way. >> > > Running the build through one more time, and I've noticed that the make >

[PATCH] C-SKY: Add -mbacktrace option.

2020-08-21 Thread Jojo R
gcc/ChangeLog: * config/csky/csky.opt (TARGET_BACKTRACE): New. * doc/invoke.texi (C-SKY Options): Document -mbacktrace. --- gcc/config/csky/csky.opt | 4 gcc/doc/invoke.texi | 7 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git