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

2021-12-28 Thread Xionghu Luo via Gcc-patches
On 2021/12/17 09:30, Xionghu Luo via Gcc-patches wrote: > > > On 2021/12/16 19:20, Jan Hubicka wrote: >>> >>> OK. Comments like? >>> >>> /* Don't move insn of cold BB out of loop to preheader to reduce >>> calculations >>>and register live range in hot loop with cold BB. */ >> >>

[PATCH] rs6000: Add split pattern to replace

2021-12-28 Thread Xionghu Luo via Gcc-patches
7: r120:V4SI=const_vector 8: r121:V4SI=unspec[r120:V4SI,r120:V4SI,0xc] 260 with r121:v4SI = r120:V4SI when r120 is a vector with same element. Bootstrapped and regtested pass on powerpc64le-linux-gnu {P10, P9} and powerpc64-linux-gnu {P8, P7}. OK for master? gcc/ChangeLog: *

[PATCH] convert (xor (and (xor A B) C) A) to (ior (and A ~C) (and B C)) [PR90323]

2021-12-28 Thread Xionghu Luo via Gcc-patches
Bootstrapped and regtested on powerpc64le-linux-gnu {P10,P9} powerpc64-linux-gnu {P8, P7} and X86. OK for master? gcc/ChangeLog: PR 90323 * simplify-rtx.c (simplify_context::simplify_binary_operation_1): Relax C from constant to constant or reg. gcc/testsuite/ChangeLog:

Re: [PATCH] Fix ICE in lsplit when built with -O3 -fno-guess-branch-probability [PR103793]

