Re: [PATCH] libsanitizer: Disable libbacktrace on sanitizer_platform_limits_freebsd.cpp

2021-11-03 Thread Gerald Pfeifer
On Tue, 2 Nov 2021, H.J. Lu wrote: > On Tue, Nov 2, 2021 at 5:11 AM Jakub Jelinek wrote: >> include/md5.h is a header we have control over, can't we just add to it >> something like: >> #ifdef USE_SYSTEM_MD5 >> #include_next >> #else >> Current header content >> #endif >> and arrange for that

Re: [PATCH] i386: Fix wrong result for AMX-TILE intrinsic when parsing expression.

2021-11-03 Thread Hongtao Liu via Gcc-patches
On Thu, Nov 4, 2021 at 11:25 AM Hongyu Wang wrote: > > > Could you add a testcase for that? > > Yes, updated patch. > > Hongtao Liu via Gcc-patches 于2021年11月4日周四 上午10:25写道: > > > > On Thu, Nov 4, 2021 at 9:19 AM Hongyu Wang via Gcc-patches > > wrote: > > > > > > Hi, > > > > > > _tile_loadd,

Re: [PATCH] vect: Add bias parameter for partial vectorization

2021-11-03 Thread Kewen.Lin via Gcc-patches
Hi Robin, on 2021/11/3 上午4:16, Robin Dapp wrote: > Hi, > > thanks for the helpful comments. The attached v2 addresses the following > points from them: > > - Save the bias in loop_vinfo and set it once in vect_verify_loop_lens. > - Add code to handle the bias in

Re: [PATCH] i386: Fix wrong result for AMX-TILE intrinsic when parsing expression.

2021-11-03 Thread Hongyu Wang via Gcc-patches
> Could you add a testcase for that? Yes, updated patch. Hongtao Liu via Gcc-patches 于2021年11月4日周四 上午10:25写道: > > On Thu, Nov 4, 2021 at 9:19 AM Hongyu Wang via Gcc-patches > wrote: > > > > Hi, > > > > _tile_loadd, _tile_stored, _tile_streamloadd intrinsics are defined by > > macro, so the

Re: [PATCH] Check number of iterations for test cases pr101145

2021-11-03 Thread Jiufu Guo via Gcc-patches
Richard Biener writes: > On Wed, 3 Nov 2021, Jiufu Guo wrote: > >> Richard Biener writes: >> >> > On Mon, 1 Nov 2021, Jiufu Guo wrote: >> > >> >> PR101145 is supporting if the number of iterations can be calculated >> >> for the 'until wrap' condition. Current test cases are checking if >> >>

Re: [PATCH] i386: Fix wrong result for AMX-TILE intrinsic when parsing expression.

2021-11-03 Thread Hongtao Liu via Gcc-patches
On Thu, Nov 4, 2021 at 9:19 AM Hongyu Wang via Gcc-patches wrote: > > Hi, > > _tile_loadd, _tile_stored, _tile_streamloadd intrinsics are defined by > macro, so the parameters should be wrapped by parentheses to accept > expressions. > > Bootstraped/regtested on x86_64-pc-linux-gnu{-m32,} and

Re: [PATCH] rs6000: Fix incorrect fusion constraint [PR102991]

2021-11-03 Thread David Edelsohn via Gcc-patches
On Wed, Nov 3, 2021 at 9:46 PM Xionghu Luo wrote: > > On 2021/11/3 23:13, David Edelsohn wrote: > > Did you manually change fusion.md or did you regenerate it after > > fixing genfusion.pl? > > > > If you regenerated it, the ChangeLog entry should be "Regenerated" and > > the "Fix incorrect

[PATCH] i386: Auto vectorize sdot_prod, usdot_prod with VNNI instruction.

2021-11-03 Thread Hongyu Wang via Gcc-patches
Hi, AVX512VNNI/AVXVNNI has vpdpwssd for HImode, vpdpbusd for QImode, so Adjust HImode sdot_prod expander and add QImode usdot_prod expander to enhance vectorization for dotprod. Bootstraped/regtested on x86_64-pc-linux-gnu{-m32,} and sde. Ok for master? gcc/ChangeLog: *

Re: [PATCH] rs6000: Fix incorrect fusion constraint [PR102991]

2021-11-03 Thread Xionghu Luo via Gcc-patches
On 2021/11/3 23:13, David Edelsohn wrote: > Did you manually change fusion.md or did you regenerate it after > fixing genfusion.pl? > > If you regenerated it, the ChangeLog entry should be "Regenerated" and > the "Fix incorrect clobber constraint." should refer to the > genfusion.pl change. >

