Re: [PATCH v2] c, c++: Implement -Wsizeof-array-div [PR91741]

2020-09-15 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 14, 2020 at 09:30:44PM -0400, Marek Polacek via Gcc-patches wrote: > --- a/gcc/c/c-tree.h > +++ b/gcc/c/c-tree.h > @@ -147,6 +147,11 @@ struct c_expr > etc), so we stash a copy here. */ >source_range src_range; > > + /* True iff the sizeof expression was enclosed in parent

Re: [RS6000] rotate and mask constants

2020-09-15 Thread Alan Modra via Gcc-patches
On Tue, Sep 15, 2020 at 10:49:46AM +0930, Alan Modra wrote: > Implement more two insn constants. And tests. rot_cst1 checks the values generated, rot_cst2 checks instruction count. * gcc.target/powerpc/rot_cst.h, * gcc.target/powerpc/rot_cst1.c, * gcc.target/powerpc/rot_c

Re: Ping: [PATCH 2/2 V3] Simplify plusminus-mult-with-convert expr in forwprop (PR 94234)

2020-09-15 Thread Richard Biener via Gcc-patches
On Mon, Sep 14, 2020 at 5:19 AM Feng Xue OS via Gcc-patches wrote: > > Thanks, > Feng > > > From: Feng Xue OS > Sent: Thursday, September 3, 2020 5:29 PM > To: Richard Biener; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH 2/2 V3] Simplify plusminus-mult-wi

[committed] i386: Fix up vector mul and div with broadcasts in -masm=intel mode [PR97028]

2020-09-15 Thread Jakub Jelinek via Gcc-patches
Hi! These patterns printed bogus <>s around the {1to16} and similar strings. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. Will do backports momentarily. 2020-09-15 Jakub Jelinek PR target/97028 * config/i386/sse.md (*mul

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

2020-09-15 Thread Kewen.Lin via Gcc-patches
Hi Hans, on 2020/9/6 上午10:47, Hans-Peter Nilsson wrote: > On Tue, 1 Sep 2020, Bin.Cheng via Gcc-patches wrote: >>> Great idea! With explicitly specified -funroll-loops, it's bootstrapped >>> but the regression testing did show one failure (the only one): >>> >>> PASS->FAIL: gcc.dg/sms-4.c scan-

PING^2 [PATCH 1/4] unroll: Add middle-end unroll factor estimation

2020-09-15 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546698.html BR, Kewen on 2020/8/31 下午1:49, Kewen.Lin via Gcc-patches wrote: > Hi, > > I'd like to gentle ping this since IVOPTs part is already to land. > > https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546698.html

[PATCH] c++: Fix up default initialization with consteval default ctor [PR96994]

2020-09-15 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled (in particular the a and i initialization). The problem is that build_special_member_call due to the immediate constructors (but not evaluated in constant expression mode) doesn't create a CALL_EXPR, but returns a TARGET_EXPR with CONSTRUCTOR as the initi

[PATCH v3] C-SKY: Support -mfloat-abi=hard.

2020-09-15 Thread Jojo R
gcc/ChangeLog: * config/csky/csky.md (CSKY_NPARM_FREGS): New. (call_value_internal_vs/d): New. (untyped_call): New. * config/csky/csky.h (TARGET_SINGLE_FPU): New. (TARGET_DOUBLE_FPU): New. (FUNCTION_VARG_REGNO_P): New. (CSKY_VREG_MODE_P): New

Re: [PATCH] Return mask <-> integer cost for non-AVX512 micro-architecture.

2020-09-15 Thread Uros Bizjak via Gcc-patches
On Tue, Sep 15, 2020 at 4:59 AM Hongtao Liu wrote: > > Hi: > This patch would avoid spill gprs to mask registers for non-AVX512 > micro-architecture and fix regression in PR96744. > > Bootstrap is ok, regression test for i386/x86-64 backend is ok. > No big performance impact on SPEC2017. > >

[patch] Fix pessimization in EH cleanup pass

2020-09-15 Thread Eric Botcazou
Hi, the cleanup_all_empty_eh function was originally doing a post-order traversal of the EH region tree to optimize it: /* Do a post-order traversal of the EH region tree. Examine each post_landing_pad block and see if we can eliminate it as empty. */ That's sensible since the worker funct

[OG10] Merge GCC 10 into branch; two cherry picks

2020-09-15 Thread Tobias Burnus
OG10 = devel/omp/gcc-10 Committed backport plus two cherry picks: a93cc852103 [PATCH] OpenMP/Fortran: Fix (re)mapping of allocatable/pointer arrays [PR96668] e524656359b Merge remote-tracking branch 'origin/releases/gcc-10' into devel/omp/gcc-10 f73772df64c Daily bump. 0ea1b39e8e

Re: [patch] Fix pessimization in EH cleanup pass

