Re: [PATCH v2 1/2] libstdc++: Implement more maintainable header

2023-08-16 Thread David Edelsohn via Gcc-patches
Was the dependency added to the dependencies in contrib/gcc_update? Otherwise the timestamp can get out of sync in a Git checkout. Thanks, David On Wed, Aug 16, 2023 at 6:20 PM Jonathan Wakely wrote: > On Wed, 16 Aug 2023 at 22:56, Jonathan Wakely wrote: > > > > On Wed, 16 Aug 2023 at 22:39,

Re: [PATCH v2 1/2] libstdc++: Implement more maintainable header

2023-08-16 Thread David Edelsohn via Gcc-patches
Hi, Arsen This patch broke bootstrap because it has introduced a new GCC build requirement for autogen that is not a previous requirement to build GCC. Previously the repository has included post-processed files. +# AutoGen . +.PHONY: update-version +update-version: + cd ${bits_srcdir} &&

Re: [RFC] GCC Security policy

2023-08-15 Thread David Edelsohn via Gcc-patches
On Tue, Aug 15, 2023 at 7:07 PM Alexander Monakov wrote: > > On Tue, 15 Aug 2023, Siddhesh Poyarekar wrote: > > > > Thanks, this is nicer (see notes below). My main concern is that we > > > shouldn't pretend there's some method of verifying that arbitrary > source > > > code is "safe" to pass to

Re: [RFC] GCC Security policy

2023-08-11 Thread David Edelsohn via Gcc-patches
On Wed, Aug 9, 2023 at 1:33 PM Siddhesh Poyarekar wrote: > On 2023-08-08 10:30, Siddhesh Poyarekar wrote: > >> Do you have a suggestion for the language to address libgcc, > >> libstdc++, etc. and libiberty, libbacktrace, etc.? > > > > I'll work on this a bit and share a draft. > > Hi David, > >

Re: [RFC] GCC Security policy

2023-08-09 Thread David Edelsohn via Gcc-patches
On Wed, Aug 9, 2023 at 1:33 PM Siddhesh Poyarekar wrote: > On 2023-08-08 10:30, Siddhesh Poyarekar wrote: > >> Do you have a suggestion for the language to address libgcc, > >> libstdc++, etc. and libiberty, libbacktrace, etc.? > > > > I'll work on this a bit and share a draft. > > Hi David, > >

Re: [RFC] GCC Security policy

2023-08-08 Thread David Edelsohn via Gcc-patches
On Tue, Aug 8, 2023 at 1:36 PM Ian Lance Taylor wrote: > On Tue, Aug 8, 2023 at 7:37 AM Jakub Jelinek wrote: > > > > BTW, I think we should perhaps differentiate between production ready > > libraries (e.g. libgcc, libstdc++, libgomp, libatomic, libgfortran, > libquadmath, > > libssp) vs. e.g.

Re: [RFC] GCC Security policy

2023-08-08 Thread David Edelsohn via Gcc-patches
On Tue, Aug 8, 2023 at 10:07 AM Siddhesh Poyarekar wrote: > On 2023-08-08 10:04, Richard Biener wrote: > > On Tue, Aug 8, 2023 at 3:35 PM Ian Lance Taylor wrote: > >> > >> On Tue, Aug 8, 2023 at 6:02 AM Jakub Jelinek via Gcc-patches > >> wrote: > >>> > >>> On Tue, Aug 08, 2023 at 02:52:57PM

[RFC] GCC Security policy

2023-08-07 Thread David Edelsohn via Gcc-patches
FOSS Best Practices recommends that projects have an official Security policy stated in a SECURITY.md or SECURITY.txt file at the root of the repository. GLIBC and Binutils have added such documents. Appended is a prototype for a Security policy file for GCC based on the Binutils document

Re: [PATCH] match.pd: Implement missed optimization (~X | Y) ^ X -> ~(X & Y) [PR109986]

2023-07-25 Thread David Edelsohn via Gcc-patches
Hi, Drew Thanks for addressing this missed optimization. The testcase includes an incorrect assumption: signed char, which causes the testcase to fail on PowerPC. Should the testcase be updated to specify signed char in the function signatures or should -fsigned-char be added to the command

Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-13 Thread David Edelsohn via Gcc-patches
On Tue, Jun 13, 2023 at 2:16 PM Segher Boessenkool wrote: > > Hi! > > On Tue, Jun 13, 2023 at 10:15:49AM +0800, Jiufu Guo wrote: > > David Edelsohn writes: > > > > > > This definitely seems to be a better solution. > > > > > > The TARGET_CONST_ANCHOR change should not be part of this patch.

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-13 Thread David Edelsohn via Gcc-patches
On Mon, Jun 12, 2023 at 11:30 PM Jiufu Guo wrote: > > > Hi David, > > David Edelsohn writes: > > On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote: > > > > Hi, > > > > This patch checks if a constant is possible to be rotated to/from a > > positive > > or negative value from "li". If so, we

Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-12 Thread David Edelsohn via Gcc-patches
Hi, Jiufu This definitely seems to be a better solution. The TARGET_CONST_ANCHOR change should not be part of this patch. Also there is no ChangeLog for the patch. This generally looks correct and consistent with other ports. I want to give Segher a chance to double check it, if he wishes.

[PATCH, AIX] Debugging does not require a stack frame.

2023-06-11 Thread David Edelsohn via Gcc-patches
The rs6000 port has allocated a stack frame when debugging is enabled on AIX since the earliest versions of the port. Apparently the earliest versions of the debuggers for AIX had difficulty with stackless frames. Both AIX DBX and GDB support stackless frames on AIX, and IBM XLC, OpenXL and LLVM

Re: [PATCH] rs6000: Guard __builtin_{un, }pack_vector_int128 with vsx [PR109932]