[PATCH v5] Improve integer bit test on __atomic_fetch_[or|and]_* returns

2021-11-03 Thread liuhongt via Gcc-patches
Sorry for the slow reply: Here is update according to comments 1. Define new match function in match.pd. 2. Adjust code for below >> + gsi_remove (gsip, true); >> + var = build1 (NOP_EXPR, TREE_TYPE (use_nop_lhs), var); > >instead of building a GENERIC NOP you

Re: [PATCH 11/18] rs6000: Builtin expansion, part 6

2021-11-03 Thread Segher Boessenkool
Hi! On Wed, Sep 01, 2021 at 11:13:47AM -0500, Bill Schmidt wrote: > Provide replacements for htm_spr_num and htm_expand_builtin. No logic > changes are intended here, as usual. Much code was factored out into > rs6000_expand_new_builtin, so the new version of htm_expand_builtin is > a little

[PATCH] i386: Fix wrong result for AMX-TILE intrinsic when parsing expression.

2021-11-03 Thread Hongyu Wang via Gcc-patches
Hi, _tile_loadd, _tile_stored, _tile_streamloadd intrinsics are defined by macro, so the parameters should be wrapped by parentheses to accept expressions. Bootstraped/regtested on x86_64-pc-linux-gnu{-m32,} and sde. OK for master and backport to GCC11 branch? gcc/ChangeLog: *

Re: [PATCH 10/18] rs6000: Builtin expansion, part 5