2020-09-15 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 15, 2020 at 10:36:20AM +0200, Eric Botcazou wrote: > This was recently changed to use another order and this trivially breaks > testcases with nested regions like the attached one. So the attached patch > restores the post-order traversal and it also contains a small tweak to the >

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-15 Thread Richard Sandiford
Qing Zhao writes: >> On Sep 14, 2020, at 2:20 PM, Richard Sandiford >> wrote: >> >> Qing Zhao mailto:qing.z...@oracle.com>> writes: On Sep 14, 2020, at 11:33 AM, Richard Sandiford wrote: Qing Zhao writes: >> Like I mentioned earlier though, passes that run after

[PATCH v7] genemit.c (main): split insn-emit.c for compiling parallelly

2020-09-15 Thread Jojo R
gcc/ChangeLog: * genemit.c (main): Print 'split line'. * Makefile.in (insn-emit.c): Define split count and file --- gcc/Makefile.in | 19 + gcc/genemit.c | 104 +--- 2 files changed, 83 insertions(+), 40 deletions(-) diff --

Re: [PATCH v6] genemit.c (main): split insn-emit.c for compiling parallelly

2020-09-15 Thread Jojo R
Hi, Ok & Thanks, I will do my best for it :) It’s fixed in patch v7. Jojo 在 2020年9月11日 +0800 PM11:29,Segher Boessenkool ,写道: > Hi! > > On Fri, Sep 11, 2020 at 03:26:17PM +0800, Jojo R wrote: > > +#define printf_include() do { \ > > Don't use macros please, use a function? > > And

Re: Ping: [PATCH 2/2 V3] Simplify plusminus-mult-with-convert expr in forwprop (PR 94234)