2023-06-11 Thread David Edelsohn via Gcc-patches
On Tue, Jun 6, 2023 at 5:19 AM Kewen.Lin wrote: > Hi, > > As PR109932 shows, builtins __builtin_{un,}pack_vector_int128 > should be guarded under vsx rather than power7, as their > corresponding bif patterns have the conditions TARGET_VSX > and VECTOR_MEM_ALTIVEC_OR_VSX_P (V1TImode). This patch

Re: [PATCH] rs6000: Don't use TFmode for 128 bits fp constant in toc [PR110011]

2023-06-10 Thread David Edelsohn via Gcc-patches
On Tue, Jun 6, 2023 at 5:20 AM Kewen.Lin wrote: > Hi, > > As PR110011 shows, when encoding 128 bits fp constant into > toc, we adopts REAL_VALUE_TO_TARGET_LONG_DOUBLE which is > to find the first float mode with LONG_DOUBLE_TYPE_SIZE > bits of precision, it would be TFmode here. But the 128 >

Re: [PATCH 4/4] rs6000: build constant via li/lis;rldic

2023-06-10 Thread David Edelsohn via Gcc-patches
On Wed, Jun 7, 2023 at 9:56 PM Jiufu Guo wrote: > Hi, > > This patch checks if a constant is possible to be built by "li;rldic". > We only need to take care of "negative li", other forms do not need to > check. > For example, "negative lis" is just a "negative li" with an additional > shift. > >

Re: [PATCH 3/4] rs6000: build constant via li/lis;rldicl/rldicr

2023-06-10 Thread David Edelsohn via Gcc-patches
On Wed, Jun 7, 2023 at 9:56 PM Jiufu Guo wrote: > Hi, > > This patch checks if a constant is possible left/right cleaned on a rotated > value from a negative value of "li/lis". If so, we can build the constant > through "li/lis ; rldicl/rldicr". > > Bootstrap and regtest pass on ppc64{,le}. >

Re: [PATCH 2/4] rs6000: build constant via lis;rotldi

2023-06-10 Thread David Edelsohn via Gcc-patches
On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote: > Hi, > > This patch checks if a constant is possible to be rotated to/from a > negative > value from "lis". If so, we could use "lis;rotldi" to build it. > The positive value of "lis" does not need to be analyzed. Because if a > constant can be

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-10 Thread David Edelsohn via Gcc-patches
On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote: > Hi, > > This patch checks if a constant is possible to be rotated to/from a > positive > or negative value from "li". If so, we could use "li;rotldi" to build it. > > Bootstrap and regtest pass on ppc64{,le}. > Is this ok for trunk? > > BR, >

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-02 Thread David Edelsohn via Gcc-patches
Hi, Jiufu * config/rs6000/rs6000.cc (can_be_rotated_to_possitive_li): New function. (can_be_rotated_to_negative_li): New function. (can_be_built_by_li_and_rotldi): New function. (rs6000_emit_set_long_const): Call can_be_built_by_li_and_rotldi. In English the word

Re: ping^^: [PATCH] rs6000: Enable const_anchor for 'addi'

2023-05-31 Thread David Edelsohn via Gcc-patches
On Tue, May 30, 2023 at 11:00 PM Jiufu Guo wrote: > > Gentle ping... > > Jiufu Guo via Gcc-patches writes: > > > Gentle ping... > > > > Jiufu Guo via Gcc-patches writes: > > > >> Hi, > >> > >> I'm thinking that we may enable this patch for stage1, so ping it. > >>

Re: [PATCH 7/7] Expand directly for single bit test

2023-05-21 Thread David Edelsohn via Gcc-patches
On Sun, May 21, 2023 at 11:25 AM Andrew Pinski wrote: > On Sun, May 21, 2023 at 11:17 AM David Edelsohn via Gcc-patches > wrote: > > > > Hi, Andrew > > > > Thanks for this series of patches to improve do_store_flag. > Unfortunately > > this specific pat

Re: [PATCH 7/7] Expand directly for single bit test

2023-05-21 Thread David Edelsohn via Gcc-patches
Hi, Andrew Thanks for this series of patches to improve do_store_flag. Unfortunately this specific patch in the series has caused a bootstrap failure on powerpc-aix. I bisected this failure to this specific patch. Note that I am building as 32 bit, so this could be a specific issue about bit

Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread David Edelsohn via Gcc-patches
On Fri, May 5, 2023 at 11:38 AM Tamar Christina wrote: > > -Original Message- > > From: Jakub Jelinek > > Sent: Friday, May 5, 2023 4:33 PM > > To: Tamar Christina > > Cc: Jeff Law ; David Edelsohn >; > > GCC Patches > > Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and

Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread David Edelsohn via Gcc-patches
This patch has broken GCC bootstrap on AIX. It appears to rely upon, or complain about, the command "seq": /nasfarm/edelsohn/install/GCC12/bin/g++ -std=c++11 -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format

Re: [PATCH, wwwdocs] readings: Update AIX linker links

2023-01-30 Thread David Edelsohn via Gcc-patches
On Mon, Jan 30, 2023 at 4:52 PM Gerald Pfeifer wrote: > Hi David, > > the noticed the links to the AIX 4.3 and AIX 5L docs were broken and could > not find a good replacement, though I did find one for AIX 7.2. > > How about the patch below? > Hi, Gerald That change is fine with me. Thanks,

Re: [PATCH RFC] c++: implement P1492 contracts

2022-11-21 Thread David Edelsohn via Gcc-patches
This patch broke bootstrap on AIX due to its use of strchrnul(). It is an extension available in Linux, but not all targets. /src/src/gcc/cp/contracts.cc:213:21: error: 'strchrnul' was not declared in this scope; did you mean 'strchr'? 213 | size_t role_len = strchrnul (role, ':') - role;

