Re: [PATCH 10/11] aarch64: Generalise TFmode load/store pair patterns

2023-10-18 Thread Richard Sandiford
Alex Coplan writes: > This patch generalises the TFmode load/store pair patterns to TImode and > TDmode. This brings them in line with the DXmode patterns, and uses the > same technique with separate mode iterators (TX and TX2) to allow for > distinct modes in each arm of the load/store pair. > >

Re: PR111648: Fix wrong code-gen due to incorrect VEC_PERM_EXPR folding

2023-10-18 Thread Prathamesh Kulkarni
On Wed, 18 Oct 2023 at 23:22, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Tue, 17 Oct 2023 at 02:40, Richard Sandiford > > wrote: > >> Prathamesh Kulkarni writes: > >> > diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc > >> > index 4f8561509ff..55a6a68c16c 100644 > >> > --

Re: [PATCH V2 3/7] aarch64: Implement system register validation tools

2023-10-18 Thread Richard Sandiford
Generally looks really good. Some comments below. Victor Do Nascimento writes: > Given the implementation of a mechanism of encoding system registers > into GCC, this patch provides the mechanism of validating their use by > the compiler. In particular, this involves: > > 1. Ensuring a suppli

Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-18 Thread Qing Zhao
> On Oct 6, 2023, at 4:01 PM, Martin Uecker wrote: > > Am Freitag, dem 06.10.2023 um 06:50 -0400 schrieb Siddhesh Poyarekar: >> On 2023-10-06 01:11, Martin Uecker wrote: >>> Am Donnerstag, dem 05.10.2023 um 15:35 -0700 schrieb Kees Cook: On Thu, Oct 05, 2023 at 04:08:52PM -0400, Siddhesh P

Re: [PATCH v2] gcc: Introduce -fhardened

2023-10-18 Thread Qing Zhao
Marek, Sorry for the late comment (I was just back from a long vacation immediate after Cauldron). One question: Is the option “-fhandened” for production build or for development build? If it’s for development build, then adding -ftrivial-auto-var-init=pattern is reasonable since the major

Re: [PATCH] RISC-V: Add popcount fallback expander.

2023-10-18 Thread Robin Dapp
> Could you by the way add this mention this PR: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111791 > Add the test of this PR ? Commented in that PR. This patch does not help there. Regards Robin

Re: [PATCH V2 5/7] aarch64: Implement system register r/w arm ACLE intrinsic functions