2020-09-15 Thread Feng Xue OS via Gcc-patches
>> This patch is to handle simplification of plusminus-mult-with-convert >> expression >> as ((T) X) +- ((T) Y), in which at least one of (X, Y) is result of >> multiplication. >> This is done in forwprop pass. We try to transform it to (T) (X +- Y), and >> resort >> to gimple-matcher to fold (X

[PATCH 2/2 V4] Add plusminus-with-convert pattern (PR 94234)

2020-09-15 Thread Feng Xue OS via Gcc-patches
Add a rule (T)(A) +- (T)(B) -> (T)(A +- B), which works only when (A +- B) could be folded to a simple value. By this rule, a plusminus-mult-with-convert expression could be handed over to the rule (A * C) +- (B * C) -> (A +- B). Bootstrapped/regtested on x86_64-linux and aarch64-linux. Feng ---

Re: [PATCH 2/2 V4] Add plusminus-with-convert pattern (PR 94234)

2020-09-15 Thread Richard Biener via Gcc-patches
On Tue, Sep 15, 2020 at 12:14 PM Feng Xue OS wrote: > > Add a rule (T)(A) +- (T)(B) -> (T)(A +- B), which works only when (A +- B) > could be folded to a simple value. By this rule, a plusminus-mult-with-convert > expression could be handed over to the rule (A * C) +- (B * C) -> (A +- B). Please

Re: [patch] Fix pessimization in EH cleanup pass

2020-09-15 Thread Eric Botcazou
> So it breaks PR93199 again? Indeed, although there is no regression in the testsuite AFAICS. I guess that we can do the new walk before and not instead of the post-order traversal. Revised patch attached, same ChangeLog. -- Eric Botcazoudiff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 4246d

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-15 Thread Richard Sandiford
Segher Boessenkool writes: > On Mon, Sep 14, 2020 at 05:33:33PM +0100, Richard Sandiford wrote: >> > However, for the cases on Power as Segher mentioned, there are also some >> > scratch registers used for >> > Other purpose, not sure whether we can correctly generate zeroing in >> > middle-end

Re: [patch] Fix pessimization in EH cleanup pass

2020-09-15 Thread Richard Biener via Gcc-patches
On Tue, Sep 15, 2020 at 1:29 PM Eric Botcazou wrote: > > > So it breaks PR93199 again? > > Indeed, although there is no regression in the testsuite AFAICS. Yeah, too big of a testcase ... > I guess that > we can do the new walk before and not instead of the post-order traversal. > > Revised pat

Re: [PATCH 2/2 V4] Add plusminus-with-convert pattern (PR 94234)

2020-09-15 Thread Feng Xue OS via Gcc-patches
>> Add a rule (T)(A) +- (T)(B) -> (T)(A +- B), which works only when (A +- B) >> could be folded to a simple value. By this rule, a >> plusminus-mult-with-convert >> expression could be handed over to the rule (A * C) +- (B * C) -> (A +- B). > >Please use INTEGRAL_TYPE_P () instead of TREE_CODE ==

[PATCH PR93334][RFC]Skip output dep if values stored are byte wise the same

2020-09-15 Thread bin.cheng via Gcc-patches
Hi, As suggested by PR93334 comments, this patch adds an interface identifying output dependence which can be skipped in terms of reordering and skip it in loop distribution. It also adds a new test case. Any comment? Thanks, bin 0001-Skip-output-dependence-if-values-stored-are-bytewise.patch D

Re: [PATCH 2/2 V4] Add plusminus-with-convert pattern (PR 94234)

2020-09-15 Thread Richard Biener via Gcc-patches
On Tue, Sep 15, 2020 at 2:25 PM Feng Xue OS wrote: > > >> Add a rule (T)(A) +- (T)(B) -> (T)(A +- B), which works only when (A +- B) > >> could be folded to a simple value. By this rule, a > >> plusminus-mult-with-convert > >> expression could be handed over to the rule (A * C) +- (B * C) -> (A +

[PATCH] Allow more BB vectorization

2020-09-15 Thread Richard Biener
The following allows more BB vectorization by generally building leafs from scalars rather than giving up. Note this is only a first step towards this and as can be seen with the exception for node splitting it is generally hard to get this heuristic sound. I've added variants of the bb-slp-48.c

RE: [aarch64] Backport missing NEON intrinsics to GCC8

2020-09-15 Thread Kyrylo Tkachov
Hi Sebastian, This patch implements missing intrinsics. I'm okay with this being applied to the GCC 8 branch as these intrinsics have been defined in ACLE for a long time. It is arguably a bug that they've been missing from GCC8. Their implementation is fairly self-contained we haven't had any bu

[PATCH] LRA: Make fixed eliminable registers live

2020-09-15 Thread H.J. Lu via Gcc-patches
commit 1bcb4c4faa4bd6b1c917c75b100d618faf9e628c Author: Richard Sandiford Date: Wed Oct 2 07:37:10 2019 + [LRA] Don't make eliminable registers live (PR91957) didn't make eliminable registers live which breaks register void *cur_pro asm("reg"); where "reg" is an eliminable register.

Re: [PATCH] bb-reorder: Fix for ICEs caused by 69ca5f3a9882

2020-09-15 Thread Segher Boessenkool
On Tue, Sep 15, 2020 at 08:32:54AM +0200, Richard Biener wrote: > On Tue, Sep 15, 2020 at 12:06 AM Segher Boessenkool > wrote: > > > > After the previous patch we are left with an unreachable BB. This will > > ICE if either we have -fschedule-fusion, or we do not have peephole2. > > > > This fixe

Re: [PATCH] rs6000: inefficient 64-bit constant generation for consecutive 1-bits

2020-09-15 Thread Segher Boessenkool
Hi! On Thu, Sep 10, 2020 at 04:58:03PM -0500, Peter Bergner wrote: > Generating arbitrary 64-bit constants on POWER can take up to 5 instructions. > However, some special constants can be generated in fewer instructions. > One special class of constants we don't handle, is constants that have one

Re: [PATCH] rs6000: inefficient 64-bit constant generation for consecutive 1-bits

2020-09-15 Thread Segher Boessenkool
Hi! On Tue, Sep 15, 2020 at 02:23:16PM +0930, Alan Modra wrote: > On Thu, Sep 10, 2020 at 04:58:03PM -0500, Peter Bergner via Gcc-patches wrote: > > +unsigned long > > +test0 (void) > > +{ > > + return 0x0000UL; > > +} > > + > > +unsigned long > > +test1 (void) > > +{ > > + return

[PATCH] make swap argument of vect_get_and_check_slp_defs readonly

2020-09-15 Thread Richard Biener
Since some time we're only using this argument to communicate from vect_build_slp_tree_1 to vect_get_and_check_slp_defs. This makes the direction of information flow clear. Bootstrap / regtest running on x86_64-unknown-linux-gnu. 2020-09-15 Richard Biener * tree-vect-slp.c (vect_get_

Re: [PATCH 1/2] AArch64: Cleanup CPU option processing code

2020-09-15 Thread Richard Earnshaw (lists)
On 14/09/2020 20:04, Wilco Dijkstra wrote: > Hi Richard, > >> On 14/09/2020 15:19, Wilco Dijkstra wrote: >>> The --with-cpu/--with-arch configure option processing not only checks >>> valid arguments >>> but also sets TARGET_CPU_DEFAULT with a CPU and extension bitmask.  This >>> isn't used >>>

[PATCH] Compile gcc.target/i386/pr78904-4a.c with -mtune=generic

2020-09-15 Thread H.J. Lu via Gcc-patches
commit e95395926a84a2406faefe0995295d199d595440 Author: Uros Bizjak Date: Thu Jun 18 20:12:48 2020 +0200 i386: Fix mode of ZERO_EXTRACT RTXes, remove ext_register_operand predicate. caused FAIL: gcc.target/i386/pr78904-4a.c scan-assembler [ \t]movb[\t ]+%.h, t when compiled with --target

Re: [PATCH] LRA: Make fixed eliminable registers live

2020-09-15 Thread Richard Sandiford
Thanks for looking at this. "H.J. Lu" writes: > commit 1bcb4c4faa4bd6b1c917c75b100d618faf9e628c > Author: Richard Sandiford > Date: Wed Oct 2 07:37:10 2019 + > > [LRA] Don't make eliminable registers live (PR91957) > > didn't make eliminable registers live which breaks > > register voi

Re: [PATCH] LRA: Make fixed eliminable registers live

2020-09-15 Thread H.J. Lu via Gcc-patches
On Tue, Sep 15, 2020 at 7:44 AM Richard Sandiford wrote: > > Thanks for looking at this. > > "H.J. Lu" writes: > > commit 1bcb4c4faa4bd6b1c917c75b100d618faf9e628c > > Author: Richard Sandiford > > Date: Wed Oct 2 07:37:10 2019 + > > > > [LRA] Don't make eliminable registers live (PR919

Re: c++: local externs in templates do not get template head

2020-09-15 Thread Nathan Sidwell
On 9/14/20 6:47 PM, Tobias Burnus wrote: This patch cause run-time fails for   g++ -fopenmp libgomp/testsuite/libgomp.c++/udr-13.C The follow-up fix does not help. Namely, in udr-3.C:115: 115 if (t.s != 11 || v.v != 9 || q != 0 || d != 3.0) abort (); (gdb) p t.s oops, I forgot t

[PATCH] S/390: Do not turn maybe-uninitialized warnings into errors

2020-09-15 Thread Stefan Schulze Frielinghaus via Gcc-patches
Over the last couple of months quite a few warnings about uninitialized variables were raised while building GCC. A reason why these warnings show up on S/390 only is due to the aggressive inlining settings here. Some of these warnings (2c832ffedf0, b776bdca932, 2786c0221b6, 1657178f59b) could be

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-15 Thread Qing Zhao via Gcc-patches
> On Sep 15, 2020, at 4:11 AM, Richard Sandiford > wrote: > > Qing Zhao mailto:qing.z...@oracle.com>> writes: >>> On Sep 14, 2020, at 2:20 PM, Richard Sandiford >>> wrote: >>> >>> Qing Zhao mailto:qing.z...@oracle.com>> writes: > On Sep 14, 2020, at 11:33 AM, Richard Sandiford >

Re: [PATCH] arm: Fix up gcc.target/arm/lto/pr96939_* FAIL

2020-09-15 Thread Vaseeharan Vinayagamoorthy
I am seeing this unused parameter 'opts' error when building for this configuration: Build: arm-none-linux-gnueabihf Host: arm-none-linux-gnueabihf Target: arm-none-linux-gnueabihf In function 'void arm_option_restore(gcc_options*, gcc_options*, cl_target_option*)': /src/gcc/gcc/config/arm/arm.c

Re: PSA: Default C++ dialect is now C++17

2020-09-15 Thread Jeff Law via Gcc-patches
On 9/14/20 7:17 PM, Marek Polacek via Gcc-patches wrote: > On Mon, Sep 14, 2020 at 11:13:18AM -0400, Jason Merrill via Gcc-patches wrote: >> On Mon, Jun 29, 2020 at 1:25 PM Martin Liška wrote: >>> On 6/29/20 4:57 PM, Marek Polacek wrote: On Mon, Jun 29, 2020 at 09:51:57AM +0200, Martin Liška

Re: [PATCH] rs6000: inefficient 64-bit constant generation for consecutive 1-bits

2020-09-15 Thread Peter Bergner via Gcc-patches
> rs6000_is_valid_shift_mask handles this already (but it requires you to > pass in the shift needed). rs6000_is_valid_mask will handle it. > rs6000_is_valid_and_mask does not get a shift count parameter, so cannot > use rldic currently. After talking with you off line, I changed to using rs6000_

Re: [PATCH v2] rs6000: Remove useless insns fed into lvx/stvx [PR97019]

2020-09-15 Thread Segher Boessenkool
Hi Ke Wen, On Tue, Sep 15, 2020 at 02:40:38PM +0800, Kewen.Lin wrote: > >>* config/rs6000/rs6000-p8swap.c (insn_rtx_pair_t): New type. > > > > Please don't do that. The "first" and "second" are completely > > meaningless. Also, keeping it separate arrays can very well result in > > better

[PATCH] Allow copying of symbolic ranges to an irange.

2020-09-15 Thread Aldy Hernandez via Gcc-patches
This fixes an ICE when trying to copy a legacy value_range containing a symbolic to a multi-range: min = make_ssa_name (type); max = build_int_cst (type, 55); value_range vv (min, max); int_range<2> vr = vv; This doesn't affect anything currently, as we don't hav

Re: [PATCH v2] rs6000: Expand vec_insert in expander instead of gimple [PR79251]

2020-09-15 Thread Segher Boessenkool
On Tue, Sep 15, 2020 at 08:51:09AM +0200, Richard Biener wrote: > On Tue, Sep 15, 2020 at 5:56 AM luoxhu wrote: > > > u[n % 4] = i; > > > > > > I guess. Is the % 4 mandated by the vec_insert semantics btw? (As an aside -- please use "& 3" instead: that works fine if n is signed as well, but

Re: [Patch] OpenMP/Fortran: Fix (re)mapping of allocatable/pointer arrays [PR96668]

2020-09-15 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 15, 2020 at 12:48:59AM +0200, Tobias Burnus wrote: > + bool has_nullptr; > + size_t j; > + for (j = 0; j < n->tgt->list_count; j++) > + if (n->tgt->list[j].key == n) > + { > + has_nullptr = n->tgt->list[j].has_null_

[PATCH] document -Wuninitialized for allocated objects

2020-09-15 Thread Martin Sebor via Gcc-patches
The attached patch updates the manual to mention that Wuninitialized and -Wmaybe-uninitialized are issued for both auto and allocated objects, as well as for passing pointers to uninitialized objects to const-qualified parameters. Both of these features are GCC 11 enhancements. Martin Document -

[r11-3204 Regression] FAIL: g++.dg/vect/slp-pr87105.cc -std=c++2a scan-tree-dump-times slp2 "basic block part vectorized" 1 on Linux/x86_64 (-m64 -march=cascadelake)

2020-09-15 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, c9de716a59c873859df3b3e1fbb993200fce5a73 is the first bad commit commit c9de716a59c873859df3b3e1fbb993200fce5a73 Author: Richard Biener Date: Tue Sep 15 14:35:40 2020 +0200 Allow more BB vectorization caused FAIL: g++.dg/vect/slp-pr87105.cc -std=c++14 scan-tree-dump sl

Re: [RS6000] rs6000_rtx_costs for AND

2020-09-15 Thread will schmidt via Gcc-patches
On Tue, 2020-09-15 at 10:49 +0930, Alan Modra via Gcc-patches wrote: > The existing "case AND" in this function is not sufficient for > optabs.c:avoid_expensive_constant usage, where the AND is passed in > outer_code. > > * config/rs6000/rs6000.c (rs6000_rtx_costs): Move costing for >

Re: [RS6000] rtx_costs

2020-09-15 Thread will schmidt via Gcc-patches
On Tue, 2020-09-15 at 10:49 +0930, Alan Modra via Gcc-patches wrote: > This patch series fixes a number of issues in rs6000_rtx_costs, the > aim being to provide costing somewhat closer to reality. Probably > the > most important patch of the series is patch 4, which just adds a > comment. Withou

Re: [PATCH 2/4, revised patch applied] PowerPC: Rename functions for min, max, cmove

2020-09-15 Thread Alexandre Oliva
Hello, Mike, On Sep 11, 2020, Michael Meissner via Gcc-patches wrote: > +case SFmode: > +case DFmode: gcc110 (ppc64) in the build farm didn't like this. The bootstrap compiler barfs on these expressions, because of some constexpr issue I haven't really looked into. I'm testing this p

[PATCH] debug: Pass --gdwarf-N to assembler if fixed gas is detected during configure

2020-09-15 Thread Jakub Jelinek via Gcc-patches
On Thu, Sep 10, 2020 at 01:45:50PM +0200, Jakub Jelinek wrote: > On Thu, Sep 10, 2020 at 01:16:57PM +0200, Jakub Jelinek via Gcc-patches wrote: > > As for the test assembly, I'd say we should take > > #define F void foo (void) {} > > F > > compile it with > > gcc -S -O2 -g1 -dA -gno-as-loc-support

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-15 Thread Segher Boessenkool
On Mon, Sep 14, 2020 at 10:07:31PM -0500, Qing Zhao wrote: > > On Sep 14, 2020, at 6:09 PM, Segher Boessenkool > > wrote: > >> Gadget 1: > >> > >> mov rax, value > >> syscall > >> ret > > > > No, just > > > > mov rax,59 > > syscall > > > > (no ret necessary!) > > But for ROP, a typical gad

[PATCH] work harder to avoid -Wuninitialized for empty structs (PR 96295)

2020-09-15 Thread Martin Sebor via Gcc-patches
The -Wuninitialized/-Wmaybe-uninitialized enhancement to warn when a pointer or reference to an uninitialized object is passed to a const-qualified function argument tries to avoid triggering for objects of empty types. However, the suppression is incomplete and lets the warning trigger in some c

[r11-3207 Regression] FAIL: gcc.dg/tree-ssa/20030807-10.c scan-tree-dump-times vrp1 " & 3" 1 on Linux/x86_64 (-m64 -march=cascadelake)

2020-09-15 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 8f0d743c2dee6afae5c6f861b0642b7b112a4a70 is the first bad commit commit 8f0d743c2dee6afae5c6f861b0642b7b112a4a70 Author: Feng Xue Date: Mon Aug 17 23:00:35 2020 +0800 tree-optimization/94234 - add plusminus-with-convert pattern caused FAIL: gcc.dg/tree-ssa/20030807-10.c

[r11-3207 Regression] FAIL: gcc.dg/ifcvt-3.c scan-rtl-dump ce1 "3 true changes made" on Linux/x86_64 (-m64 -march=cascadelake)

2020-09-15 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 8f0d743c2dee6afae5c6f861b0642b7b112a4a70 is the first bad commit commit 8f0d743c2dee6afae5c6f861b0642b7b112a4a70 Author: Feng Xue Date: Mon Aug 17 23:00:35 2020 +0800 tree-optimization/94234 - add plusminus-with-convert pattern caused FAIL: gcc.dg/ifcvt-3.c scan-rtl-dump

Aw: Re: [PATCH] PR/fortran 96983 - ICE compiling gfortran.dg/pr96711.f90

2020-09-15 Thread Harald Anlauf
Dear Tobias, I can see that you want a proper fix. However, after having looked at all these comments about the powerpc situation, I do not really think I'd want to ever touch that stuff. It's clearly beyond my capabilities and ressources. I do feel responsible for the regression introduced by m

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-15 Thread Segher Boessenkool
On Tue, Sep 15, 2020 at 12:46:00PM +0100, Richard Sandiford wrote: > Segher Boessenkool writes: > > On Mon, Sep 14, 2020 at 05:33:33PM +0100, Richard Sandiford wrote: > >> > However, for the cases on Power as Segher mentioned, there are also some > >> > scratch registers used for > >> > Other pur

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-15 Thread Segher Boessenkool
On Tue, Sep 15, 2020 at 10:11:41AM +0100, Richard Sandiford wrote: > Qing Zhao writes: > >> On Sep 14, 2020, at 2:20 PM, Richard Sandiford > >> wrote: (Putting correct info in DF, inserting the new insns in pro_and_epi). But, scheduling runs *after* that, and then you need to prevent the insert

[PATCH] warn for integer overflow in allocation calls (PR 96838)

2020-09-15 Thread Martin Sebor via Gcc-patches
Overflowing the size of a dynamic allocation (e.g., malloc or VLA) can lead to a subsequent buffer overflow corrupting the heap or stack. The attached patch diagnoses a subset of these cases where the overflow/wraparound is still detectable. Besides regtesting GCC on x86_64-linux I also verified

Re: [Patch] OpenMP/Fortran: Fix (re)mapping of allocatable/pointer arrays [PR96668]

2020-09-15 Thread Tobias Burnus
On 9/15/20 7:03 PM, Jakub Jelinek wrote: On Tue, Sep 15, 2020 at 12:48:59AM +0200, Tobias Burnus wrote: + bool has_nullptr; + size_t j; + for (j = 0; j < n->tgt->list_count; j++) +if (n->tgt->list[j].key == n) + { +has_nullptr

Re: [PATCH 2/4, revised patch applied] PowerPC: Rename functions for min, max, cmove

2020-09-15 Thread Peter Bergner via Gcc-patches
On 9/15/20 1:38 PM, Alexandre Oliva wrote: >> +case SFmode: >> +case DFmode: > > gcc110 (ppc64) in the build farm didn't like this. The bootstrap > compiler barfs on these expressions, because of some constexpr issue I > haven't really looked into. > > I'm testing this patch. I'll check

Re: [PATCH] rs6000: inefficient 64-bit constant generation for consecutive 1-bits

2020-09-15 Thread Segher Boessenkool
On Tue, Sep 15, 2020 at 10:48:37AM -0500, Peter Bergner wrote: > > rs6000_is_valid_shift_mask handles this already (but it requires you to > > pass in the shift needed). rs6000_is_valid_mask will handle it. > > rs6000_is_valid_and_mask does not get a shift count parameter, so cannot > > use rldic

Re: [PATCH] Allow copying of symbolic ranges to an irange.

2020-09-15 Thread Andrew MacLeod via Gcc-patches
On 9/15/20 11:57 AM, Aldy Hernandez wrote: This fixes an ICE when trying to copy a legacy value_range containing a symbolic to a multi-range: min = make_ssa_name (type); max = build_int_cst (type, 55); value_range vv (min, max); int_range<2> vr = vv; This doesn't affect anythin

Re: [PATCH 2/4, revised patch applied] PowerPC: Rename functions for min, max, cmove

2020-09-15 Thread Segher Boessenkool
On Tue, Sep 15, 2020 at 03:38:05PM -0300, Alexandre Oliva wrote: > On Sep 11, 2020, Michael Meissner via Gcc-patches > wrote: > > > +case SFmode: > > +case DFmode: > > gcc110 (ppc64) in the build farm didn't like this. The bootstrap > compiler barfs on these expressions, because of som

Re: [PATCH v3] c, c++: Implement -Wsizeof-array-div [PR91741]

2020-09-15 Thread Marek Polacek via Gcc-patches
On Tue, Sep 15, 2020 at 09:04:41AM +0200, Jakub Jelinek via Gcc-patches wrote: > On Mon, Sep 14, 2020 at 09:30:44PM -0400, Marek Polacek via Gcc-patches wrote: > > --- a/gcc/c/c-tree.h > > +++ b/gcc/c/c-tree.h > > @@ -147,6 +147,11 @@ struct c_expr > > etc), so we stash a copy here. */ > >

[PATCH] PR fortran/97036 - [F2018] Allow ELEMENTAL RECURSIVE procedure prefix

2020-09-15 Thread Harald Anlauf
As stated in the PR, the Fortran 2018 standard removed the restriction prohibiting ELEMENTAL RECURSIVE procedures. Adjust the relevant check. Regtested on x86_64-pc-linux-gnu. OK for master? Thanks, Harald PR fortran/97036 - [F2018] Allow ELEMENTAL RECURSIVE procedure prefix gcc/fortran/Chan

Re: [PATCH 4/4] PowerPC: Add power10 xscmp{eq,gt,ge}qp support

2020-09-15 Thread Segher Boessenkool
On Wed, Aug 26, 2020 at 10:46:37PM -0400, Michael Meissner wrote: > diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md > index 2709e46f7e5..60b45601e9b 100644 > --- a/gcc/config/rs6000/predicates.md > +++ b/gcc/config/rs6000/predicates.md > @@ -1225,6 +1225,11 @@ (define

[committed] analyzer: fix ICE when merging constraints w/o transitivity [PR96650]

2020-09-15 Thread David Malcolm via Gcc-patches
PR analyzer/96650 reports an assertion failure when merging the intersection of two sets of constraints, due to the resulting constraints being infeasible. It turns out that the two input sets were each infeasible if transitivity were considered, but -fanalyzer-transitivity was off. However for th

Re: [RS6000] Count rldimi constant insns

2020-09-15 Thread Segher Boessenkool
On Tue, Sep 15, 2020 at 10:49:39AM +0930, Alan Modra wrote: > rldimi is generated by rs6000_emit_set_long_const when the high and > low 32 bits of a 64-bit constant are equal. > > * config/rs6000/rs6000.c (num_insns_constant_gpr): Count rldimi > constants correctly. Wow, did I miss th

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-15 Thread Qing Zhao via Gcc-patches
> On Sep 15, 2020, at 2:41 PM, Segher Boessenkool > wrote: > > On Tue, Sep 15, 2020 at 10:11:41AM +0100, Richard Sandiford wrote: >> Qing Zhao writes: On Sep 14, 2020, at 2:20 PM, Richard Sandiford wrote: > (Putting correct info in DF, inserting the new insns in pro_and_epi). >

Re: [RS6000] rs6000_rtx_costs for PLUS/MINUS constant

2020-09-15 Thread Segher Boessenkool
On Tue, Sep 15, 2020 at 10:49:40AM +0930, Alan Modra wrote: > These functions do behave a little differently for SImode, so the > mode should be passed. > > * config/rs6000/rs6000.c (rs6000_rtx_costs): Pass mode to > reg_or_add_cint_operand and reg_or_sub_cint_operand. Okay for trunk.

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

2020-09-15 Thread Joseph Myers
On Wed, 9 Sep 2020, Martin Sebor via Gcc-patches wrote: > Joseph, do you have any concerns with or comments on the most > recent patch or is it okay as is? > > https://gcc.gnu.org/pipermail/gcc-patches/2020-August/552266.html I'm not yet convinced by the logic for extracting an array bound from

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-15 Thread Segher Boessenkool
On Tue, Sep 15, 2020 at 05:31:48PM -0500, Qing Zhao wrote: > > But, scheduling runs *after* that, and then you need to prevent the > > inserted (zeroing) insns from moving -- if you don't, the code after > > some zeroing can be used as gadget! You want to always have all > > zeroing insns after *a

Re: [PING][PATCH] improve validation of attribute arguments (PR c/78666)

2020-09-15 Thread Joseph Myers
On Wed, 9 Sep 2020, Martin Sebor via Gcc-patches wrote: > Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-August/552500.html > > Aldy provided a bunch of comments on this patch but I'm still looking > for a formal approval. This patch is OK. > > Some testing revealed that the code has diff

[r11-3207 Regression] FAIL: gcc.dg/tree-ssa/20030807-10.c scan-tree-dump-times vrp1 " & 3" 1 on Linux/x86_64 (-m64)

2020-09-15 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 8f0d743c2dee6afae5c6f861b0642b7b112a4a70 is the first bad commit commit 8f0d743c2dee6afae5c6f861b0642b7b112a4a70 Author: Feng Xue Date: Mon Aug 17 23:00:35 2020 +0800 tree-optimization/94234 - add plusminus-with-convert pattern caused FAIL: gcc.dg/tree-ssa/20030807-10.c

[r11-3207 Regression] FAIL: gcc.dg/ifcvt-3.c scan-rtl-dump ce1 "3 true changes made" on Linux/x86_64 (-m64)

2020-09-15 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 8f0d743c2dee6afae5c6f861b0642b7b112a4a70 is the first bad commit commit 8f0d743c2dee6afae5c6f861b0642b7b112a4a70 Author: Feng Xue Date: Mon Aug 17 23:00:35 2020 +0800 tree-optimization/94234 - add plusminus-with-convert pattern caused FAIL: gcc.dg/ifcvt-3.c scan-rtl-dump

libgo: add additional references in sysinfo.c

2020-09-15 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Than McIntosh adds a few more explicit references to enumeration constants (RUSAGE_SELF, DT_UNKNOWN) in sysinfo.c to insure that their hosting enums are emitted into DWARF, when using a clang host compiler during the gollvm build. Bootstrapped and ran Go testsuite on x86_64-pc-

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-09-15 Thread Qing Zhao via Gcc-patches
> On Sep 15, 2020, at 6:09 PM, Segher Boessenkool > wrote: > > On Tue, Sep 15, 2020 at 05:31:48PM -0500, Qing Zhao wrote: >>> But, scheduling runs *after* that, and then you need to prevent the >>> inserted (zeroing) insns from moving -- if you don't, the code after >>> some zeroing can be us

[PATCH] rs6000: Fix misnamed built-in

2020-09-15 Thread Bill Schmidt via Gcc-patches
The description in rs6000-builtin.def provides for a builtin named __builtin_altivec_xst_len_r. However, it is hand-defined in altivec_init_builtins as __builtin_xst_len_r, against the usual naming practice. Fix that. Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions;

Re: [PATCH v3] C-SKY: Support -mfloat-abi=hard.

2020-09-15 Thread Xianmiao Qu
It looks good to me, pushed it to trunck. Thanks, Cooper On 9/15/20 4:08 PM, Jojo R wrote: gcc/ChangeLog: * config/csky/csky.md (CSKY_NPARM_FREGS): New. (call_value_internal_vs/d): New. (untyped_call): New. * config/csky/csky.h (TARGET_SINGLE_FPU): New.

[PATCH] Increase rtx_cost of sse_to_integer in skylake_cost.

2020-09-15 Thread Hongtao Liu via Gcc-patches
Hi: Rtx cost of sse_to_integer would be used by pass_stv as a measurement for the scalar-to-vector transformation. As https://gcc.gnu.org/pipermail/gcc-patches/2019-August/528839.html indicates, movement between sse regs and gprs should be much expensive than movement inside gprs(which is 2 as de

Re: [PATCH] Check calls before loop unrolling

2020-09-15 Thread Jiufu Guo via Gcc-patches
Hi all, This patch sets the default value to 16 for parameter max_unrolled_average_calls which could be used to restict calls in loop when unrolling. This default value(16) is a big number which keeps current behavior for almost all cases. Bootstrap and regtest pass on powerpc64le. Is this ok f

[PATCH] C-SKY: Fix wrong ld name with option -mfloat-abi=hard.

2020-09-15 Thread Jojo R
gcc/ChangeLog: * config/csky/csky-linux-elf.h (GLIBC_DYNAMIC_LINKER): Use mfloat-abi. --- gcc/config/csky/csky-linux-elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/csky/csky-linux-elf.h b/gcc/config/csky/csky-linux-elf.h index 9a57dd04..cf587ae 10064

Re: [aarch64] Backport missing NEON intrinsics to GCC8

2020-09-15 Thread Pop, Sebastian via Gcc-patches
Thanks Kyrill for your review. I committed the patches to the gcc-8 branch: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=2c55e6caa9432b2c1f081cb3aeddd36abec03233 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a4004f62d60ada3a20dbf30146ca461047a575cc and to the gcc-9 branch: https://gcc.gnu.or

Re: [PATCH v2] rs6000: Remove useless insns fed into lvx/stvx [PR97019]

2020-09-15 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for your suggestions! >> + for (unsigned i = 0; i < and_insns.length (); ++i) > > "i++" is used more often, is more traditional. > Updated. >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/powerpc/pr97019.c >> @@ -0,0 +1,82 @@ >> +/* This issue can only exist on littl

Re: [PATCH v2] rs6000: Expand vec_insert in expander instead of gimple [PR79251]

2020-09-15 Thread luoxhu via Gcc-patches
On 2020/9/15 14:51, Richard Biener wrote: >> I only see VAR_DECL and PARM_DECL, is there any function to check the tree >> variable is global? I added DECL_REGISTER, but the RTL still expands to >> stack: > > is_global_var () or alternatively !auto_var_in_fn_p (), I think doing > IFN_SET onl

[PATCH] -mno-xsave should imply -mno-avx since -mavx implies -mxsave

2020-09-15 Thread Hongtao Liu via Gcc-patches
Hi: If -mavx implies -mxsave, then -mno-xsave should imply -mno-avx. Current status is -mno-avx implies -mno-xsave which should be wrong. Bootstrap is ok, Regression test is ok for i386/x86 backend. Ok for trunk? gcc/ChangeLog * common/config/i386/i386-common.c (OPTION_MASK_ISA_A

[PATCH] store-merging: Consider also overlapping stores earlier in the by bitpos sorting [PR97053]

2020-09-15 Thread Jakub Jelinek via Gcc-patches
Hi! As the testcases show, if we have something like: MEM [&b + 8B] = {}; MEM[(short *) &b] = 5; _5 = *x_4(D); MEM [&b + 2B] = _5; MEM[(char *)&b + 16B] = 88; MEM[(int *)&b + 20B] = 1; then in sort_by_bitpos the stores are almost like in the given order, except the first store is aft

Re: [PATCH] store-merging: Consider also overlapping stores earlier in the by bitpos sorting [PR97053]

2020-09-15 Thread Richard Biener
On Wed, 16 Sep 2020, Jakub Jelinek wrote: > Hi! > > As the testcases show, if we have something like: > MEM [&b + 8B] = {}; > MEM[(short *) &b] = 5; > _5 = *x_4(D); > MEM [&b + 2B] = _5; > MEM[(char *)&b + 16B] = 88; > MEM[(int *)&b + 20B] = 1; > then in sort_by_bitpos the stores ar