Re: [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-29 Thread Xionghu Luo via Gcc-patches
On 2021/12/29 20:55, Jan Hubicka wrote: >>> >>> From: Xiong Hu Luo >>> >>> gcc/ChangeLog: >>> >>> * loop-invariant.c (find_invariants_bb): Check profile count >>> before motion. >>> (find_invariants_body): Add argument. >>> >>> gcc/testsuite/ChangeLog: >>> >>> *

Re: [PATCH] fixed testcase fail in pr102892-2.c fixed tesccase fail in gcc.dg/pr102892-1.c

2021-12-29 Thread Andrew Pinski via Gcc-patches
On Wed, Dec 29, 2021 at 9:39 PM wrote: > > From: LiaoShihua > > * gcc.dg/pr102892-2.c: Add definition of function foo() which > declared in pr102892-1.c This patch is wrong. The testcase is testing to make sure foo was optimized out. If it is failing for you can you file a bug with the

[PATCH] fixed testcase fail in pr102892-2.c fixed tesccase fail in gcc.dg/pr102892-1.c

2021-12-29 Thread shihua
From: LiaoShihua * gcc.dg/pr102892-2.c: Add definition of function foo() which declared in pr102892-1.c --- gcc/testsuite/gcc.dg/pr102892-2.c | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/testsuite/gcc.dg/pr102892-2.c b/gcc/testsuite/gcc.dg/pr102892-2.c index

[PATCH] Testsuite: Add btf-dataset option for RISC-V.

2021-12-29 Thread jiawei
Add -msmall-data-limit option to put global and static data into right section and generate 'btt_info' on RISC-V target. BTF (BPF Type Format) is the metadata format which encodes the debug info related to BPF program/map, more details on:

[PATCH] fixed testcase fail gcc.dg/analyzer/pr103526.c leak

2021-12-29 Thread shihua
From: LiaoShihua following 'false' branch in line 20, 'tmp.word_state' leaks in line 26. So free 'tmp.word_state' before return 'rval'. gcc/testsuite\ChangeLog: * gcc.dg/analyzer/pr103526.c: --- gcc/testsuite/gcc.dg/analyzer/pr103526.c | 3 ++- 1 file changed, 2 insertions(+),

Re: SV: [commited] jit: Support for global rvalue initialization and constructors

2021-12-29 Thread Antoni Boucher via Gcc-patches
Oh, sorry, I meant when you have an array not in a local variable, and you try to assign to an index of this array. Something like: gcc_jit_rvalue *ctor = gcc_jit_context_new_array_constructor (ctxt,0,int50arr_type,6,values); gcc_jit_block_add_assignment (block, 0,

SV: [commited] jit: Support for global rvalue initialization and constructors

2021-12-29 Thread Petter Tomner via Gcc-patches
Could you be more specific? I tried the equivalent of: /*int [50] foobar = {1,2,3,4}; int [50] foo() { int arr[50]; arr = (int [50]){-1,-2,-3,-4,-5,-6}; arr = foobar; arr = (int [50]){1,2,3,4,5,6};

Go patch committed: Don't pad epollevent on sparc64 GNU/Linux

2021-12-29 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend, libgo, and the -fgo-dump-spec code avoids padding incorrectly when a zero-sized field is inserted solely for alignment. We avoid this by not padding after a "_" field, and by using "_" fields for padding. This is fine since the padding is only there in case someone

Re: [commited] jit: Support for global rvalue initialization and constructors

2021-12-29 Thread Antoni Boucher via Gcc-patches
I realized that trying to do an assignment to an array created by the new array constructor API will result in a "gimplification failed" error: libgccjit.so: error: gimplification failed 0x7fa3a441e5d3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)

[pushed] Fortran: keep

2021-12-29 Thread FX via Gcc-patches
Hi, Fortran 2018 added some synonyms to the existing IEEE_CLASS_TYPE values, namely IEEE_NEGATIVE_SUBNORMAL (which is the same as IEEE_NEGATIVE_DENORMAL) and IEEE_POSITIVE_SUBNORMAL (same as IEEE_POSITIVE_DENORMAL). When they were added to the C side, they were not kept in sync with the Fortran

Re: [PATCH] tree-ssa-dce: Fix up -fcompare-debug failures in make_forwarders_with_degenerate_phis [PR103742]

2021-12-29 Thread Richard Biener via Gcc-patches
On December 29, 2021 11:11:18 AM GMT+01:00, Jakub Jelinek wrote: >Hi! > >make_forwarders_with_degenerate_phis causes a -fcompare-debug failure on the >following testcase. >The problem is that on: > # iftmp.4_8 = PHI <(6), (4), (7), (5)> >the exact DECL_UIDs are different between -g and -g0

Re: [PATCH] Prune LTO warnings that some tests fail

2021-12-29 Thread Jeff Law via Gcc-patches
On 12/29/2021 2:13 AM, FX wrote: Hi, Did you mean to include the change pruning visibility warnings? I don't think it's necessarily wrong, it just doesn't match the patch description or ChangeLog. Yes, I think they should be applied, and will fix long-standing failures reported in

Re: [PATCH] PR fortran/102332 - ICE in select_type_set_tmp, at fortran/match.c:6366

2021-12-29 Thread Harald Anlauf via Gcc-patches
Hi Paul, Am 29.12.21 um 12:45 schrieb Paul Richard Thomas via Fortran: Hi Harald, That is the sort of thing that I had in mind. Is it worth adding the check for CLASS_DATA? I cannot remember if that is made redundant by the test of the class_ok attribute. the macro CLASS_DATA appears to have

Re: [AArch64] Enable generation of FRINTNZ instructions

2021-12-29 Thread Richard Sandiford via Gcc-patches
"Andre Vieira (lists)" writes: > On 17/12/2021 12:44, Richard Sandiford wrote: >> >>> @@ -3252,16 +3257,31 @@ vectorizable_call (vec_info *vinfo, >>> rhs_type = unsigned_type_node; >>> } >>> >>> - int mask_opno = -1; >>> + /* The argument that is not of the same type as the

Re: [AArch64] Enable generation of FRINTNZ instructions

2021-12-29 Thread Andre Vieira (lists) via Gcc-patches
Hi Richard, Thank you for the review, I've adopted all above suggestions downstream, I am still surprised how many style things I still miss after years of gcc development :( On 17/12/2021 12:44, Richard Sandiford wrote: @@ -3252,16 +3257,31 @@ vectorizable_call (vec_info *vinfo,

Re: [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-29 Thread Jan Hubicka via Gcc-patches
> > > > From: Xiong Hu Luo > > > > gcc/ChangeLog: > > > > * loop-invariant.c (find_invariants_bb): Check profile count > > before motion. > > (find_invariants_body): Add argument. > > > > gcc/testsuite/ChangeLog: > > > > * gcc.dg/loop-invariant-2.c: New. OK, thanks! Honza

Re: [PATCH] PR fortran/102332 - ICE in select_type_set_tmp, at fortran/match.c:6366

2021-12-29 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, That is the sort of thing that I had in mind. Is it worth adding the check for CLASS_DATA? I cannot remember if that is made redundant by the test of the class_ok attribute. Cheers Paul On Tue, 28 Dec 2021 at 21:08, Harald Anlauf wrote: > Hi Paul, > > Am 28.12.21 um 12:56 schrieb

[PATCH] emit-rtl: Fix a -fcompare-debug issue due to var-tracking [PR103808]

2021-12-29 Thread Jakub Jelinek via Gcc-patches
Hi! We get a -fcompare-debug FAIL on the following testcase. The problem is that during cprop we get when a TImode pseudo holding x is being constructed: (debug_insn 111 59 103 7 (var_location:TI D#2 (clobber (const_int 0 [0]))) -1 (nil)) (insn 103 111 110 7 (clobber (reg/v:TI 89 [ x ]))

[PATCH] regrename: Fix -fcompare-debug issue in find_rename_reg [PR103756]

2021-12-29 Thread Jakub Jelinek via Gcc-patches
Hi! The r12-5978 change caused a -fcompare-debug issue, because without -g a chain might start with a noop move, but with -g there could be one or more DEBUG_INSNs in the chain before the noop move and so regrename could make different decisions between -g and -g0. Note, I must say I don't

[PATCH] tree-ssa-dce: Fix up -fcompare-debug failures in make_forwarders_with_degenerate_phis [PR103742]

2021-12-29 Thread Jakub Jelinek via Gcc-patches
Hi! make_forwarders_with_degenerate_phis causes a -fcompare-debug failure on the following testcase. The problem is that on: # iftmp.4_8 = PHI <(6), (4), (7), (5)> the exact DECL_UIDs are different between -g and -g0 (which is ok, with -g the decls can have larger gaps in between the uids),

[PATCH] c-family: Use BULTINS_LOCATION for predefined macros changed upon optimize or target pragmas [PR103012]

2021-12-29 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcases ICE when an optimize or target pragma is followed by a long line (4096+ chars). This is because on such long lines we can't use columns anymore, but the cpp_define calls performed by c_cpp_builtins_optimize_pragma or from the backend hooks for target pragma are done on

[PATCH] rs6000: Remove useless code related to -mno-power10

2021-12-29 Thread Kewen.Lin via Gcc-patches
Hi, Option -mpower10 was made as "WarnRemoved" since commit r11-2318, so -mno-power10 doesn't take effect any more. This patch is to remove one line useless code which still respects it. Bootstrapped and regtested on powerpc64le-linux-gnu P9 and powerpc64-linux-gnu P8. Is it ok for trunk? BR,

[PATCH] rs6000: Don't turn off VSX for P9 VECTOR when TARGET_AVOID_XFORM set

2021-12-29 Thread Kewen.Lin via Gcc-patches
Hi, When TARGET_AVOID_XFORM is set, we turn off VSX. But at least from ISA3.0 (Power9), we support DQ form vector load/store. This patch is to make it not clear VSX when P9 VECTOR supported, it also checks some flags which P9 VECTOR relies on, otherwise those flags could disable P9 VECTOR

Re: [PATCH] Prune LTO warnings that some tests fail

2021-12-29 Thread FX via Gcc-patches
Hi, > Did you mean to include the change pruning visibility warnings? I don't > think it's necessarily wrong, it just doesn't match the patch description or > ChangeLog. Yes, I think they should be applied, and will fix long-standing failures reported in

[PATCH] i386: Robustify some expanders w.r.t. paradoxical SUBREGs

2021-12-29 Thread Uros Bizjak via Gcc-patches
lowpart_subreg might fail in some cases when trying to create paradoxical SUBREGs. Use force_reg on input operand, use new temporary output operand and emit move into the destination afterwards. Also, replace simplify_gen_subreg (Mx, op, My, 0) with equivalent lowpart_subreg (Mx, op, My).