2021-12-28 Thread Xionghu Luo via Gcc-patches
On 2021/12/29 03:33, Jan Hubicka wrote: >> -/* Proportion second loop's bb counts except those dominated by false >> - branch to avoid drop 1s down. */ >> -basic_block bbi_copy = get_bb_copy (false_edge->dest); >> -bbs2 = get_loop_body (loop2); >> -for (j = 0; j <

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

2021-12-28 Thread Harald Anlauf via Gcc-patches
Hi Paul, Am 28.12.21 um 12:56 schrieb Paul Richard Thomas via Fortran: Hi Harald, This looks good to me. OK for mainline and, dare I suggest, 11-branch? From a quick run through resolve.c, there are many places where the extra checks that you introduced in the patch have been implemented.

Re: [PATCH] Fix ICE in lsplit when built with -O3 -fno-guess-branch-probability [PR103793]

2021-12-28 Thread Jan Hubicka via Gcc-patches
> - /* Proportion second loop's bb counts except those dominated by false > -branch to avoid drop 1s down. */ > - basic_block bbi_copy = get_bb_copy (false_edge->dest); > - bbs2 = get_loop_body (loop2); > - for (j = 0; j < loop2->num_nodes; j++) > - if (bbs2[j] ==

Re: [PATCH] Emit correct types for CHARACTER(C_CHAR), VALUE

2021-12-28 Thread Mikael Morin
Le 26/12/2021 à 21:09, FX via Fortran a écrit : OK to commit? This looks good, yes. Thanks.

[pushed] c++: ICE on enum with bool value [PR99968]

2021-12-28 Thread Jason Merrill via Gcc-patches
BOOLEAN_TYPE also counts as integral, so verify_type should allow it. Tested x86_64-pc-linux-gnu, applying to trunk as obvious. PR c++/99968 gcc/ChangeLog: * tree.c (verify_type): Allow enumerator with BOOLEAN_TYPE. gcc/testsuite/ChangeLog: * g++.dg/ext/is_enum2.C:

Re: [PATCH] Fix ICE in lsplit when built with -O3 -fno-guess-branch-probability [PR103793]

2021-12-28 Thread Jeff Law via Gcc-patches
On 12/21/2021 7:19 PM, Xionghu Luo wrote: no-guess-branch-probability option requires profile_count with initialized_p guard. Also merge the missed part of r12-6086 of factor out function to avoid duplicate code. gcc/ChangeLog: PR 103793 * tree-ssa-loop-split.c

Re: [PATCH] Register --sysroot in the driver switches table

2021-12-28 Thread Jeff Law via Gcc-patches
On 12/20/2021 2:28 PM, Olivier Hainque via Gcc-patches wrote: Hello, This change adjusts the processing of --sysroot to save the option in the internal "switches" array, which lets self-specs test for it and provide a default value possibly dependent on environment variables, as in

Re: Libbacktrace: Fix the use of newline in sed replacement

2021-12-28 Thread Jeff Law via Gcc-patches
On 12/24/2021 3:25 AM, FX via Gcc-patches wrote: Hi, Libbacktrace fails to run “make check" on macOS (*-apple-darwin21), where the system make is GNU Make 3.81. But I think it would occur on all platforms that are not ELF and use make < 4. Running `make check` leads to this failure:

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

2021-12-28 Thread Jeff Law via Gcc-patches
On 12/26/2021 5:19 PM, FX via Gcc-patches wrote: The testcase g++.dg/torture/pr31863.C fails on *-apple-darwin with: FAIL: g++.dg/torture/pr31863.C -O2 -flto (test for excess errors) Excess errors: lto-wrapper: warning: using serial compilation of 2 LTRANS jobs The test otherwise works

Re: [PATCH] Support ld.mold linker.

2021-12-28 Thread Jeff Law via Gcc-patches
On 12/28/2021 7:19 AM, Martin Liška wrote: On 12/28/21 14:21, H.J. Lu wrote: Missing invoke.texi change. Oh, sure and I also missed ChangeLog entry. Fixed in the attached patch. Martin 0001-Support-ld.mold-linker.patch From ca60317a60ee20ce848b36588b905b5a63d81350 Mon Sep 17 00:00:00

Re: [PATCH] loop-invariant: Fix -fcompare-debug failure [PR103837]

2021-12-28 Thread Jeff Law via Gcc-patches
On 12/28/2021 3:21 AM, Jakub Jelinek wrote: Hi! In the following testcase we have a -fcompare-debug failure, because can_move_invariant_reg doesn't ignore DEBUG_INSNs in its decisions. In the testcase we have due to uninitialized variable: loop_header debug_insn using pseudo84

Re: [PATCH] optabs: Fix up checking for CALLs in newly added code by double-word divmod [PR103838]

2021-12-28 Thread Jeff Law via Gcc-patches
On 12/28/2021 3:14 AM, Jakub Jelinek wrote: Hi! These two spots are meant to punt if the newly added code contains any CALL_INSNs, because in that case having a large sequence of insns that also calls something is undesirable, better have one call that is optimized in itself well. The

Re: [PATCH] fold-const: Fix up fold_truth_andor_1 shift handling [PR103813]

2021-12-28 Thread Jeff Law via Gcc-patches
On 12/28/2021 3:27 AM, Jakub Jelinek wrote: Hi! Some time ago I've changed const_binop -> wide_int_binop, so that it punts on shifts by negative count. fold_truth_andor_1 doesn't check the results of const_binop (?SHIFT_EXPR, ) though and assumes they will be always non-NULL, which is no

[PATCH] c++: dependent bases and 'this' availability [PR103831]

2021-12-28 Thread Patrick Palka via Gcc-patches
Here during satisfaction of B's associated constraints we're failing to reject the object-less call to the non-static member function A::size ultimately because satisfaction is performed in the (access) context of the class template B, which has a dependent bases, and so the any_dependent_bases_p

Re: [PATCH] Support ld.mold linker.

2021-12-28 Thread Martin Liška
On 12/28/21 14:21, H.J. Lu wrote: Missing invoke.texi change. Oh, sure and I also missed ChangeLog entry. Fixed in the attached patch. MartinFrom ca60317a60ee20ce848b36588b905b5a63d81350 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 21 Dec 2021 17:43:55 +0100 Subject: [PATCH]

Re: [PATCH 1/2] libphobos: fix CET for non-glibc targets

2021-12-28 Thread Alex Xu (Hello71) via Gcc-patches
Excerpts from ibuc...@gdcproject.org's message of December 20, 2021 4:00 pm: >> On 20/12/2021 16:41 Alex Xu (Hello71) wrote: >> >> >> Excerpts from ibuc...@gdcproject.org's message of December 20, 2021 8:56 am: >> >> On 20/12/2021 01:08 Alex Xu (Hello71) via Gcc-patches >> >> wrote: >> >>

[PATCH] Support ld.mold linker.

2021-12-28 Thread Martin Liška
Hello. The mold linker is getting quite popular and I think we should support it: https://github.com/rui314/mold Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin --- gcc/collect2.c | 10 +++--- gcc/common.opt | 4

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

2021-12-28 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, This looks good to me. OK for mainline and, dare I suggest, 11-branch? >From a quick run through resolve.c, there are many places where the extra checks that you introduced in the patch have been implemented. This makes me wonder whether a function or macro might not make the relevant

[PATCH] fold-const: Fix up fold_truth_andor_1 shift handling [PR103813]

2021-12-28 Thread Jakub Jelinek via Gcc-patches
Hi! Some time ago I've changed const_binop -> wide_int_binop, so that it punts on shifts by negative count. fold_truth_andor_1 doesn't check the results of const_binop (?SHIFT_EXPR, ) though and assumes they will be always non-NULL, which is no longer the case. Fixed thusly,

[PATCH] loop-invariant: Fix -fcompare-debug failure [PR103837]

2021-12-28 Thread Jakub Jelinek via Gcc-patches
Hi! In the following testcase we have a -fcompare-debug failure, because can_move_invariant_reg doesn't ignore DEBUG_INSNs in its decisions. In the testcase we have due to uninitialized variable: loop_header debug_insn using pseudo84 pseudo84 = invariant insn using pseudo84 end

[PATCH] optabs: Fix up checking for CALLs in newly added code by double-word divmod [PR103838]

2021-12-28 Thread Jakub Jelinek via Gcc-patches
Hi! These two spots are meant to punt if the newly added code contains any CALL_INSNs, because in that case having a large sequence of insns that also calls something is undesirable, better have one call that is optimized in itself well. The functions do last = get_last_insn (); before emitting

[committed] i386: Fix handling of SUBREGs in divv2sf3 [PR103842]

2021-12-28 Thread Jakub Jelinek via Gcc-patches
Hi! register_operand predicate allows not just REGs, but also SUBREGs of REGs, and for the latter lowpart_subreg might FAIL when trying to create paradoxical SUBREG in some cases. For the input operand fixed by force_reg on it first, for the output operand handled by always dividing into a fresh