2021-11-03 Thread Segher Boessenkool
Hi! On Wed, Sep 01, 2021 at 11:13:46AM -0500, Bill Schmidt wrote: > * config/rs6000/rs6000-call.c (new_mma_expand_builtin): > Implement. Same comment as all previous here :-) > new_mma_expand_builtin (tree exp, rtx target, insn_code icode, >

[pushed] testsuite: Fix g++.dg/opt/pr102970.C

2021-11-03 Thread Marek Polacek via Gcc-patches
This test uses a generic lambda, only available since C++14, so don't run it in earlier modes. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/testsuite/ChangeLog: * g++.dg/opt/pr102970.C: Only run in C++14 and up. --- gcc/testsuite/g++.dg/opt/pr102970.C | 2 +- 1 file changed, 1

Re: [PATCH 14/21] [crypto]: add testcases for Zksh

2021-11-03 Thread Christoph Muellner
On Sun, Oct 31, 2021 at 10:34 AM wrote: > > From: SiYu Wu You forgot the commit message. Please have a read at the GCC Coding Conventions for the requirements: https://gcc.gnu.org/codingconventions.html Note that GCC commit messages require ChangeLog entries (a template can be generated with

[committed v2][GCC 11] ranger: Fix `-Werror' build error with `ranger_cache::push_poor_value'

2021-11-03 Thread Maciej W. Rozycki
Remove a commit 86534c07a390 ("Disable poor value processing in ranger cache.") regression that caused GCC not to build anymore if `-Werror' has been enabled: .../gcc/gimple-range-cache.cc: In member function 'bool ranger_cache::push_poor_value(basic_block, tree)':

*PING* [PATCH] PR fortran/69419 - ICE: tree check: expected array_type, have real_type in gfc_conv_array_initializer, at fortran/trans-array.c:5618

2021-11-03 Thread Harald Anlauf via Gcc-patches
*PING* Am 27.10.21 um 21:09 schrieb Harald Anlauf via Fortran: Dear Fortranners, when debugging the testcase, I noticed that a coarray declaration in a COMMON statement wrongly set the dimension attribute instead of the codimension. As a consequence, subsequent checks that catch this invalid

Re: [PATCH v1] aarch64: enable Ampere-1 CPU

2021-11-03 Thread Richard Sandiford via Gcc-patches
Philipp Tomsich writes: > Richard, > > On Wed, 3 Nov 2021 at 10:08, Richard Sandiford > wrote: >> >> Philipp Tomsich writes: >> > This adds support and a basic tuning model for the Ampere Computing >> > "Ampere-1" CPU. >> > >> > The Ampere-1 implements the ARMv8.6 architecture in A64 mode and

Re: PING^4: [RS6000] rotate and mask constants [PR94393]

2021-11-03 Thread will schmidt via Gcc-patches
On Mon, 2021-10-25 at 14:41 -0500, Pat Haugen via Gcc-patches wrote: > Ping. > > On 8/10/21 10:49 AM, Pat Haugen via Gcc-patches wrote: > > On 7/27/21 1:35 PM, will schmidt wrote: > > > On Fri, 2021-07-23 at 15:23 -0500, Pat Haugen via Gcc-patches wrote: > > > > Ping > > > >

Re: [PATCH v1] aarch64: enable Ampere-1 CPU

2021-11-03 Thread Philipp Tomsich
Richard, On Wed, 3 Nov 2021 at 10:08, Richard Sandiford wrote: > > Philipp Tomsich writes: > > This adds support and a basic tuning model for the Ampere Computing > > "Ampere-1" CPU. > > > > The Ampere-1 implements the ARMv8.6 architecture in A64 mode and is > > modelled as a 4-wide issue (as

Re: [PATCH] IBM Z: ldist-{rawmemchr, strlen} tests require vector extensions

2021-11-03 Thread Andreas Schwab
On Nov 02 2021, Stefan Schulze Frielinghaus via Gcc-patches wrote: > diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-1.c > b/gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-1.c > index 6abfd278351..bf6335f6360 100644 > --- a/gcc/testsuite/gcc.dg/tree-ssa/ldist-rawmemchr-1.c > +++

Re: [committed v2] RISC-V: Fix build errors with shNadd/shNadd.uw patterns in zba cost model

2021-11-03 Thread Maciej W. Rozycki
On Wed, 3 Nov 2021, Kito Cheng wrote: > > Also are we missing explicit test coverage here? Or is it supposed to > > be covered by the generic tests here or there already (I'm not familiar > > with the details of the ISA extension to tell offhand), as long as the > > extension has been enabled

Re: [PING][PATCH] MAINTAINERS: Clarify the policy WRT the Write After Approval list

2021-11-03 Thread Maciej W. Rozycki
On Wed, 3 Nov 2021, Jeff Law wrote: > > > * MAINTAINERS: Clarify the policy WRT the Write After Approval > > > list. > > Ping for: > > > > > OK Applied now, thanks! Maciej

Re: [PATCH] RISC-V: Fix register class subset checks for CLASS_MAX_NREGS

2021-11-03 Thread Maciej W. Rozycki
On Wed, 3 Nov 2021, Kito Cheng wrote: > LGTM, My first impression of this patch is also confusing about the > ordering of arguments for reg_class_subset_p, but after I double > checked that with gdb and read the comment above the > reg_class_subset_p, I think this change is right. Applied now,

[committed] libstdc++: Fix regression in std::list::sort [PR66742]

2021-11-03 Thread Jonathan Wakely via Gcc-patches
The standard does not require const-correct comparisons in list::sort. Tested powerpc64le-linux, committed to trunk. libstdc++-v3/ChangeLog: PR libstdc++/66742 * include/bits/list.tcc (list::sort): Use mutable iterators for comparisons. * include/bits/stl_list.h

Re: [PATCH] Add 'no_builtin' function attribute

2021-11-03 Thread Keith Packard via Gcc-patches
Martin Sebor writes: > Can this option be used in attribute optimize? If yes, what's > the advantage of also providing an atttribute? Compatibility with the clang attribute. > It seems to me that as a matter of QOI, GCC should be able to > disable the expansion of built-ins to calls to

Re: [PATCH] Rename predicate class to ipa_predicate

2021-11-03 Thread Martin Sebor via Gcc-patches
On 11/3/21 4:23 AM, Martin Liška wrote: Hello. The renaming patch fixes a -Wodr warning seen and reported in the PR. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Thanks for handling this! Martin

[PATCH 4/4] libgcc: Use _dl_find_eh_frame in _Unwind_Find_FDE

2021-11-03 Thread Florian Weimer via Gcc-patches
libgcc/ChangeLog * unwind-dw2-fde-dip.c (USE_DL_FIND_EH_FRAME) (DL_FIND_EH_FRAME_CONDITION): New macros. [__GLIBC__ && !DL_FIND_EH_FRAME_DBASE] (_dl_find_eh_frame): Declare weak function. (_Unwind_Find_FDE): Call _dl_find_eh_frame if available. ---

[PATCH 3/4] libgcc: Split FDE search code from PT_GNU_EH_FRAME lookup

2021-11-03 Thread Florian Weimer via Gcc-patches
This allows switching to a different implementation for PT_GNU_EH_FRAME lookup in a subsequent commit. This moves some of the PT_GNU_EH_FRAME parsing out of the glibc loader lock that is implied by dl_iterate_phdr. However, the FDE is already parsed outside the lock before this change, so this

[PATCH 2/4] libgcc: Remove dbase member from struct unw_eh_callback_data if NULL

2021-11-03 Thread Florian Weimer via Gcc-patches
Only i386 and nios2 need this member at present. libgcc/ChangeLog * unwind-dw2-fde-dip.c (NEED_DBASE_MEMBER): Define. (struct unw_eh_callback_data): Make dbase member conditional. (unw_eh_callback_data_dbase): New function. (base_from_cb_data): Simplify for the

[PATCH 1/4] libgcc: Remove tbase member from struct unw_eh_callback_data

2021-11-03 Thread Florian Weimer via Gcc-patches
It is always a null pointer. libgcc/ChangeLog * unwind-dw2-fde-dip.c (struct unw_eh_callback_data): Remove tbase member. (base_from_cb_data): Adjust. (_Unwind_IteratePhdrCallback): Likewise. (_Unwind_Find_FDE): Likewise. --- libgcc/unwind-dw2-fde-dip.c |

[PATCH 0/4] Use _dl_find_eh_frame to locate DWARF EH data in the unwinder

2021-11-03 Thread Florian Weimer via Gcc-patches
This is the GCC side of the patch series. To simplify testing, a weak reference to _dl_find_eh_frame is used to enable this feature when running on newer glibc even if built for older glibc. The first three patches are cleanups/refactorings to simplify the actual change in the last patch.

[PATCH 3/3] elf: Add _dl_find_eh_frame function

2021-11-03 Thread Florian Weimer via Gcc-patches
This function is similar to __gnu_Unwind_Find_exidx as used on arm. It can be used to speed up the libgcc unwinder. --- NEWS | 4 + bits/dlfcn_eh_frame.h | 33 + dlfcn/Makefile| 2 +-

[PATCH 2/3] elf: Introduce GLRO (dl_libc_freeres), called from __libc_freeres

2021-11-03 Thread Florian Weimer via Gcc-patches
--- elf/Makefile | 2 +- elf/dl-libc_freeres.c | 24 elf/rtld.c | 1 + malloc/set-freeres.c | 5 + sysdeps/generic/ldsodefs.h | 7 +++ 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644

[PATCH 1/3] nptl: Extract from pthread_cond_common.c

2021-11-03 Thread Florian Weimer via Gcc-patches
And make it an installed header. This addresses a few aliasing violations (which do not seem to result in miscompilation due to the use of atomics), and also enables use of wide counters in other parts of the library. The debug output in nptl/tst-cond22 has been adjusted to print the 32-bit

[PATCH 0/3] Add _dl_find_eh_frame function for unwinder optimization

2021-11-03 Thread Florian Weimer via Gcc-patches
This patch series implements a new function, _dl_find_eh_frame, for use by in-process unwinders. The new function is lock-free and async-signal-safe, and it scales logarithmically with the number of shared objects in the process. It does not write to global data at all, unlike the current libgcc

Re: Building GNU Arm Embedded Toolchain for macOS/arm64

2021-11-03 Thread Andrea Corallo via Gcc-patches
Romain Goyet via Gcc-patches writes: > Hello, > > Arm distribute pre-built versions of GCC that targets bare-metal Cortex-M > devices at > https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm > > They offer a source release as well as pre-built

[PATCH] c++: unqual lookup performed twice w/ template-id ADL [PR102670]

2021-11-03 Thread Patrick Palka via Gcc-patches
Here we're incorrectly performing unqualified lookup of 'adl' again at substitution time for the call adl(t) (for which name lookup at parse time found nothing) which causes us to reject the testcase because the second unqualified lookup finds the later-declared variable template 'adl', leading to

Re: [PATCH][GCC 11] ranger: Fix `-Werror' build error with `ranger_cache::push_poor_value'

2021-11-03 Thread Jeff Law via Gcc-patches
On 11/3/2021 5:35 AM, Maciej W. Rozycki wrote: Remove a commit 86534c07a390 ("Disable poor value processing in ranger cache.") regression that caused GCC not to build anymore if `-Werror' has been enabled: .../gcc/gimple-range-cache.cc: In member function 'bool

Re: [PING][PATCH] MAINTAINERS: Clarify the policy WRT the Write After Approval list

2021-11-03 Thread Jeff Law via Gcc-patches
On 11/3/2021 8:00 AM, Maciej W. Rozycki wrote: On Wed, 27 Oct 2021, Maciej W. Rozycki wrote: * MAINTAINERS: Clarify the policy WRT the Write After Approval list. Ping for: OK jeff

Re: [PATCH] Add 'no_builtin' function attribute

2021-11-03 Thread Martin Sebor via Gcc-patches
On 11/2/21 3:14 PM, Keith Packard via Gcc-patches wrote: This attribute controls optimizations which make assumptions about the semantics of builtin functions. Typical cases here are code which match memcpy, calloc, sincos, or which call builtins like free. This extends on things like the

Re: [PATCH] rs6000: Fix incorrect fusion constraint [PR102991]

2021-11-03 Thread David Edelsohn via Gcc-patches
Did you manually change fusion.md or did you regenerate it after fixing genfusion.pl? If you regenerated it, the ChangeLog entry should be "Regenerated" and the "Fix incorrect clobber constraint." should refer to the genfusion.pl change. I want to ensure that genfusion.pl generates the correct

Re: [PATCH v2] libstdc++: Add support for POWER9 DARN instruction to std::random_device

2021-11-03 Thread Jonathan Wakely via Gcc-patches
On Wed, 3 Nov 2021 at 15:01, Jonathan Wakely wrote: > Any feedback from POWER maintainers about this? I'd like to push it soon > if there's nothing wrong with it. > With the updated patch attached again this time ... > On Wed, 20 Oct 2021 at 14:00, Jonathan Wakely via Libstdc++ < >

Re: [PATCH v2] libstdc++: Add support for POWER9 DARN instruction to std::random_device

2021-11-03 Thread Jonathan Wakely via Gcc-patches
Any feedback from POWER maintainers about this? I'd like to push it soon if there's nothing wrong with it. On Wed, 20 Oct 2021 at 14:00, Jonathan Wakely via Libstdc++ < libstd...@gcc.gnu.org> wrote: > On 20/10/21 10:12 +0100, Jonathan Wakely wrote: > >On 19/10/21 17:47 +0100, Jonathan Wakely

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-11-03 Thread Xionghu Luo via Gcc-patches
On 2021/10/29 19:48, Richard Biener wrote: > I'm talking about the can_sm_ref_p call, in that context 'loop' will > be the outermost loop of > interest, and we are calling this for all stores in a loop. We're doing > > +bool > +ref_in_loop_hot_body::operator () (mem_ref_loc *loc) > +{ > +

Fix size of static array in gcc.dg/vect/vect-simd-20.c

2021-11-03 Thread Olivier Hainque via Gcc-patches
Hello, This fixes the definition of the "p" static array in gcc.dg/vect/vect-simd-20.c to accommodate the number of strides performed by foo() for s == 78, which will be 129 and not 128 since 1 / 78 > 128. This fixes a failure of the test we first observed in-house on a x86_64-elf run, where

[COMMITTED] Switch vrp2 to ranger.

2021-11-03 Thread Andrew MacLeod via Gcc-patches
This patch flips the switch and makes ranger the default for the VRP2 pass. All of the testcases have been tweaked as necessary and the testsuite run should be clean. I continue to work with ranger as the VRP1 pass determining what other things VRP is doing that ranger doesn't and unifying

[COMMITTED] Testcase adjustments for pass vrp1.

2021-11-03 Thread Andrew MacLeod via Gcc-patches
The following tests all were checking something specific in VRP1 and with multiple versions available to run now, this patch unifies the checking so that they still check what it did before, verify the same code is produced, but does it in a more agnostic way.  This allows them to pass with

[COMMITTED] For ranges, PHIs don't need to process arg == def.

2021-11-03 Thread Andrew MacLeod via Gcc-patches
If an argument of a phi is the same as the DEF of the phi, then the range on the incoming edge doesn't need to be taken into account since it can't be anything other than itself.  All this can do is pessimize the calculated result. ie, for something like a_2 = phi<0(2), a_2(6)> a_2 can

[COMMITTED] Check for constant builtin value first.

2021-11-03 Thread Andrew MacLeod via Gcc-patches
For some reason the original code which folded built_in_constant_p always returned [0,0] after inlining...   This patch simply has it check if its a constant first, then the check for after inlining.  This resolves the testcase forwprop-29.c when ranger is used as the vrp1 pass. Bootstrapped

[COMMITTED] Fix --param=ranger-debug=all to include a trace.

2021-11-03 Thread Andrew MacLeod via Gcc-patches
Sigh. still didn't get the bitmask right :-P  A recent patch made each of trace/gori/cache their own flag, but didn't adjust the 'all' value to account that cache no longer included trace  so all had no trace in it.  fixed thusly. Bootstrapped on x86_64-pc-linux-gnu with no regressions. 

[COMMITTED] Provide some context to folding via ranger.

2021-11-03 Thread Andrew MacLeod via Gcc-patches
So one thing rangers version of VRP is missing that EVRP and VRP were capable of are demonstrated in gcc.dg/pr69097-1.c. This testcase uses the gimple simplifier to eliminate the negation of x % -y   :   if (y_2(D) == -1)     goto ; [INV]   else     goto ; [INV]   :   __builtin_unreachable

Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-11-03 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 03, 2021 at 10:56:30AM +, Tamar Christina wrote: > The spaceship operator is looking for (res & 1) == res which was previously > folded to (res & ~1) == 0. > This is now being folded further to ((unsigned) res) <= 1. Is that match.pd change already in the tree (which commit) or

Re: [PATCH v4] Fix ICE when mixing VLAs and statement expressions [PR91038]

2021-11-03 Thread Jason Merrill via Gcc-patches
On 10/31/21 05:22, Uecker, Martin wrote: Hi Jason, here is the fourth version of the patch. I followed your suggestion and now make this transformation sooner in pointer_int_sum. I also added a check to only do this transformation when the pointer is not a VAR_DECL, which avoids it in the

Re: [PATCH 1/7] ifcvt: Check if cmovs are needed.

2021-11-03 Thread Robin Dapp via Gcc-patches
Ping :) Not wanting to pester but I'd have hoped to get this into stage1 still as it helps performance on s390 in some cases. Expecting there will be some more reviewing rounds for the remaining patches, would I need to open a PR in order to be able to "officially" commit this in a later stage?

[PING][PATCH] MAINTAINERS: Clarify the policy WRT the Write After Approval list

2021-11-03 Thread Maciej W. Rozycki
On Wed, 27 Oct 2021, Maciej W. Rozycki wrote: > * MAINTAINERS: Clarify the policy WRT the Write After Approval > list. Ping for: Maciej

[PATCH] tree-optimization/102970 - remap cliques when translating over backedges

2021-11-03 Thread Richard Biener via Gcc-patches
The following makes sure to remap (or rather drop for simplicity) dependence info encoded in MR_DEPENDENCE_CLIQUE when PRE PHI translation translates a reference over a backedge since that ends up interleaving two different loop iterations which boils down to two different inline copies.

[PATCH] PR middle-end/103059: reload: Also accept ASHIFT with indexed addressing

2021-11-03 Thread Maciej W. Rozycki
Correct a `vax-netbsdelf' target regression ultimately caused by commit c605a8bf9270 ("VAX: Accept ASHIFT in address expressions") (needed for LRA) and as of commit 4a960d548b7d ("Avoid invalid loop transformations in jump threading registry.") causing a build error in libgcc:

Re: [RFA] Minor optimization of variable bit testing

2021-11-03 Thread Richard Biener via Gcc-patches
On Tue, Nov 2, 2021 at 4:53 PM Jeff Law wrote: > > > I was wandering spec chasing down instances where we should be > generating bit-test, bit-set and bit-clear types of instructions for our > target when I ran across a generic missed optimization in this space. > > > (((1 << N) & C) != 0) -> (N

Re: [PATCH] IBM Z: Free bbs in s390_loop_unroll_adjust

2021-11-03 Thread Richard Biener via Gcc-patches
On Tue, Nov 2, 2021 at 6:33 PM Stefan Schulze Frielinghaus via Gcc-patches wrote: > > Bootstrapped and regtested on IBM Z. Ok for mainline? OK (obvious even). Thanks, Richard. > gcc/ChangeLog: > > * config/s390/s390.c (s390_loop_unroll_adjust): In case of early > exit free

Re: [PATCH] dwarf2out: Fix up CONST_WIDE_INT handling once more [PR103046]

2021-11-03 Thread Richard Biener via Gcc-patches
On Wed, 3 Nov 2021, Jakub Jelinek wrote: > On Wed, Nov 03, 2021 at 01:59:27PM +0100, Richard Biener wrote: > > > case CONST_WIDE_INT: > > > - { > > > - wide_int w1 = rtx_mode_t (rtl, MAX_MODE_INT); > > > - unsigned int prec = MIN (wi::min_precision (w1, UNSIGNED), > > > -

Re: [PATCH v2 3/4] Rename loop_version to clone_loop_to_header_edge.

2021-11-03 Thread Richard Biener via Gcc-patches
On Wed, 27 Oct 2021, Xionghu Luo wrote: > Name loop_copy is used in gcc/cfg.c already. But it's not actually cloning the loop to the header edge but doing more - adding a condition and re-wiring edges so the cloned loop is no longer on the header edge. So no, I don't think this is good to go.

[PATCH] middle-end/103033 - drop native_interpret_expr with .DEFERRED_INIT expansion

2021-11-03 Thread Richard Biener via Gcc-patches
This drops the use of native_interpret_expr which can fail even though can_native_interpret_expr_p returns true in favor of simply folding the VIEW_CONVERT_EXPR punning. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-11-03 Richard Biener PR middle-end/103033

Re: [PATCH] ipa-sra: Improve debug info for removed parameters (PR 93385)

2021-11-03 Thread Richard Biener via Gcc-patches
On Mon, 1 Nov 2021, Martin Jambor wrote: > Hello, > > I'd like to ping this patch. > > Thanks, > > Martin > > > On Wed, Oct 13 2021, Martin Jambor wrote: > > Hi, > > > > in spring I added code eliminating any statements using parameters > > removed by IPA passes (to fix PR 93385). That

[PATCH] rs6000: Fix incorrect fusion constraint [PR102991]

2021-11-03 Thread Xionghu Luo via Gcc-patches
The clobber constraint should match operand's constraint. fusion.md was generated by genfusion.pl, but it is disabled now, update both places with correct clobber constraint. gcc/ChangeLog: * config/rs6000/fusion.md: Fix incorrect clobber constraint. *

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-11-03 Thread Xionghu Luo via Gcc-patches
On 2021/10/29 19:48, Richard Biener wrote: > I'm talking about the can_sm_ref_p call, in that context 'loop' will > be the outermost loop of > interest, and we are calling this for all stores in a loop. We're doing > > +bool > +ref_in_loop_hot_body::operator () (mem_ref_loc *loc) > +{ > +

RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-11-03 Thread Tamar Christina via Gcc-patches
Hi, I think it was lost along the way that I did post an update to the detection code to fix the regression  I think I have a better understanding of the code now and have updated the patch. Essentially when a signed comparison is encountered my match.pd pattern will trigger for EQ and NE.

Re: redundant bitmap_bit_p followed by bitmap_clear_bit [was: Re: [COMMITTED] Kill second order relations in the path solver.]

2021-11-03 Thread Richard Biener via Gcc-patches
On Tue, Nov 2, 2021 at 10:00 PM Bernhard Reutner-Fischer wrote: > > On 2 November 2021 14:43:38 CET, Richard Biener > wrote: > >On Mon, Nov 1, 2021 at 10:02 PM Bernhard Reutner-Fischer via > >Gcc-patches wrote: > >> > >> On Mon, 1 Nov 2021 15:21:03 +0100 > >> Aldy Hernandez wrote: > >> > >> >

RE: [PATCH]middle-end convert negate + right shift into compare greater.

2021-11-03 Thread Tamar Christina via Gcc-patches
Hi, I have addressed all the feedback and updated patch attached: Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu and no regressions. Ok for master? Thanks, Tamar gcc/ChangeLog: * match.pd: New negate+shift pattern. gcc/testsuite/ChangeLog: *

[PATCH][GCC 11] ranger: Fix `-Werror' build error with `ranger_cache::push_poor_value'

2021-11-03 Thread Maciej W. Rozycki
Remove a commit 86534c07a390 ("Disable poor value processing in ranger cache.") regression that caused GCC not to build anymore if `-Werror' has been enabled: .../gcc/gimple-range-cache.cc: In member function 'bool ranger_cache::push_poor_value(basic_block, tree)':

Re: [PATCH] dwarf2out: Fix up CONST_WIDE_INT handling once more [PR103046]

2021-11-03 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 03, 2021 at 09:35:38AM +0100, Jakub Jelinek wrote: > Though, thinking more about it, maybe better would be to actually pass > machine_mode to add_const_value_attribute from callers, so that we know > exactly what precision we want. Because hypothetically, if say mode is > OImode and

Re: [PATCH] Check number of iterations for test cases pr101145

2021-11-03 Thread Richard Biener via Gcc-patches
On Wed, 3 Nov 2021, Jiufu Guo wrote: > Richard Biener writes: > > > On Mon, 1 Nov 2021, Jiufu Guo wrote: > > > >> PR101145 is supporting if the number of iterations can be calculated > >> for the 'until wrap' condition. Current test cases are checking if > >> the loop can be vectorized, if a

[PATCH] gcc: vx-common.h: fix test for VxWorks7

2021-11-03 Thread Rasmus Villemoes
The macro TARGET_VXWORKS7 is always defined (see vxworks-dummy.h). Thus we need to test its value, not its definedness. Fixes aca124df (define NO_DOT_IN_LABEL only in vxworks6). gcc/ChangeLog: * config/vx-common.h: Test value of TARGET_VXWORKS7 rather than definedness. ---

[PATCH] Make sbitmap bitmap_set_bit and bitmap_clear_bit return changed state

2021-11-03 Thread Richard Biener via Gcc-patches
The following adjusts the sbitmap bitmap_set_bit and bitmap_clear_bit APIs to match that of bitmap by returning a bool indicating whether the bitmap was changed. I've also changed bitmap_bit_p to return a bool rather than an int and made use of the sbitmap bitmap_set_bit API change in one place.

Re: [PATCH] dwarf2out: Fix up CONST_WIDE_INT handling once more [PR103046]

2021-11-03 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 03, 2021 at 01:59:27PM +0100, Richard Biener wrote: > > case CONST_WIDE_INT: > > - { > > - wide_int w1 = rtx_mode_t (rtl, MAX_MODE_INT); > > - unsigned int prec = MIN (wi::min_precision (w1, UNSIGNED), > > -(unsigned int) CONST_WIDE_INT_NUNITS

Re: [PATCH v1] aarch64: enable Ampere-1 CPU

2021-11-03 Thread Richard Sandiford via Gcc-patches
Philipp Tomsich writes: > This adds support and a basic turning model for the Ampere Computing > "Ampere-1" CPU. > > The Ampere-1 implements the ARMv8.6 architecture in A64 mode and is > modelled as a 4-wide issue (as with all modern micro-architectures, > the chosen issue rate is a compromise

Re: [patch][PR103033]handle the case when native_interpret_expr return NULL

2021-11-03 Thread Richard Biener via Gcc-patches
On Tue, 2 Nov 2021, Qing Zhao wrote: > Hi, > > PR103033 (c-c++-common/auto-init-4.c ICEs starting with r12-4829) > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103033 > > Is an -ftrivial-auto-var-init bug exposed on Powerpc64-linux only. > > For the following code in gcc/internal-fn.c: >

[PATCH] Rename predicate class to ipa_predicate

2021-11-03 Thread Martin Liška
Hello. The renaming patch fixes a -Wodr warning seen and reported in the PR. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. PR bootstrap/102828 gcc/ChangeLog: * ipa-fnsummary.c (edge_predicate_pool): Rename predicate class to ipa_predicate.

[PATCH] dwarf2out: Fix up CONST_WIDE_INT handling once more [PR103046]

2021-11-03 Thread Jakub Jelinek via Gcc-patches
Hi! My last change to CONST_WIDE_INT handling in add_const_value_attribute broke handling of CONST_WIDE_INT constants like ((__uint128_t) 1 << 120). wi::min_precision (w1, UNSIGNED) in that case 121, but wide_int::from creates a wide_int that has 0 and 0xff00ULL in its elts and

Re: [PATCH] IBM Z: Free bbs in s390_loop_unroll_adjust

2021-11-03 Thread Andreas Krebbel via Gcc-patches
On 11/2/21 18:31, Stefan Schulze Frielinghaus wrote: > Bootstrapped and regtested on IBM Z. Ok for mainline? > > gcc/ChangeLog: > > * config/s390/s390.c (s390_loop_unroll_adjust): In case of early > exit free bbs. Ok. Thanks! Andreas

Re: [PATCH] Rename predicate class to ipa_predicate

2021-11-03 Thread Martin Liška
On 11/3/21 13:59, Jan Hubicka wrote: OK (even thought the predicates are not necessarily limited to IPA passes:). Heh ;) Thanks and installed. Martin

Re: [PATCH] dwarf2out: Fix up CONST_WIDE_INT handling once more [PR103046]

2021-11-03 Thread Richard Biener via Gcc-patches
On Wed, 3 Nov 2021, Jakub Jelinek wrote: > On Wed, Nov 03, 2021 at 09:35:38AM +0100, Jakub Jelinek wrote: > > Though, thinking more about it, maybe better would be to actually pass > > machine_mode to add_const_value_attribute from callers, so that we know > > exactly what precision we want.

Re: [PATCH] Rename predicate class to ipa_predicate

2021-11-03 Thread Jan Hubicka via Gcc-patches
> Hello. > > The renaming patch fixes a -Wodr warning seen and reported in the PR. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > PR bootstrap/102828 > > gcc/ChangeLog: > > * ipa-fnsummary.c (edge_predicate_pool): Rename predicate class to >

Re: c: Fold implicit integer-to-floating conversions in static initializers with -frounding-math [PR103031]

2021-11-03 Thread Richard Biener via Gcc-patches
On Wed, Nov 3, 2021 at 1:22 AM Joseph Myers wrote: > > Recent fixes to avoid inappropriate folding of some conversions to > floating-point types with -frounding-math also prevented such folding > in C static initializers, when folding (in the default rounding mode, > exceptions discarded) is

Re: [PATCH] [RFC][PR102768] aarch64: Add compiler support for Shadow Call Stack

2021-11-03 Thread Szabolcs Nagy via Gcc-patches
The 11/03/2021 00:24, Dan Li wrote: > On 11/2/21 9:04 PM, Szabolcs Nagy wrote: > > The 11/02/2021 00:06, Dan Li via Gcc-patches wrote: > > > Shadow Call Stack can be used to protect the return address of a > > > function at runtime, and clang already supports this feature[1]. > > > > > > To