Re: [PATCH][WIP] Add install-dvi Makefile targets

2021-10-18 Thread Thomas Koenig via Gcc-patches
Hi Eric, Hi, I have updated this patch and tested it with more languages now; I can now confirm that it works with ada, d, and fortran now. The only languages that remain untested now are go (since I'm building on darwin and go doesn't build on darwin anyways, as per bug 46986) and jit (which I

[PATCH 4/4] Improve maybe_remove_writeonly_store to do a simple DCE for defining statement

2021-10-18 Thread apinski--- via Gcc-patches
From: Andrew Pinski Instead of putting a full blow DCE after execute_fixup_cfg, it makes sense to try to remove the defining statement for the store that is being removed. Right now we only handle PHI node statements as there needs no extra checks except for it is only used once in the store

[PATCH 3/4] Factor out removal of write only stores from execute_fixup_cfg

2021-10-18 Thread apinski--- via Gcc-patches
From: Andrew Pinski To make it easier to fix PR 102703, factoring this code out to its own function makes it easier to read and less indentions too. gcc/ChangeLog: * tree-cfg.c (maybe_remove_writeonly_store): New function factored out from ... (execute_fixup_cfg): Here.

[PATCH 2/4] Remove outdated comment about execute_fixup_cfg

2021-10-18 Thread apinski--- via Gcc-patches
From: Andrew Pinski The comment about execute_fixup_cfg not being able to run as a standalone pass is not true for a long time now. It has been a standalone pass for a while now. gcc/ChangeLog: * tree-cfg.c (execute_fixup_cfg): Remove comment about standalone pass. ---

[PATCH 1/4] Add dump prints when execute_fixup_cfg removes a write only var store.

2021-10-18 Thread apinski--- via Gcc-patches
From: Andrew Pinski While debugging PR 102703, I found it was hard to figure out where the store was being removed as there was no pass which was outputting why the store was removed. This adds to execute_fixup_cfg the output. Also note most of removals happen when execute_fixup_cfg is called

[PATCH 0/4] Fix PR tree-opt/102703

2021-10-18 Thread apinski--- via Gcc-patches
From: Andrew Pinski This patch series fixes PR tree-opt/102703 by improving the code which will delete write only stores to also delete the phi node (if it was a phi node) that was used to define the write. We need to some factoring out of the code to make it easier to understand and less

[PATCH] tree-object-size: Make unknown a computation

2021-10-18 Thread Siddhesh Poyarekar
Compute the unknown size value as a function of the min/max bit of object_size_type. This transforms into a neat little branchless sequence on x86_64: movl%edi, %eax sarl%eax xorl$1, %eax negl%eax cltq which should be faster than loading

[PATCH v5 2/2] Don't move cold code out of loop by checking bb count

2021-10-18 Thread Xionghu Luo via Gcc-patches
On 2021/10/18 12:29, Xionghu Luo via Gcc-patches wrote: > > > On 2021/10/15 16:11, Richard Biener wrote: >> On Sat, Oct 9, 2021 at 5:45 AM Xionghu Luo wrote: >>> >>> Hi, >>> >>> On 2021/9/28 20:09, Richard Biener wrote: On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: > >

Re: [PATCH][WIP] Add install-dvi Makefile targets

2021-10-18 Thread Eric Gallager via Gcc-patches
On Tue, Oct 12, 2021 at 5:09 PM Eric Gallager wrote: > > On Thu, Oct 6, 2016 at 10:41 AM Eric Gallager wrote: > > > > Currently the build machinery handles install-pdf and install-html > > targets, but no install-dvi target. This patch is a step towards > > fixing that. Note that I have only

[PATCH v4 2/3] rs6000: Support SSE4.1 "round" intrinsics

2021-10-18 Thread Paul A. Clarke via Gcc-patches
Suppress exceptions (when specified), by saving, manipulating, and restoring the FPSCR. Similarly, save, set, and restore the floating-point rounding mode when required. No attempt is made to optimize writing the FPSCR (by checking if the new value would be the same), other than using lighter

[PATCH v4 3/3] rs6000: Guard some x86 intrinsics implementations

2021-10-18 Thread Paul A. Clarke via Gcc-patches
Some compatibility implementations of x86 intrinsics include Power intrinsics which require POWER8. Guard them. emmintrin.h: - _mm_cmpord_pd: Remove code which was ostensibly for pre-POWER8, but which indeed depended on POWER8 (vec_cmpgt(v2du)/vcmpgtud). The "POWER8" version works fine on

[PATCH v4 1/3] rs6000: Add nmmintrin.h to extra_headers

2021-10-18 Thread Paul A. Clarke via Gcc-patches
Fix an ommission in commit 29fb1e831bf1c25e4574bf2f98a9f534e5c67665. 2021-10-18 Paul A. Clarke gcc * config/config.gcc (extra_headers): Add nmmintrin.h. --- gcc/config.gcc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config.gcc b/gcc/config.gcc index

[PATCH v4 0/3] rs6000: Support more SSE4 intrinsics

2021-10-18 Thread Paul A. Clarke via Gcc-patches
v4: - Of original 6 patches in this series, I committed patches 2-5. - Found an issue from v3. New file "nmmintrin.h" also needs to be added to gcc/config.gcc "extra_headers". Unfortunately, I discovered this after committing the patch which added "nmmintrin.h", so I've added a new patch here. -

Re: [PATCH v3 1/6] rs6000: Support SSE4.1 "round" intrinsics

2021-10-18 Thread Paul A. Clarke via Gcc-patches
On Tue, Oct 12, 2021 at 05:25:32PM -0500, Segher Boessenkool wrote: > On Tue, Oct 12, 2021 at 02:35:57PM -0500, Paul A. Clarke wrote: > > static __inline __attribute__ ((__always_inline__)) void > > libc_feholdsetround_ppc_ctx (struct rm_ctx *ctx, int r) > > { > > fenv_union_t old; > >

Re: [PATCH v3 6/6] rs6000: Guard some x86 intrinsics implementations

2021-10-18 Thread Paul A. Clarke via Gcc-patches
On Wed, Oct 13, 2021 at 06:47:21PM -0500, Segher Boessenkool wrote: > On Wed, Oct 13, 2021 at 12:04:39PM -0500, Paul A. Clarke wrote: > > On Mon, Oct 11, 2021 at 07:11:13PM -0500, Segher Boessenkool wrote: > > > > - _mm_mul_epu32: vec_mule(v4su) uses vmuleuw. > > > > > > Did this fail on p7? If

Re: FW: [PING] Re: [Patch][GCC][middle-end] - Generate FRINTZ for (double)(int) under -ffast-math on aarch64

2021-10-18 Thread Joseph Myers
On Fri, 15 Oct 2021, Richard Biener via Gcc-patches wrote: > On Fri, Sep 24, 2021 at 2:59 PM Jirui Wu via Gcc-patches > wrote: > > > > Hi, > > > > Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577846.html > > > > The patch is attached as text for ease of use. Is there anything that

Re: [PATCH v2] rs6000: Remove unspecs for vec_mrghl[bhw]

2021-10-18 Thread David Edelsohn via Gcc-patches
On Tue, Oct 12, 2021 at 9:50 PM Xionghu Luo wrote: > > Resend this patch. Previous discussion is: > > https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572330.html > > vmrghb only accepts permute index {0, 16, 1, 17, 2, 18, 3, 19, 4, 20, > 5, 21, 6, 22, 7, 23} no matter for BE or LE in ISA,

[COMMITTED] tree-optimization/102796 - Process EH edges again.

2021-10-18 Thread Andrew MacLeod via Gcc-patches
Sorry for the breakage, we need to continue processing EH edges.. Bootstrapped on x86_64-pc-linux-gnu (including Go :-)  with no regressions as of the original checkin.   I hope this catches all the other ripple PRs too.  Pushed. Returning NULL in gimple_range_ssa_p is probably not a good

Re: [PATCH] openmp, fortran: Add support for declare variant in Fortran

2021-10-18 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 18, 2021 at 10:05:29PM +0100, Kwok Cheung Yeung wrote: > On 14/10/2021 1:47 pm, Jakub Jelinek wrote: > > What I still miss is tests for the (proc_name : variant_name) syntax > > in places where proc_name : is optional, but is supplied and is valid, like > > e.g. in interface, or in

Re: [PATCH] openmp, fortran: Add support for declare variant in Fortran

2021-10-18 Thread Kwok Cheung Yeung
On 14/10/2021 1:47 pm, Jakub Jelinek wrote: What I still miss is tests for the (proc_name : variant_name) syntax in places where proc_name : is optional, but is supplied and is valid, like e.g. in interface, or in subroutine/function and where proc_name specifies the name of the containing

Re: [PATCH] Add a simulate_record_decl lang hook

2021-10-18 Thread Richard Sandiford via Gcc-patches
Jason Merrill writes: > On 9/24/21 13:53, Richard Sandiford wrote: >> This patch adds a lang hook for defining a struct/RECORD_TYPE >> “as if” it had appeared directly in the source code. It follows >> the similar existing hook for enums. >> >> It's the caller's responsibility to create the

[Version 2][Patch][PR102281]do not add BUILTIN_CLEAR_PADDING for variables that are gimple registers

2021-10-18 Thread Qing Zhao via Gcc-patches
Hi, Jakub, This is the 2nd version of the patch based on your comment. Bootstrapped on both x86 and aarch64. Regression testings are ongoing. Please let me know if this is ready for committing? Thanks a lot. Qing. == >From d6f60370dee69b5deb3d7ef51873a5e986490782 Mon Sep

Re: [PATCH] PR target/102785: Correct addsub/subadd patterns on bfin.

2021-10-18 Thread Jeff Law via Gcc-patches
On 10/18/2021 9:07 AM, Roger Sayle wrote: This patch resolves PR target/102785 where my recent patch to constant fold saturating addition/subtraction exposed a latent bug in the bfin backend. The patterns used for blackfin's V2HI ssaddsub and sssubadd instructions had the indices/operations

Re: [Patch][PR102281]do not add BUILTIN_CLEAR_PADDING for variables that are gimple registers.

2021-10-18 Thread Qing Zhao via Gcc-patches
> On Oct 18, 2021, at 12:15 PM, Jakub Jelinek wrote: > > On Mon, Oct 18, 2021 at 05:01:55PM +, Qing Zhao wrote: >>> The where is typically somewhere in the FEs. >>> But, there are two things. >>> One is that in order to gimplify it properly, it needs to be marked earlier. >>> But the other

Re: [Patch][PR102281]do not add BUILTIN_CLEAR_PADDING for variables that are gimple registers.

2021-10-18 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 18, 2021 at 05:01:55PM +, Qing Zhao wrote: > > The where is typically somewhere in the FEs. > > But, there are two things. > > One is that in order to gimplify it properly, it needs to be marked earlier. > > But the other is that if it is not addressable, then clearing padding in

Re: [PATCH 4/4] ipa-cp: Select saner profile count to base heuristics on

2021-10-18 Thread Martin Jambor
Hi, On Wed, Oct 06 2021, Jan Hubicka wrote: >> 2021-08-23 Martin Jambor >> >> * params.opt (param_ipa_cp_profile_count_base): New parameter. >> * ipa-cp.c (max_count): Replace with base_count, replace all >> occurrences too, unless otherwise stated. >>

Re: [Patch][PR102281]do not add BUILTIN_CLEAR_PADDING for variables that are gimple registers.

2021-10-18 Thread Qing Zhao via Gcc-patches
> On Oct 18, 2021, at 11:46 AM, Jakub Jelinek wrote: > > On Mon, Oct 18, 2021 at 03:58:56PM +, Qing Zhao wrote: >>> Furthermore, __builtin_clear_padding doesn't assume anything, but it takes >>> an address of an object as argument and already the taking of the address >>> that

Re: [PATCH] c++: Don't reject calls through PMF during constant evaluation [PR102786]

2021-10-18 Thread Jason Merrill via Gcc-patches
On 10/18/21 08:14, Jakub Jelinek wrote: Hi! The following testcase incorrectly rejects the c initializer, while in the s.*a case cxx_eval_* sees .__pfn reads etc., in the s.*::foo case get_member_function_from_ptrfunc creates expressions which use INTEGER_CSTs with type of pointer to

Re: [PATCH 3/4] ipa-cp: Fix updating of profile counts and self-gen value evaluation

2021-10-18 Thread Martin Jambor
Hi, On Fri, Oct 08 2021, Jan Hubicka wrote: >> For non-local nodes which can have unknown callers, the algorithm just >> takes half of the counts - we may decide that taking just a third or >> some other portion is more reasonable, but I do not think we can >> attempt anything more clever. > >

Re: [Patch][PR102281]do not add BUILTIN_CLEAR_PADDING for variables that are gimple registers.

2021-10-18 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 18, 2021 at 03:58:56PM +, Qing Zhao wrote: > > Furthermore, __builtin_clear_padding doesn't assume anything, but it takes > > an address of an object as argument and already the taking of the address > > that gimple_add_padding_init_for_auto_var does makes the var > >

Re: [PATCH] c++: Diagnose taking address of an immediate member function [PR102753]

2021-10-18 Thread Jason Merrill via Gcc-patches
On 10/18/21 04:12, Jakub Jelinek wrote: Hi! The following testcase ICEs, because while we have in cp_build_addr_expr_1 diagnostics for taking address of an immediate function (and as an exception deal with build_address from immediate invocation), I forgot to diagnose taking address of a member

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

2021-10-18 Thread Jason Merrill via Gcc-patches
On 10/17/21 09:52, Uecker, Martin wrote: Here is the 4th version of the patch. I tried to implement Jason's suggestion and this also fixes the problem. But I am not sure I understand the condition on the TREE_SIDE_EFFECTS ... Checking TREE_SIDE_EFFECTS filters out many trivial cases that we

Re: [PATCH] AArch64: Tune case-values-threshold

2021-10-18 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Tune the case-values-threshold setting for modern cores. A value of 11 > improves > SPECINT2017 by 0.2% and reduces codesize by 0.04%. With -Os use value 8 which > reduces codesize by 0.07%. > > Passes regress, OK for commit? > > ChangeLog: > > 2021-10-18 Wilco

Re: [PATCH] AArch64: Enable fast shifts on Neoverse V1/N2

2021-10-18 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Enable the fast shift feature in Neoverse V1 and N2 tunings as well. > > ChangeLog: > 2021-10-18 Wilco Dijkstra > > * config/aarch64/aarch64.c (neoversev1_tunings): > Enable AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND. > (neoversen2_tunings):

[PATCH] AArch64: Enable fast shifts on Neoverse V1/N2

2021-10-18 Thread Wilco Dijkstra via Gcc-patches
Enable the fast shift feature in Neoverse V1 and N2 tunings as well. ChangeLog: 2021-10-18 Wilco Dijkstra * config/aarch64/aarch64.c (neoversev1_tunings): Enable AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND. (neoversen2_tunings): Likewise. --- diff --git

[PATCH] AArch64: Tune case-values-threshold

2021-10-18 Thread Wilco Dijkstra via Gcc-patches
Tune the case-values-threshold setting for modern cores. A value of 11 improves SPECINT2017 by 0.2% and reduces codesize by 0.04%. With -Os use value 8 which reduces codesize by 0.07%. Passes regress, OK for commit? ChangeLog: 2021-10-18 Wilco Dijkstra * config/aarch64/aarch64.c

[PATCH] C, C++, OpenMP: Add 'has_device_addr' clause to 'target' construct

2021-10-18 Thread Marcel Vollweiler
Hi, This patch adds the 'has_device_addr' clause to the OpenMP 'target' construct which was introduced in OpenMP 5.1: "The has_device_addr clause was added to the target construct to allow access to variables or array sections that already have a device address" (OpenMP 5.1 Specification, p.

Re: [PATCH] Ranger : Do not process abnormal ssa-names.

2021-10-18 Thread Andrew MacLeod via Gcc-patches
On 10/16/21 5:27 AM, Andrew Pinski wrote: On Fri, Oct 15, 2021 at 6:53 AM Andrew MacLeod via Gcc-patches wrote: I've been looking at the pathological time issue ranger has with the testcase from, uh.. PR 97623 I think. I've lost the details, but kept the file since it was showing

Re: [Patch][PR102281]do not add BUILTIN_CLEAR_PADDING for variables that are gimple registers.

2021-10-18 Thread Qing Zhao via Gcc-patches
> On Oct 18, 2021, at 10:36 AM, Jakub Jelinek wrote: > > On Mon, Oct 18, 2021 at 03:04:40PM +, Qing Zhao wrote: >> 2021-10-16 qing zhao >> >> * gimplify.c (gimplify_decl_expr): Do not add call to >> __BUILTIN_CLEAR_PADDING when a variable is a gimple register > > The builtin

Re: [PATCH v6] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2021-10-18 Thread Joseph Myers
On Sun, 17 Oct 2021, Raoni Fassina Firmino wrote: > First is the different arguments from the C99 functions. I think the > solution is a macro to correct this, like so: > > #define feclearexcept(excepts) \ > __builtin_feclearexcept(excepts, FE_DIVBYZERO, FE_INEXACT, \ >

Re: [Patch][PR102281]do not add BUILTIN_CLEAR_PADDING for variables that are gimple registers.

2021-10-18 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 18, 2021 at 03:04:40PM +, Qing Zhao wrote: > 2021-10-16 qing zhao > > * gimplify.c (gimplify_decl_expr): Do not add call to > __BUILTIN_CLEAR_PADDING when a variable is a gimple register The builtin is called __builtin_clear_padding, using __BUILTIN_CLEAR_PADDING

Re: [PATCH][i386] target: support spaces in target attribute.

2021-10-18 Thread Uros Bizjak via Gcc-patches
On Mon, Oct 18, 2021 at 1:23 PM Martin Liška wrote: > > On 10/11/21 13:17, Martin Liška wrote: > > On 10/4/21 23:02, Andrew Pinski wrote: > >> It might be useful to skip tabs for the same reason as spaces really. > > > > Sure, be my guest. > > > > Martin > > May I please ping this i386-specific

Re: [PATCH] Adjust testcase for O2 vectorization.

2021-10-18 Thread Martin Sebor via Gcc-patches
On 10/17/21 10:38 PM, Hongtao Liu wrote: On Fri, Oct 15, 2021 at 11:37 PM Martin Sebor wrote: On 10/14/21 1:11 AM, liuhongt wrote: Hi Kewen: Cound you help to verify if this patch fix those regressions for rs6000 port. As discussed in [1], this patch add xfail/target selector to those

Re: [PATCH v2 0/4] libffi: Sync with upstream

2021-10-18 Thread H.J. Lu via Gcc-patches
On Mon, Oct 18, 2021 at 8:04 AM David Edelsohn wrote: > > Hi, H.J. > > My colleague responded that GCC Go builds and works on AIX, but it > currently requires a special, custom version of GNU objcopy that adds > support for the types of features that Go requires to operate on AIX > XCOFF files.

[PATCH] PR target/102785: Correct addsub/subadd patterns on bfin.

2021-10-18 Thread Roger Sayle
This patch resolves PR target/102785 where my recent patch to constant fold saturating addition/subtraction exposed a latent bug in the bfin backend. The patterns used for blackfin's V2HI ssaddsub and sssubadd instructions had the indices/operations swapped. This was harmless until we started

[PATCH] i386: Fix ICE in ix86_print_opreand_address [PR 102761]

2021-10-18 Thread Uros Bizjak via Gcc-patches
2021-10-18 Uroš Bizjak PR target/102761 gcc/ChangeLog: * config/i386/i386.c (ix86_print_operand_address): Error out for non-address_operand asm operands. gcc/testsuite/ChangeLog: * gcc.target/i386/pr102761.c: New test. Boostrapped and regression tested on x86_64-linux-gnu

[Patch][PR102281]do not add BUILTIN_CLEAR_PADDING for variables that are gimple registers.

2021-10-18 Thread Qing Zhao via Gcc-patches
Hi, PR102281 -ftrivial-auto-var-init=zero causes ice https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 Exposed multiple issues in the current padding clearing implementation of -ftrivial-auto-var-init: A. should check is_gimple_reg before adding the call to __builtin_clear_padding;

Re: [PATCH v2 0/4] libffi: Sync with upstream

2021-10-18 Thread David Edelsohn via Gcc-patches
Hi, H.J. My colleague responded that GCC Go builds and works on AIX, but it currently requires a special, custom version of GNU objcopy that adds support for the types of features that Go requires to operate on AIX XCOFF files. Those changes have not yet been updated and contributed to GNU

[PATCH RFA] timevar: Add auto_cond_timevar class

2021-10-18 Thread Jason Merrill via Gcc-patches
The auto_timevar sentinel class for starting and stopping timevars was added in 2014, but doesn't work for the many uses of timevar_cond_start/stop in the C++ front end. So let's add one that does. This allows us to remove a lot of wrapper functions that were just used to call timevar_cond_stop

[pushed] c++: improve template/crash90.C

2021-10-18 Thread Jason Merrill via Gcc-patches
In r208350 I improved the diagnostic location of the initializer-list pedwarn in C++98 mode on crash90.C, but didn't adjust the testcase to verify the location, so reverting that change didn't break regression testing. gcc/testsuite/ChangeLog: * g++.dg/template/crash90.C: Check location

[PATCH] Apply TLC to vect_supportable_dr_alignment

2021-10-18 Thread Richard Biener via Gcc-patches
This fixes handling of the return value of vect_supportable_dr_alignment in multiple places. We should use the enum type and not int for storage and not auto-convert the enum return value to bool. It also commonizes the read/write path in vect_supportable_dr_alignment. Bootstrapped and tested

Re: [RFC] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-18 Thread Aldy Hernandez via Gcc-patches
On 10/18/21 3:41 PM, Aldy Hernandez wrote: I've been experimenting with reducing the total number of threading passes, and I'd like to see if there's consensus/stomach for altering the pipeline. Note, that the goal is to remove forward threader clients, not the other way around. So, we

[RFC] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-18 Thread Aldy Hernandez via Gcc-patches
The jump threading bits seem to have stabilized. The one or two open PRs can be fixed by the pending loop threading restrictions to loop rotation and loop headers. With all the pieces in play, we can finally explore altering the pipeline to reduce the jump threading passes. I know the jump

[RFC] Overflow check in simplifying exit cond comparing two IVs.

2021-10-18 Thread Jiufu Guo via Gcc-patches
With reference the discussions in: https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574334.html https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572006.html https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578672.html Base on the patches in above discussion, we may draft a patch to

Re: [PATCH][RFC] Introduce TREE_AOREFWRAP to cache ao_ref in the IL

2021-10-18 Thread Richard Biener via Gcc-patches
On Mon, 18 Oct 2021, Michael Matz wrote: > Hello, > > On Mon, 18 Oct 2021, Richard Sandiford wrote: > > > > (It's a really cute hack that works as a micro optimization, the question > > > is, do we really need to go there already, are all other less hacky > > > approaches not bringing similar

Re: [PATCH][RFC] Introduce TREE_AOREFWRAP to cache ao_ref in the IL

2021-10-18 Thread Michael Matz via Gcc-patches
Hello, On Mon, 18 Oct 2021, Richard Sandiford wrote: > > (It's a really cute hack that works as a micro optimization, the question > > is, do we really need to go there already, are all other less hacky > > approaches not bringing similar improvements? The cuter the hacks the > > less often

[PATCH] Reduce the number of aligned_access_p calls

2021-10-18 Thread Richard Biener via Gcc-patches
This uses the computed alignment scheme in vectorizable_store much like vectorizable_load does instead of re-querying it via aligned_access_p. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-10-18 Richard Biener * tree-vect-stmts.c (vectorizable_store): Use the

[PATCH] Remove redundant alignment scheme recomputation

2021-10-18 Thread Richard Biener via Gcc-patches
The following avoids the recomputation of the alignment scheme which is already fully determined by get_load_store_type. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-10-18 Richard Biener * tree-vect-stmts.c (vectorizable_store): Do not recompute alignment

[committed] openmp: Fix handling of numa_domains(1)

2021-10-18 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 15, 2021 at 12:26:34PM -0700, sunil.k.pandey wrote: > 4764049dd620affcd3e2658dc7f03a6616370a29 is the first bad commit > commit 4764049dd620affcd3e2658dc7f03a6616370a29 > Author: Jakub Jelinek > Date: Fri Oct 15 16:25:25 2021 +0200 > > openmp: Fix up handling of

[COMMITTED] Clone correct pass in class pass_thread_jumps_full.

2021-10-18 Thread Aldy Hernandez via Gcc-patches
The pass_thread_jumps_full pass was cloning the wrong pass. Committed as obvious. gcc/ChangeLog: * tree-ssa-threadbackward.c (class pass_thread_jumps_full): Clone corresponding pass. --- gcc/tree-ssa-threadbackward.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] 387-12.c: Require ia32 target instead of -m32

2021-10-18 Thread H.J. Lu via Gcc-patches
On x86-64, $ make check RUNTESTFLAGS="--target_board='unix{-m32,}'" can be used to test both 64-bit and 32-bit targets. Require ia32 target instead of explicit -m32 for 32-bit only test. * gcc.target/i386/387-12.c (dg-do compile): Require ia32. (dg-options): Remove -m32. ---

Re: [RFC PATCH 1/8] RISC-V: Minimal support of bitmanip extension

2021-10-18 Thread Kito Cheng
> > That's a good point, but ISA_SPEC_CLASS_FROZEN_2021 is hard to > > reference to which spec, so I would prefer to add a -misa-spec=2021 to > > align platform/profile spec, and then ISA_SPEC_CLASS_2021, and before > > RISC-V platform/profile spec has released, let keep > > ISA_SPEC_CLASS_NONE :p

[PATCH] c++: Don't reject calls through PMF during constant evaluation [PR102786]

2021-10-18 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase incorrectly rejects the c initializer, while in the s.*a case cxx_eval_* sees .__pfn reads etc., in the s.*::foo case get_member_function_from_ptrfunc creates expressions which use INTEGER_CSTs with type of pointer to METHOD_TYPE. And cxx_eval_constant_expression

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-18 Thread Richard Biener via Gcc-patches
On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > On Mon, 18 Oct 2021 at 17:10, Richard Biener wrote: > > > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > > > > > On Mon, 18 Oct 2021 at 16:18, Richard Biener wrote: > > > > > > > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > > > > > >

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-18 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 18 Oct 2021 at 17:10, Richard Biener wrote: > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > > > On Mon, 18 Oct 2021 at 16:18, Richard Biener wrote: > > > > > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > > > > > > > Hi Richard, > > > > As suggested in PR, I have attached WIP

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-18 Thread Richard Biener via Gcc-patches
On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > On Mon, 18 Oct 2021 at 16:18, Richard Biener wrote: > > > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > > > > > Hi Richard, > > > As suggested in PR, I have attached WIP patch that adds two patterns > > > to match.pd: > > > erfc(x) --> 1 -

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

2021-10-18 Thread Robin Dapp via Gcc-patches
Hi Richard, after giving it a second thought, and seeing that most of the changes to existing code are not strictly necessary anymore, I figured it could be easier not changing the current control flow too much like in the attached patch. The changes remaining are to "outsource" the

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-18 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 18 Oct 2021 at 16:18, Richard Biener wrote: > > On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > > > Hi Richard, > > As suggested in PR, I have attached WIP patch that adds two patterns > > to match.pd: > > erfc(x) --> 1 - erf(x) if canonicalize_math_p() and, > > 1 - erf(x) --> erfc(x)

Re: [PATCH][i386] target: support spaces in target attribute.

2021-10-18 Thread Martin Liška
On 10/11/21 13:17, Martin Liška wrote: On 10/4/21 23:02, Andrew Pinski wrote: It might be useful to skip tabs for the same reason as spaces really. Sure, be my guest. Martin May I please ping this i386-specific patch? Thanks, Martin

[aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-10-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch emits a more verbose diagnostic for target attribute that is an architecture extension needing a leading '+'. For the following test, void calculate(void) __attribute__ ((__target__ ("sve"))); With patch, the compiler now emits: 102376.c:1:1: error: arch extension ‘sve’

[PATCH] gcov: return proper exit code when error happens

2021-10-18 Thread Martin Liška
Hello. The patch records error codes when something serious happens during emission of GCOV reports. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I'm going to push the change. Thanks, Martin PR gcov-profile/102746 PR gcov-profile/102747

[PATCH] tree-optimization/102788 - avoid spurious bool pattern fails

2021-10-18 Thread Richard Biener via Gcc-patches
Bool pattern recog is required for correctness since vectorized compares otherwise produce -1 for true so any context where bool is used as value and not as condition or mask needs to be replaced with CMP ? 1 : 0. When we fail to find a vector type for the result of such use we may not simply

Re: [match.pd] PR83750 - CSE erf/erfc pair

2021-10-18 Thread Richard Biener via Gcc-patches
On Mon, 18 Oct 2021, Prathamesh Kulkarni wrote: > Hi Richard, > As suggested in PR, I have attached WIP patch that adds two patterns > to match.pd: > erfc(x) --> 1 - erf(x) if canonicalize_math_p() and, > 1 - erf(x) --> erfc(x) if !canonicalize_math_p(). > > This works to remove call to erfc for

Re: [SVE] [gimple-isel] PR93183 - SVE does not use neg as conditional

2021-10-18 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 18 Oct 2021 at 14:34, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c > > b/gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c > > index 4604365fbef..cedc5b7c549 100644 > > ---

Re: [RFC] More jump threading restrictions in the presence of loops.

2021-10-18 Thread Aldy Hernandez via Gcc-patches
On 10/17/21 3:32 AM, Jeff Law wrote: I think once we reach a consensus on the tests, this will be good to go. diff --git a/gcc/testsuite/gcc.dg/loop-8.c b/gcc/testsuite/gcc.dg/loop-8.c index 90ea1c45524..66318fc08dc 100644 --- a/gcc/testsuite/gcc.dg/loop-8.c +++

Re: [PATCH] tree-object-size: Avoid unnecessary processing of __builtin_object_size

2021-10-18 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 18, 2021 at 11:57:19AM +0200, Richard Biener via Gcc-patches wrote: > On Mon, Oct 18, 2021 at 6:25 AM Siddhesh Poyarekar > wrote: > > > > This is a minor cleanup to bail out early if the result of > > __builtin_object_size is not assigned to anything and avoid initializing > > the

Re: [RFC PATCH 1/8] RISC-V: Minimal support of bitmanip extension

2021-10-18 Thread Christoph Muellner
On Mon, Oct 18, 2021 at 10:48 AM Kito Cheng wrote: > > Hi Christoph: > > > I think this needs another specification class (there is a > > specification for the instructions and it is in public review). > > Proposal: ISA_SPEC_CLASS_FROZEN_2021 > > That's a good point, but

[match.pd] PR83750 - CSE erf/erfc pair

2021-10-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi Richard, As suggested in PR, I have attached WIP patch that adds two patterns to match.pd: erfc(x) --> 1 - erf(x) if canonicalize_math_p() and, 1 - erf(x) --> erfc(x) if !canonicalize_math_p(). This works to remove call to erfc for the following test: double f(double x) { double g(double,

Re: [PATCH] Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS.

2021-10-18 Thread Richard Biener via Gcc-patches
On Mon, Oct 18, 2021 at 10:54 AM Martin Liška wrote: > > The macros correspond 1:1 to an option flags and make it harder > to find all usages of the flags. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? Hmm, they were introduced on purpose -

Re: [PATCH][RFC] Introduce TREE_AOREFWRAP to cache ao_ref in the IL

2021-10-18 Thread Richard Sandiford via Gcc-patches
Michael Matz via Gcc-patches writes: > Hello, > > On Thu, 14 Oct 2021, Richard Biener wrote: > >> > So, at _this_ write-through of the email I think I like the above idea >> > best: make ao_ref be a tree (at least its storage, because it currently >> > is a one-member-function class), make

Re: [PATCH] tree-object-size: Avoid unnecessary processing of __builtin_object_size

2021-10-18 Thread Richard Biener via Gcc-patches
On Mon, Oct 18, 2021 at 6:25 AM Siddhesh Poyarekar wrote: > > This is a minor cleanup to bail out early if the result of > __builtin_object_size is not assigned to anything and avoid initializing > the object size arrays. OK. Thanks, Richard. > gcc/ChangeLog: > > * tree-object-size

Re: [r12-4457 Regression] FAIL: gfortran.dg/deferred_type_param_6.f90 -Os execution test on Linux/x86_64

2021-10-18 Thread Richard Biener via Gcc-patches
On Sat, Oct 16, 2021 at 8:24 PM Jan Hubicka via Gcc-patches wrote: > > Hi, > > > > FAIL: gfortran.dg/deferred_type_param_6.f90 -O1 execution test > > FAIL: gfortran.dg/deferred_type_param_6.f90 -Os execution test > Sorry for the breakage. This time it seems like bug in Fortran FE > which

Re: [PATCH] Ranger : Do not process abnormal ssa-names.

2021-10-18 Thread Richard Biener via Gcc-patches
On Fri, Oct 15, 2021 at 3:50 PM Andrew MacLeod wrote: > > I've been looking at the pathological time issue ranger has with the > testcase from, uh.. PR 97623 I think. I've lost the details, but > kept the file since it was showing unpleasant behaviour. > > Most of the time is spent in

[PATCH][GCC] arm: enable cortex-a710 CPU

2021-10-18 Thread Przemyslaw Wirkus via Gcc-patches
Hi, This patch is adding support for Cortex-A710 CPU [0]. [0] https://www.arm.com/products/silicon-ip-cpu/cortex-a/cortex-a710 OK for master? gcc/ChangeLog: * config/arm/arm-cpus.in (cortex-a710): New CPU. * config/arm/arm-tables.opt: Regenerate. *

[PATCH][GCC] arm: add armv9-a architecture to -march

2021-10-18 Thread Przemyslaw Wirkus via Gcc-patches
Hi, This patch is adding `armv9-a` to -march in Arm GCC. In this patch: + Add `armv9-a` to -march. + Update multilib with armv9-a and armv9-a+simd. After this patch three additional multilib directories are available: $ arm-none-eabi-gcc --print-multi-lib .; [...vanilla

Re: [PATCH] hardened conditionals

2021-10-18 Thread Richard Biener via Gcc-patches
On Fri, Oct 15, 2021 at 8:35 PM Alexandre Oliva wrote: > > On Oct 14, 2021, Richard Biener wrote: > > > Yeah, I think that eventually marking the operation we want to preserve > > (with volatile?) would be the best way. On GIMPLE that's difficult, > > it's easier on GENERIC (we can set

[PATCH][PUSHED] gcc-changelog: update error message location

2021-10-18 Thread Martin Liška
Hello. The patch improves location information for 'bad parentheses wrapping'. Pushed to master. Martin contrib/ChangeLog: * gcc-changelog/git_commit.py: Update location of 'bad parentheses wrapping'. * gcc-changelog/test_email.py: Test it. ---

Re: [SVE] [gimple-isel] PR93183 - SVE does not use neg as conditional

2021-10-18 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c > b/gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c > index 4604365fbef..cedc5b7c549 100644 > --- a/gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c > +++

Re: [RFC] Port git gcc-descr to Python

2021-10-18 Thread Martin Liška
On 10/12/21 10:59, Martin Liška wrote: Hello. There's a complete patch that implements both git gcc-descr and gcc-undesrc and sets corresponding git aliases to use them. Ready to be installed? Thanks, Martin All right, so Jakub told me at IRC that we doesn't support porting to Python.

Re: [Patch][GCN] [GCC 11] Backport GCN with LLVM-MC 13 linker fixes to GCC 11

2021-10-18 Thread Andrew Stubbs
This is fine by me. As I said in my email on the 15th, LLVM 13 is still not considered safe to use. The ICE you encountered is a real problem that will affect real users. I expect to work on a solution for that soon. Andrew On 16/10/2021 21:41, Tobias Burnus wrote: This patch is mostly

[PATCH] Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS.

2021-10-18 Thread Martin Liška
The macros correspond 1:1 to an option flags and make it harder to find all usages of the flags. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/c-family/ChangeLog: * c-gimplify.c (genericize_c_loop): Use option

Re: [RFC PATCH 1/8] RISC-V: Minimal support of bitmanip extension

2021-10-18 Thread Kito Cheng
Hi Christoph: > I think this needs another specification class (there is a > specification for the instructions and it is in public review). > Proposal: ISA_SPEC_CLASS_FROZEN_2021 That's a good point, but ISA_SPEC_CLASS_FROZEN_2021 is hard to reference to which spec, so I would prefer to add a

[PATCH] tree-optimization/102798 - avoid copying PTA info to old SSA names

2021-10-18 Thread Richard Biener via Gcc-patches
The vectorizer duplicates pointer-info to created pointer bases but it has to avoid changing points-to info on existing SSA names because there's now flow-sensitive info in there (pt->pt_null as set from VRP). Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed to trunk sofar. Richard.

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-18 Thread Aldy Hernandez via Gcc-patches
On 10/18/21 12:52 AM, Jeff Law wrote: On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patches wrote: The following patch converts the strlen pass from evrp to ranger, leaving DOM as the last remaining user. So is there any reason why we can't convert DOM as well?   DOM's use of EVRP is pretty

Re: [PATCH 1/2] arm: add arm bti pass

2021-10-18 Thread Andrea Corallo via Gcc-patches
Andrea Corallo via Gcc-patches writes: > Hi all, > > this patch is part of a series that enables Armv8.1-M in GCC and adds > Branch Target Identification Mechanism [1]. > > This patch moves and generalize the Aarch64 "bti" pass so it can be > used also by the Arm backend. > > The pass iterates

[PATCH][PUSHED] Remove unused but set variables.

2021-10-18 Thread Martin Liška
Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Pushed to master as obvious. Reported by clang13 -Wunused-but-set-variable: gcc/ChangeLog: * dbgcnt.c (dbg_cnt_process_opt): Remove unused but set variable. * gcov.c (get_cycles_count): Likewise. *

[PATCH] c++: Diagnose taking address of an immediate member function [PR102753]

2021-10-18 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs, because while we have in cp_build_addr_expr_1 diagnostics for taking address of an immediate function (and as an exception deal with build_address from immediate invocation), I forgot to diagnose taking address of a member function which is done in a different

[PATCH] gcc: implement AIX-style constructors

2021-10-18 Thread CHIGOT, CLEMENT via Gcc-patches
AIX linker now supports constructors and destructors detection. For such functions to be detected, their name must starts with __sinit or __sterm. and -bcdtors must be passed to linker calls. It will create "_cdtors" symbol which can be used to launch the initialization. This patch creates a new

Re: [Patch] libgomp.texi: Update OMP_PLACES

2021-10-18 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 18, 2021 at 09:22:51AM +0200, Tobias Burnus wrote: > This patch updates the OMP_PLACES description for the recent > OpenMP 5.1 changes. > > OK? > > I actually wonder when/whether the spec reference > should be updated to OpenMP 5.1 or an additional > reference to it should be added.

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-18 Thread Aldy Hernandez via Gcc-patches
On 10/18/21 12:49 AM, Jeff Law wrote: On 10/15/2021 4:39 AM, Aldy Hernandez wrote: On 10/15/21 2:47 AM, Andrew MacLeod wrote: On 10/14/21 6:07 PM, Martin Sebor via Gcc-patches wrote: On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: We seem to be passing a lot of context

  1   2   >