2023-10-18 Thread Richard Sandiford
Victor Do Nascimento writes: > Implement the aarch64 intrinsics for reading and writing system > registers with the following signatures: > > uint32_t __arm_rsr(const char *special_register); > uint64_t __arm_rsr64(const char *special_register); > void* __arm_rsrp(const char *spe

Re: [V3][PATCH 2/3] Use the counted_by atribute info in builtin object size [PR108896]

2023-10-18 Thread Qing Zhao
Hi, Sid, Thanks a lot for the detailed comments. See my responds embedded below. Qing > On Oct 5, 2023, at 4:01 PM, Siddhesh Poyarekar wrote: > > > > On 2023-08-25 11:24, Qing Zhao wrote: >> Use the counted_by atribute info in builtin object size to compute the >> subobject size for flexibl

Re: [PATCH] libcpp: testsuite: Add test for fixed _Pragma bug [PR82335]

2023-10-18 Thread Lewis Hyatt
May I please ping this one, and/or, is it something straightforward enough I can just commit it as obvious? Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2023-October/631814.html -Lewis On Mon, Oct 2, 2023 at 6:23 PM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi

Re: [PATCH V2 2/7] aarch64: Add support for aarch64-sys-regs.def

2023-10-18 Thread Richard Sandiford
Victor Do Nascimento writes: > This patch defines the structure of a new .def file used for > representing the aarch64 system registers, what information it should > hold and the basic framework in GCC to process this file. > > Entries in the aarch64-system-regs.def file should be as follows: > >

Re: [PATCH V2 4/7] aarch64: Add basic target_print_operand support for CONST_STRING

2023-10-18 Thread Richard Sandiford
Victor Do Nascimento writes: > Motivated by the need to print system register names in output > assembly, this patch adds the required logic to > `aarch64_print_operand' to accept rtxs of type CONST_STRING and > process these accordingly. > > Consequently, an rtx such as: > > (set (reg/i:DI 0 x0

Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-18 Thread Qing Zhao
> On Oct 5, 2023, at 4:08 PM, Siddhesh Poyarekar wrote: > > On 2023-08-25 11:24, Qing Zhao wrote: >> This is the 3rd version of the patch, per our discussion based on the >> review comments for the 1st and 2nd version, the major changes in this >> version are: > > Hi Qing, > > I hope the revi

Re: [PATCH V2 6/7] aarch64: Add front-end argument type checking for target builtins

2023-10-18 Thread Richard Sandiford
Victor Do Nascimento writes: > In implementing the ACLE read/write system register builtins it was > observed that leaving argument type checking to be done at expand-time > meant that poorly-formed function calls were being "fixed" by certain > optimization passes, meaning bad code wasn't being p

Re: [PATCH V2 7/7] aarch64: Add system register duplication check selftest

2023-10-18 Thread Richard Sandiford
Victor Do Nascimento writes: > Add a build-time test to check whether system register data, as > imported from `aarch64-sys-reg.def' has any duplicate entries. > > Duplicate entries are defined as any two SYSREG entries in the .def > file which share the same encoding values (as specified by its `

[PATCH] c++: Make -Wunknown-pragmas controllable by #pragma GCC diagnostic [PR89038]

2023-10-18 Thread Lewis Hyatt
Hello- The PR points out that my fix for PR53431 was incomplete and did not handle -Wunknown-pragmas. This is a one-line fix to correct that, is it OK for trunk and for GCC 13 backport please? bootstrap + regtest all languages on x86-64 Linux. Thanks! -Lewis -- >8 -- As noted on the PR, commit

[COMMITTED] Fix expansion of `(a & 2) != 1`

2023-10-18 Thread Andrew Pinski
I had a thinko in r14-1600-ge60593f3881c72a96a3fa4844d73e8a2cd14f670 where we would remove the `& CST` part if we ended up not calling expand_single_bit_test. This fixes the problem by introducing a new variable that will be used for calling expand_single_bit_test. As afar as I know this can only s

[PATCH 0/6] PowerPC Future patches

2023-10-18 Thread Michael Meissner
This patch is very preliminary support for a potential new feature to the PowerPC that extends the current power10 MMA architecture. This feature may or may not be present in any specific future PowerPC processor. In the current MMA subsystem for Power10, there are 8 512-bit accumulator registers

Re: [PATCH 1/6] PowerPC: Add -mcpu=future option

2023-10-18 Thread Michael Meissner
This patch implements support for a potential future PowerPC cpu. Features added with -mcpu=future, may or may not be added to new PowerPC processors. This patch adds support for the -mcpu=future option. If you use -mcpu=future, the macro __ARCH_PWR_FUTURE__ is defined, and the assembler .machin

[PATCH 2/6] PowerPC: Make -mcpu=future enable -mblock-ops-vector-pair.

2023-10-18 Thread Michael Meissner
This patch re-enables generating load and store vector pair instructions when doing certain memory copy operations when -mcpu=future is used. During power10 development, it was determined that using store vector pair instructions were problematical in a few cases, so we disabled generating load an

[PATCH 3/6] PowerPC: Add support for accumulators in DMR registers.

2023-10-18 Thread Michael Meissner
The MMA subsystem added the notion of accumulator registers as an optional feature of ISA 3.1 (power10). In ISA 3.1, these accumulators overlapped with the traditional floating point registers 0..31, but logically the accumulator registers were separate from the FPR registers. In ISA 3.1, it was

[PATCH 4/6] PowerPC: Make MMA insns support DMR registers.

2023-10-18 Thread Michael Meissner
This patch changes the MMA instructions to use either FPR registers (-mcpu=power10) or DMRs (-mcpu=future). In this patch, the existing MMA instruction names are used. A macro (__PPC_DMR__) is defined if the MMA instructions use the DMRs. The patches have been tested on both little and big endia

[PATCH 5/6] PowerPC: Switch to dense math names for all MMA operations.

2023-10-18 Thread Michael Meissner
This patch changes the assembler instruction names for MMA instructions from the original name used in power10 to the new name when used with the dense math system. I.e. xvf64gerpp becomes dmxvf64gerpp. The assembler will emit the same bits for either spelling. The patches have been tested on bo

[PATCH 6/6] PowerPC: Add support for 1,024 bit DMR registers.

2023-10-18 Thread Michael Meissner
This patch is a prelimianry patch to add the full 1,024 bit dense math register (DMRs) for -mcpu=future. The MMA 512-bit accumulators map onto the top of the DMR register. This patch only adds the new 1,024 bit register support. It does not add support for any instructions that need 1,024 bit re

[PATCH] aarch64: [PR110986] Emit csinv again for `a ? ~b : b`

2023-10-18 Thread Andrew Pinski
After r14-3110-g7fb65f10285, the canonical form for `a ? ~b : b` changed to be `-(a) ^ b` that means for aarch64 we need to add a few new insn patterns to be able to catch this and change it to be what is the canonical form for the aarch64 backend. A secondary pattern was needed to support a zero_e

[PATCH][_Hashtable] Fix merge

2023-10-18 Thread François Dumont
libstdc++: [_Hashtable] Do not reuse untrusted cached hash code On merge reuse merged node cached hash code only if we are on the same type of hash and this hash is stateless. Usage of function pointers or std::function as hash functor will prevent this optimization. libstdc++-v3/ChangeLog  

[PATCH] Avoid compile time hog on vect_peel_nonlinear_iv_init for nonlinear induction vec_step_op_mul when iteration count is too big.

2023-10-18 Thread liuhongt
>So the bugs were not fixed without this hunk? IIRC in the audit >trail we concluded the value is always positive ... (but of course >a large unsigned value can appear negative if you test it this way?) No, I added this incase in the future there's negative skip_niters as you mentioned in the PR,

Re:[pushed] [PATCH 0/3] Optimize loongarch vector implementation.

2023-10-18 Thread chenglulu
Pushed to r14-4730. 在 2023/10/16 上午10:00, Jiahao Xu 写道: The following three patches further enhance loongarch’s vectorization capabilities. Patch one add LoongArch support for AVG_CEIL/FLOOR. Patch 2 add LoongArch support for vec_widen_mult/add/sub_lo/hi patterns. patch 3 make loongarch use

[PATCH v2] x86: Correct ISA enabled for clients since Arrow Lake

2023-10-18 Thread Haochen Jiang
Hi all, I slightly adjust the patch. No functional change has been done in v2 patch but just some formatting and order issue. Thx, Haochen gcc/ChangeLog: * config/i386/i386.h: Correct the ISA enabled for Arrow Lake. Also make Clearwater Forest depends on Sierra Forest. *

Re: [PATCH v3 0/4] ifcvt: Allow if conversion of arithmetic in basic blocks with multiple sets

2023-10-18 Thread Manolis Tsamis
Hi all, Pinging once more ( https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628820.html). Manolis On Mon, Sep 18, 2023 at 11:18 AM Manolis Tsamis wrote: > > Kind ping for V3 of these ifcvt changes > https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628820.html > > Thanks, > Manolis >

<    1   2