Re: [PATCHv2, rs6000] Enable have_cbranchcc4 on rs6000

2022-11-18 Thread David Edelsohn via Gcc-patches
On Fri, Nov 18, 2022 at 7:20 AM Segher Boessenkool < seg...@kernel.crashing.org> wrote: > On Fri, Nov 18, 2022 at 02:35:30PM +0800, HAO CHEN GUI wrote: > > 在 2022/11/17 21:24, David Edelsohn 写道: > > > Why are you using zero_constant predicate instead of matching > (const_int 0) for operand 2? > >

Re: [PATCHv2, rs6000] Enable have_cbranchcc4 on rs6000

2022-11-17 Thread David Edelsohn via Gcc-patches
On Thu, Nov 17, 2022 at 1:39 AM HAO CHEN GUI wrote: > Hi, > The patch enables have_cbrnachcc4 which is a flag in ifcvt.cc to > indicate if branch by CC bits is invalid or not. The new expand pattern > "cbranchcc4" is created which intend to match the pattern defined in > "*cbranch",

Re: [rs6000, patch] Enable have_cbranchcc4 on rs6000

2022-11-16 Thread David Edelsohn via Gcc-patches
Hao cbranchcc4 is a named pattern and requires a specific operand ordering. If you change *cbranch to cbranchcc4, you must change the order of the operands, not a quick and dirty hack to *cbranch. Also, you should change *cbranch_2insn and *creturn as well so that all of the patterns are

Re: [rs6000, patch] Enable have_cbranchcc4 on rs6000

2022-11-15 Thread David Edelsohn via Gcc-patches
On Tue, Nov 15, 2022 at 9:32 PM HAO CHEN GUI wrote: > Hi, > The patch enables have_cbrnachcc4 which is a flag in ifcvt.cc to > indicate if branch by CC bits is invalid or not. As rs6000 already has > "*cbranch" insn which does branching according to CC bits, the flag > should be enabled and

Re: [PATCH V2] Enable small loop unrolling for O2

2022-11-09 Thread David Edelsohn via Gcc-patches
> This patch does not change rs6000/s390 since I don't have machines to > test them, but I suppose the default behavior is the same since they > enable flag_unroll_loops at O2. There are Power (rs6000) systems in the Compile Farm. Trial Linux on Z (s390x) VMs are available through the Linux

Re: [PATCH] libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]

2022-10-11 Thread David Edelsohn via Gcc-patches
This patch seems to have broken bootstrap on AIX. It seems to assume methods that aren't guaranteed to be defined. Thanks, David libtool: compile: /tmp/GCC/./gcc/xgcc -B/tmp/GCC/./gcc/ -B/nasfarm/edelsohn/ins tall/GCC/powerpc-ibm-aix7.2.5.0/bin/ -B/nasfarm/edelsohn/install/GCC/powerpc-ibm

Re: [PATCH] Set discriminators for call stmts on the same line within the same basic block

2022-10-10 Thread David Edelsohn via Gcc-patches
This patch causes a bootstrap comparison failure on AIX. It apparently does not cause a failure on PPC64BE Linux with the same ABI, so I suspect that the failure may be related to the way that function aliases are implemented on AIX, which doesn't have ELF symbol alias semantics. "This change

Re: [PATCH] Avoid depending on destructor order

2022-09-23 Thread David Edelsohn via Gcc-patches
On Fri, Sep 23, 2022 at 10:12 AM Thomas Neumann wrote: > > > > +static const bool in_shutdown = false; > > > > I'll let Jason or others decide if this is the right solution. It seems > > that in_shutdown also could be declared outside the #ifdef and > > initialized as "false". > > sure,

Re: [PATCH] Avoid depending on destructor order

2022-09-23 Thread David Edelsohn via Gcc-patches
On Fri, Sep 23, 2022 at 9:38 AM Thomas Neumann wrote: > > This patch broke bootstrap on AIX and probably other targets. > > > > #ifdef ATOMIC_FDE_FAST_PATH > > #include "unwind-dw2-btree.h" > > > > static struct btree registered_frames; > > static bool in_shutdown; > > ... > > #else > > > >

Re: [PATCH] Avoid depending on destructor order

2022-09-23 Thread David Edelsohn via Gcc-patches
On Fri, Sep 23, 2022 at 9:38 AM Thomas Neumann wrote: > > This patch broke bootstrap on AIX and probably other targets. > > > > #ifdef ATOMIC_FDE_FAST_PATH > > #include "unwind-dw2-btree.h" > > > > static struct btree registered_frames; > > static bool in_shutdown; > > ... > > #else > > > >

Re: [PATCH] Restore XCOFF for DWARF on AIX.

2022-09-07 Thread David Edelsohn via Gcc-patches
On Wed, Sep 7, 2022 at 7:45 AM Martin Liška wrote: > Hi. > > The patch restores DWARF support for AIX target where XCOFF file container > is used. > Verified before and after the patch, gcc119 machine (AIX) could not build > any run-time library, > now it can. > > Ready to be installed? >

Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-06 Thread David Edelsohn via Gcc-patches
* dwarf2out.cc (XCOFF_DEBUGGING_INFO): Likewise. (HAVE_XCOFF_DWARF_EXTRAS): Likewise. (output_fde): Likewise. (output_call_frame_info): Likewise. (have_macinfo): Likewise. (add_AT_loc_list): Likewise. (add_AT_view_list): Likewise.

Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-06 Thread David Edelsohn via Gcc-patches
I fully support the plan to remove stabs support, but this patch broke bootstrap on AIX. It seems rather bad policy to remove support for a feature without ensuring that the removal does not negatively impact the targets touched by the patch. I should have been explicitly copied on these patches

Re: [PATCH, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions

2022-08-26 Thread David Edelsohn via Gcc-patches
On Thu, Aug 25, 2022 at 10:42 PM HAO CHEN GUI wrote: > > Hi David, > > On 25/8/2022 下午 10:01, David Edelsohn wrote: > > On Thu, Aug 25, 2022 at 1:22 AM Kewen.Lin wrote: > >> > >> on 2022/8/25 11:37, HAO CHEN GUI wrote: > >>> Hi, > >>> > >>> On 24/8/2022 下午 1:24, Kewen.Lin wrote: > Could you

Re: [PATCH, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions

2022-08-25 Thread David Edelsohn via Gcc-patches
On Thu, Aug 25, 2022 at 1:22 AM Kewen.Lin wrote: > > on 2022/8/25 11:37, HAO CHEN GUI wrote: > > Hi, > > > > On 24/8/2022 下午 1:24, Kewen.Lin wrote: > >> Could you try to test with dg-options "-mdejagnu-cpu=power9 -mpowerpc64" > >> all the time, but still > >> having that has_arch_ppc64 effective

Re: [PATCH v4, rs6000] Add V1TI into vector comparison expand [PR103316]

2022-05-26 Thread David Edelsohn via Gcc-patches
On Thu, May 26, 2022 at 1:52 AM Kewen.Lin wrote: > > Hi Haochen, > > on 2022/5/26 13:30, HAO CHEN GUI wrote: > > Kewen, > > Thanks so much for your advice. Just one question about effective-target. > > > > For the test cases, it needs both power10_ok and int128 support. I saw > > some > >

Re: [PATCH] testsuite: Add test case for pack/unpack bifs at soft-float [PR105334]

2022-04-27 Thread David Edelsohn via Gcc-patches
On Wed, Apr 27, 2022 at 8:22 AM Segher Boessenkool wrote: > > Hi! > > Thank you for doing this testcase. > > On Wed, Apr 27, 2022 at 06:29:07PM +0800, Kewen.Lin wrote: > > As discussed in PR105334, this patch is to add the test coverage for > > the two recent fixes r12-8091 and r12-8226 from

Re: [PATCH] ppc: testsuite: require target effectively [PR104253]

2022-04-11 Thread David Edelsohn via Gcc-patches
On Mon, Apr 11, 2022 at 10:53 AM Alexandre Oliva wrote: > > > The testcase was missing dg- before require-effective-target. > > While at that, I'm also pruning the excess-error warning I got when > the test failed to be disabled because of the above. I suppose it > might be useful for some

Re: [PATCH] rs6000: Skip overload instances with NULL fntype [PR104967]

2022-03-23 Thread David Edelsohn via Gcc-patches
On Wed, Mar 23, 2022 at 5:33 AM Kewen.Lin wrote: > > Hi, > > As shown in PR104967, for some overload built-in function instance, > if it requires a date type which isn't defined on the target, its > fntype would be initialized as NULL. This patch is to consider > this possibility in function

Re: [PATCH]rs6000: avoid peeking eof after __vector keyword

2022-03-21 Thread David Edelsohn via Gcc-patches
On Mon, Mar 21, 2022 at 5:13 AM Jiufu Guo wrote: > > Hi! > > There is a rare corner case: where __vector is followed only with ";" > and near the end of the file. > > Like the case in PR101168: > using vdbl = __vector double; > #define BREAK 1 > > For this case, "__vector double" is not followed

Re: [PATCH] libgcc: allow building float128 libraries on FreeBSD

2022-03-03 Thread David Edelsohn via Gcc-patches
I don't have any objection, but the patch is FreeBSD-specific. You are sending the patch from the FreeBSD organization, but I don't know the authority structure within the organization. Andreas Tobler is the FreeBSD maintainer for GCC, but I don't know his current status. Thanks, David On

Re: [PATCH v3, rs6000] Enable absolute jump table for PPC AIX and Linux

2022-03-01 Thread David Edelsohn via Gcc-patches
On Tue, Mar 1, 2022 at 12:41 AM HAO CHEN GUI wrote: > > Hi, >This patch enables absolute jump tables on PPC AIX and Linux. For AIX, the > jump > table is placed in data section. For Linux, it is placed in RELRO section when > relocation is needed. > >Bootstrapped and tested on AIX,Linux

Re: [PATCH, 11 backport] rs6000: Fix LE code gen for vec_cnt[lt]z_lsbb [PR95082]

2022-02-10 Thread David Edelsohn via Gcc-patches
On Thu, Feb 10, 2022 at 4:17 PM Bill Schmidt wrote: > > Hi! > > On 2/10/22 2:50 PM, Segher Boessenkool wrote: > > On Thu, Feb 10, 2022 at 12:22:28PM -0600, Bill Schmidt wrote: > >> This is a backport from mainline 3f30f2d1dbb3228b8468b26239fe60c2974ce2ac. > >> These built-ins were misimplemented

Re: [PATCH] rs6000: Fix up vspltis_shifted [PR102140]

2022-02-08 Thread David Edelsohn via Gcc-patches
On Tue, Feb 8, 2022 at 12:25 PM Jakub Jelinek wrote: > > Hi! > > The following testcase ICEs, because > (const_vector:V4SI [ > (const_int 0 [0]) repeated x3 > (const_int -2147483648 [0x8000]) > ]) > is recognized as valid

Re: [PATCH] testsuite: Fix up testsuite/gcc.c-torture/execute/builtins/lib/chk.c for powerpc [PR104380]

2022-02-07 Thread David Edelsohn via Gcc-patches
On Mon, Feb 7, 2022 at 8:20 AM Jakub Jelinek wrote: > > On Fri, Feb 04, 2022 at 12:00:57PM -0500, David Edelsohn via Gcc-patches > wrote: > > > The following testcase FAILs when configured with > > > --with-long-double-format=ieee . Only happens in the -std=c* mode

Re: [PATCH] rs6000: Fix up -D_FORTIFY_SOURCE* with -mabi=ieeelongdouble [PR104380]

2022-02-04 Thread David Edelsohn via Gcc-patches
On Fri, Feb 4, 2022 at 11:58 AM Jakub Jelinek wrote: > > Hi! > > The following testcase FAILs when configured with > --with-long-double-format=ieee . Only happens in the -std=c* modes, not the > GNU modes; while the glibc headers have __asm redirects of > vsnprintf and __vsnprinf_chk to

Re: [PATCH 0/3] Enable pointer_query caching throughout.

2022-02-03 Thread David Edelsohn via Gcc-patches
On Thu, Feb 3, 2022 at 6:09 PM Martin Sebor wrote: > > On 2/3/22 15:56, David Edelsohn wrote: > > This series of patches has exploded memory usage and I can no longer > > bootstrap GCC on AIX. > > > > As with the Ranger problem exposed by Aldy's patch last September, > > something is not freeing

Re: [PATCH 0/3] Enable pointer_query caching throughout.

2022-02-03 Thread David Edelsohn via Gcc-patches
This series of patches has exploded memory usage and I can no longer bootstrap GCC on AIX. As with the Ranger problem exposed by Aldy's patch last September, something is not freeing memory. Even on systems where GCC still bootstrap, this excessive memory usage severely damages GCC compile

Re: [PATCH] rs6000: Fix up #include or [PR104239]

2022-01-26 Thread David Edelsohn via Gcc-patches
On Wed, Jan 26, 2022 at 3:45 PM Jakub Jelinek wrote: > > Hi! > > r12-4717-g7d37abedf58d66 added immintrin.h and x86gprintrin.h headers > to rs6000, these headers are on x86 standalone headers that various > programs include directly rather than including them through > . > Unfortunately, for that

Re: [PATCH] Disable -fsplit-stack support on non-glibc targets

2022-01-25 Thread David Edelsohn via Gcc-patches
This patch broke bootstrap on AIX. It may have broken Darwin. I have applied the following patch. AIX doesn't need to distinguish between different Linux libc implementations. Bootstrapped on powerpc-ibm-aix7.2.3.0 Thanks, David aix: AIX is not GLIBC. A recent patch added tests for

Re: Ping: [PATCH] PR 103763, Fix fold-vec-splat-floatdouble on power10.

2022-01-21 Thread David Edelsohn via Gcc-patches
On Fri, Jan 21, 2022 at 2:56 PM Michael Meissner wrote: > > Ping patch > https://gcc.gnu.org/pipermail/gcc-patches/2022-January/587924.html > > | Date: Fri, 7 Jan 2022 16:05:53 -0500 > | From: Michael Meissner > | Subject: [PATCH] PR 103763, Fix fold-vec-splat-floatdouble on power10. > |

Re: [PATCH v2, rs6000] Add a combine pattern for CA minus one [PR95737]

2022-01-20 Thread David Edelsohn via Gcc-patches
On Thu, Jan 20, 2022 at 2:36 AM HAO CHEN GUI wrote: > > Hi, >This patch adds a combine pattern for "CA minus one". As CA only has two > values (0 or 1), we could convert following pattern > (sign_extend:DI (plus:SI (reg:SI 98 ca) > (const_int -1 [0x]

Re: [PATCH, rs6000] Add a combine pattern for CA minus one [PR95737]

2022-01-19 Thread David Edelsohn via Gcc-patches
On Wed, Jan 19, 2022 at 2:12 AM HAO CHEN GUI wrote: > > Hi, >This patch adds a combine pattern for "CA minus one". As CA only has two > values (0 or 1), we could convert following pattern > (sign_extend:DI (plus:SI (reg:SI 98 ca) > (const_int -1 [0x]

Re: [PATCH, rs6000] Add a combine pattern for CA minus one [PR95737]

2022-01-19 Thread David Edelsohn via Gcc-patches
On Wed, Jan 19, 2022 at 2:12 AM HAO CHEN GUI wrote: > > Hi, >This patch adds a combine pattern for "CA minus one". As CA only has two > values (0 or 1), we could convert following pattern > (sign_extend:DI (plus:SI (reg:SI 98 ca) > (const_int -1 [0x]

Re: [PATCH] libstdc++: Implement C++20 atomic and atomic

2022-01-18 Thread David Edelsohn via Gcc-patches
This patch introduced new AIX testsuite failures. PR libstdc++/104101 Thanks, David

Re: [PATCH] rs6000: Use known constant for GET_MODE_NUNITS and similar

2022-01-14 Thread David Edelsohn via Gcc-patches
On Fri, Jan 14, 2022 at 5:42 AM Kewen.Lin wrote: > > on 2022/1/13 下午11:15, David Edelsohn wrote: > > On Thu, Jan 13, 2022 at 7:40 AM Kewen.Lin wrote: > >> > >> Hi David, > >> > >> on 2022/1/13 上午11:12, David Edelsohn wrote: > >>> On Wed, Jan 12, 2022 at 8:56 PM Kewen.Lin wrote: > >

Re: [PATCH] rs6000: Fix constraint v with rs6000_constraints[RS6000_CONSTRAINT_v]

2022-01-13 Thread David Edelsohn via Gcc-patches
On Thu, Jan 13, 2022 at 7:28 AM Kewen.Lin wrote: > > on 2022/1/13 上午11:56, Kewen.Lin via Gcc-patches wrote: > > on 2022/1/13 上午11:44, David Edelsohn wrote: > >> On Wed, Jan 12, 2022 at 10:38 PM Kewen.Lin wrote: > >>> > >>> Hi David, > >>> > >>> on 2022/1/13 上午11:07, David Edelsohn wrote: >

Re: [PATCH] rs6000: Use known constant for GET_MODE_NUNITS and similar

2022-01-13 Thread David Edelsohn via Gcc-patches
On Thu, Jan 13, 2022 at 7:40 AM Kewen.Lin wrote: > > Hi David, > > on 2022/1/13 上午11:12, David Edelsohn wrote: > > On Wed, Jan 12, 2022 at 8:56 PM Kewen.Lin wrote: > >> > >> Hi, > >> > >> This patch is to clean up some codes with GET_MODE_UNIT_SIZE or > >> GET_MODE_NUNITS, which can use known

Re: [PATCH] rs6000: Fix constraint v with rs6000_constraints[RS6000_CONSTRAINT_v]

2022-01-12 Thread David Edelsohn via Gcc-patches
On Wed, Jan 12, 2022 at 10:38 PM Kewen.Lin wrote: > > Hi David, > > on 2022/1/13 上午11:07, David Edelsohn wrote: > > On Wed, Jan 12, 2022 at 8:56 PM Kewen.Lin wrote: > >> > >> Hi, > >> > >> This patch is to fix register constraint v with > >> rs6000_constraints[RS6000_CONSTRAINT_v] instead of

Re: [PATCH] rs6000: Use known constant for GET_MODE_NUNITS and similar

2022-01-12 Thread David Edelsohn via Gcc-patches
On Wed, Jan 12, 2022 at 8:56 PM Kewen.Lin wrote: > > Hi, > > This patch is to clean up some codes with GET_MODE_UNIT_SIZE or > GET_MODE_NUNITS, which can use known constant instead. I'll let Segher decide, but often the additional code is useful self-documentation instead of magic constants. Or

Re: [PATCH] rs6000: Fix constraint v with rs6000_constraints[RS6000_CONSTRAINT_v]

2022-01-12 Thread David Edelsohn via Gcc-patches
On Wed, Jan 12, 2022 at 8:56 PM Kewen.Lin wrote: > > Hi, > > This patch is to fix register constraint v with > rs6000_constraints[RS6000_CONSTRAINT_v] instead of ALTIVEC_REGS, > just like some other existing register constraints with > RS6000_CONSTRAINT_*. > > I happened to see this and hope it's

Re: [PATCH, rs6000] Enable absolute jump table by default

2022-01-12 Thread David Edelsohn via Gcc-patches
On Wed, Jan 12, 2022 at 8:40 PM HAO CHEN GUI wrote: > > Hi David, > > On 12/1/2022 下午 10:44, David Edelsohn wrote: > > On Wed, Jan 12, 2022 at 7:22 AM HAO CHEN GUI wrote: > >> > >> Hi, > >>This patch enables absolute jump table by default on rs6000. The > >> relative jump tables are used

Re: [PATCH, rs6000] Enable absolute jump table by default

2022-01-12 Thread David Edelsohn via Gcc-patches
On Wed, Jan 12, 2022 at 7:22 AM HAO CHEN GUI wrote: > > Hi, >This patch enables absolute jump table by default on rs6000. The relative > jump tables are used when >it's explicit set by "rs6000_relative_jumptables", >or jump tables are placed in text section but global relocation is

libgfortran bootstrap failure

2022-01-11 Thread David Edelsohn via Gcc-patches
The recent patch to support Power IEEE128 causes a bootstrap failure on AIX and possibly all non-GLIBC systems. +#if defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ \ +&& defined __GLIBC_PREREQ && __GLIBC_PREREQ (2, 32) +#define POWER_IEEE128 1 +#endif __GLIBC_PREREQ is

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

2022-01-11 Thread David Edelsohn 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

Re: [PATCH] PR 102935, Fix pr101384-1.c code generation test.

2022-01-11 Thread David Edelsohn via Gcc-patches
On Tue, Jan 11, 2022 at 12:06 PM Bill Schmidt wrote: > > Hi Mike, > > This looks fine to me. Maintainers? Okay. Thanks, David > > Thanks, > Bill > > On 1/7/22 6:33 PM, Michael Meissner wrote: > > Fix pr101384-1.c code generation test. > > > > Add support for the compiler using XXSPLTIB

Re: Ping: [PATCH] rs6000: Add split pattern to replace

2022-01-11 Thread David Edelsohn via Gcc-patches
On Tue, Jan 11, 2022 at 2:27 AM Xionghu Luo wrote: > > On 2022/1/11 06:55, David Edelsohn wrote: > >>> +(define_insn_and_split "sldoi_to_mov_" > > It would be more consistent with the naming convention to use > > "sldoi_to_mov" without the final "_". > > OK, thanks. > > > > >>> + [(set

Re: Ping: [PATCH] rs6000: powerpc suboptimal boolean test of contiguous bits [PR102239]

2022-01-10 Thread David Edelsohn via Gcc-patches
On Mon, Jan 10, 2022 at 12:37 AM Xionghu Luo wrote: > > Ping, thanks. > > > On 2021/12/13 13:16, Xionghu Luo wrote: > > Add specialized version to combine two instructions from > > > > 9: {r123:CC=cmp(r124:DI&0x6,0);clobber scratch;} > >REG_DEAD r124:DI > > 10:

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

2022-01-10 Thread David Edelsohn via Gcc-patches
On Wed, Dec 29, 2021 at 4:37 AM Kewen.Lin wrote: > > 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

Re: Ping^1 [PATCH, rs6000] new split pattern for TI to V1TI move [PR103124]

2022-01-10 Thread David Edelsohn via Gcc-patches
On Sun, Jan 9, 2022 at 10:16 PM HAO CHEN GUI wrote: > > Hi, > > Gentle ping this: > https://gcc.gnu.org/pipermail/gcc-patches/2021-December/587051.html > > Thanks > > On 17/12/2021 上午 9:55, HAO CHEN GUI wrote: > > Hi, > >This patch defines a new split pattern for TI to V1TI move.

Re: Ping: [PATCH] rs6000: Add split pattern to replace

2022-01-10 Thread David Edelsohn via Gcc-patches
On Mon, Jan 10, 2022 at 12:04 AM Xionghu Luo wrote: > > Gentle ping, thanks. > > > On 2021/12/29 09:27, Xionghu Luo wrote: > > 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. > > > >

Re: [power-ieee128] OPEN CONV

2022-01-08 Thread David Edelsohn via Gcc-patches
On Sat, Jan 8, 2022 at 1:59 PM Michael Meissner wrote: > > On Sat, Jan 08, 2022 at 03:18:07PM +0100, Jakub Jelinek wrote: > > On Sat, Jan 08, 2022 at 03:13:10PM +0100, Thomas Koenig wrote: > > > > > > On 08.01.22 15:02, Jakub Jelinek via Fortran wrote: > > > > Note, as for byteswapping,

Re: [PATCH] rs6000: Add optimizations for _mm_sad_epu8

2022-01-07 Thread David Edelsohn via Gcc-patches
On Fri, Jan 7, 2022 at 3:57 PM Paul A. Clarke wrote: > > On Fri, Jan 07, 2022 at 02:40:51PM -0500, David Edelsohn via Gcc-patches > wrote: > > +#ifdef __LITTLE_ENDIAN__ > > + /* Sum across four integers with two integer results. */ > > + asm ("vsum2sws %0,%1

Re: [PATCH] rs6000: Add Power10 optimization for most _mm_movemask*

2022-01-07 Thread David Edelsohn via Gcc-patches
On Fri, Jan 7, 2022 at 3:35 PM Paul A. Clarke wrote: > > On Fri, Jan 07, 2022 at 02:23:14PM -0500, David Edelsohn wrote: > > > Power10 ISA added `vextract*` instructions which are realized in the > > > `vec_extractm` instrinsic. > > > > > > Use `vec_extractm` for `_mm_movemask_ps`,

Re: [PATCH] rs6000: Add Power10 optimization for _mm_blendv*

2022-01-07 Thread David Edelsohn via Gcc-patches
On Fri, Jan 7, 2022 at 3:32 PM Paul A. Clarke wrote: > > On Fri, Jan 07, 2022 at 02:15:22PM -0500, David Edelsohn wrote: > > > Power10 ISA added `xxblendv*` instructions which are realized in the > > > `vec_blendv` instrinsic. > > > > > > Use `vec_blendv` for `_mm_blendv_epi8`, `_mm_blendv_ps`,

Re: [PATCH] rs6000: Add optimizations for _mm_sad_epu8

2022-01-07 Thread David Edelsohn via Gcc-patches
+#ifdef __LITTLE_ENDIAN__ + /* Sum across four integers with two integer results. */ + asm ("vsum2sws %0,%1,%2" : "=v" (result) : "v" (vsum), "v" (zero)); + /* Note: vec_sum2s could be used here, but on little-endian, vector + shifts are added that are not needed for this use-case. + A

Re: [PATCH] rs6000: Add Power10 optimization for most _mm_movemask*

2022-01-07 Thread David Edelsohn via Gcc-patches
> Power10 ISA added `vextract*` instructions which are realized in the > `vec_extractm` instrinsic. > > Use `vec_extractm` for `_mm_movemask_ps`, `_mm_movemask_pd`, and > `_mm_movemask_epi8` compatibility intrinsics, when `_ARCH_PWR10`. > > 2021-10-21 Paul A. Clarke > > gcc > *

Re: [PATCH] rs6000: Add Power10 optimization for _mm_blendv*

2022-01-07 Thread David Edelsohn via Gcc-patches
> Power10 ISA added `xxblendv*` instructions which are realized in the > `vec_blendv` instrinsic. > > Use `vec_blendv` for `_mm_blendv_epi8`, `_mm_blendv_ps`, and > `_mm_blendv_pd` compatibility intrinsics, when `_ARCH_PWR10`. > > Also, copy a test from i386 for testing `_mm_blendv_ps`. > This

Re: [PATCH] aix: handle 64bit inodes for include directories

2021-12-30 Thread David Edelsohn via Gcc-patches
Hi, Jeff Is the revised patch from Clement okay? Thanks, David On Tue, Aug 24, 2021 at 3:59 AM CHIGOT, CLEMENT wrote: > > >>> So my worry here is this is really a host property -- ie, this is > >>> behavior of where GCC runs, not the target for which GCC is generating > >>> code. > >>> > >>>

Re: [PATCH] rs6000: Replace UNSPECS with ss_plus/us_plus and ss_minus/us_minus

2021-12-20 Thread David Edelsohn via Gcc-patches
On Mon, Dec 20, 2021 at 6:55 PM Segher Boessenkool wrote: > > On Mon, Dec 20, 2021 at 11:45:45AM -0500, David Edelsohn wrote: > > On Mon, Dec 20, 2021 at 3:24 AM Xionghu Luo wrote: > > > These four UNSPECS seems could be replaced with native RTL, and why > > > "(set (reg:SI VSCR_REGNO)

Re: [PATCH] rs6000: Replace UNSPECS with ss_plus/us_plus and ss_minus/us_minus

2021-12-20 Thread David Edelsohn via Gcc-patches
On Mon, Dec 20, 2021 at 3:24 AM Xionghu Luo wrote: > > These four UNSPECS seems could be replaced with native RTL, and why > "(set (reg:SI VSCR_REGNO) (unspec:SI [(const_int 0)] UNSPEC_SET_VSCR))" > in the RTL pattern, per ISA of VSCR bit 127(VECTOR Saturation, SAT): > > This bit is sticky;

Re: [PATCH, rs6000] Implement mffscrni pattern

2021-12-20 Thread David Edelsohn via Gcc-patches
On Mon, Dec 20, 2021 at 12:56 AM HAO CHEN GUI wrote: > > Hi, > I modified the patch according to David and Segher's advice. > > This patch defines a pattern for mffscrni. If the RN is a constant, it can > call > gen_rs6000_mffscrni directly. The "rs6000-builtin-new.def" defines prototype >

Re: [PATCH, rs6000] Implement mffscrni pattern

2021-12-17 Thread David Edelsohn via Gcc-patches
On Thu, Dec 16, 2021 at 9:43 PM HAO CHEN GUI wrote: > > Hi, >This patch defines a pattern for mffscrni. If the RN is a constant, it can > call > gen_rs6000_mffscrni directly. The "rs6000-builtin-new.def" defines prototype > for builtin arguments. > The pattern "rs6000_set_fpscr_rn" is then

Re: [PATCH v4 0/6] __builtin_dynamic_object_size

2021-12-17 Thread David Edelsohn via Gcc-patches
Siddhesh, This patch series seems to have caused testsuite regressions for memcpy-chk, etc. in 32 bit mode (i386, x86-64 -m32 and -mx32, AIX 32 bit). I have opened PR 103759. Thanks, David

Re: [PATCH 6/6] rs6000: Rename arrays to remove temporary _x suffix

2021-12-14 Thread David Edelsohn via Gcc-patches
On Mon, Dec 6, 2021 at 3:49 PM Bill Schmidt wrote: > > Hi! > > While we had two sets of built-in infrastructure at once, I added _x as a > suffix to two arrays to disambiguate the old and new versions. Time to fix > that also. > > Bootstrapped and tested on powerpc64le-linux-gnu with no

Re: [PATCH 5/6] rs6000: Rename functions with "new" in their names

2021-12-14 Thread David Edelsohn via Gcc-patches
On Mon, Dec 6, 2021 at 3:49 PM Bill Schmidt wrote: > > Hi! > > While we had two sets of built-in functionality at the same time, I put "new" > in the names of quite a few functions. Time to undo that. > > Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this > okay for

Re: [PATCH 4/6] rs6000: Remove rs6000-builtin.def and associated data and functions

2021-12-14 Thread David Edelsohn via Gcc-patches
On Mon, Dec 6, 2021 at 3:49 PM Bill Schmidt wrote: > > Hi! > > The old rs6000-builtin.def file is no longer needed. Remove it and the code > that depends on it. > > Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this > okay for trunk? > > Thanks! > Bill > > 2021-12-02

Re: [PATCH 3/6] rs6000: Rename rs6000-builtin-new.def to rs6000-builtins.def

2021-12-14 Thread David Edelsohn via Gcc-patches
On Mon, Dec 6, 2021 at 3:49 PM Bill Schmidt wrote: > > Hi! > > This patch just renames a file and updates the build machinery accordingly. > > Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this > okay for trunk? > > Thanks! > Bill > > 2021-12-02 Bill Schmidt > >

Re: [PATCH 2/6] rs6000: Remove altivec_overloaded_builtins array and initialization

2021-12-14 Thread David Edelsohn via Gcc-patches
On Mon, Dec 6, 2021 at 3:49 PM Bill Schmidt wrote: > > Hi! > > This patch just removes the huge altivec_overloaded_builtins array. > > Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this > okay for trunk? > > Thanks! > Bill > > 2021-12-02 Bill Schmidt > > gcc/ >

Re: [PATCH 5/5] Add Power10 XXSPLTIDP for SFmode/DFmode constants.

2021-12-14 Thread David Edelsohn via Gcc-patches
On Fri, Nov 5, 2021 at 3:38 PM will schmidt wrote: > > On Fri, 2021-11-05 at 00:11 -0400, Michael Meissner wrote: > > Generate XXSPLTIDP for scalars on power10. > > > > This patch implements XXSPLTIDP support for SF, and DF scalar constants. > > The previous patch added support for vector

Re: [PATCH 4/5] Add Power10 XXSPLTIDP for vector constants

2021-12-14 Thread David Edelsohn via Gcc-patches
On Fri, Nov 5, 2021 at 3:24 PM will schmidt wrote: > > On Fri, 2021-11-05 at 00:10 -0400, Michael Meissner wrote: > > Generate XXSPLTIDP for vectors on power10. > > > > This patch implements XXSPLTIDP support for all vector constants. The > > XXSPLTIDP instruction is given a 32-bit immediate

Re: [PATCH 3/5] Add Power10 XXSPLTIW

2021-12-14 Thread David Edelsohn via Gcc-patches
On Fri, Nov 5, 2021 at 2:50 PM will schmidt wrote: > > On Fri, 2021-11-05 at 00:09 -0400, Michael Meissner wrote: > > Generate XXSPLTIW on power10. > > > > Hi, > > > > This patch adds support to automatically generate the ISA 3.1 XXSPLTIW > > instruction for V8HImode, V4SImode, and V4SFmode

Re: [PATCH 1/5] Add XXSPLTI* and LXVKQ instructions (new data structure and function)

2021-12-14 Thread David Edelsohn via Gcc-patches
On Fri, Nov 5, 2021 at 2:13 PM Michael Meissner wrote: > > On Fri, Nov 05, 2021 at 12:01:43PM -0500, will schmidt wrote: > > On Fri, 2021-11-05 at 00:04 -0400, Michael Meissner wrote: > > > Add new constant data structure. > > > > > > This patch provides the data structure and function to convert

  1   2   3   4   >