[PATCH] libcpp: Fix macro expansion for argument of __has_include [PR110558]

2023-12-12 Thread Lewis Hyatt
Hello- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110558 This is a small fix for the libcpp issue noted in the PR. Bootstrap + regtest all languages on x86-64 Linux. Is it ok for trunk please? Also, it's not a regression, having never worked since __has_include was introduced in GCC 5, but FWI

Re: [PATCH] c++: unifying constants vs their type [PR99186, PR104867]

2023-12-12 Thread Patrick Palka
On Tue, 12 Dec 2023, Patrick Palka wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK > for trunk? > > -- >8 -- > > When unifying constants we need to generally treat constants of > different types but same value as different, in light of auto template > parameters. T

Re: Disable FMADD in chains for Zen4 and generic

2023-12-12 Thread Hongtao Liu
On Tue, Dec 12, 2023 at 10:38 PM Jan Hubicka wrote: > > Hi, > this patch disables use of FMA in matrix multiplication loop for generic (for > x86-64-v3) and zen4. I tested this on zen4 and Xenon Gold Gold 6212U. > > For Intel this is neutral both on the matrix multiplication microbenchmark > (att

Re: [PATCH] c++: Fix warmth propagation for member function templates

2023-12-12 Thread Jason Merrill
On 12/12/23 14:29, Jason Xu wrote: Support was recently added for class-level warmth attributes that are propagated to member functions. The current implementation ignores member function templates and this patch fixes that. Thanks! I'm applying this variant of the patch: From c762599f112aa3b3

Re: [PATCH V4 2/3] Using pli for constant splitting

2023-12-12 Thread Jiufu Guo
Hi, "Kewen.Lin" writes: > Hi, > > on 2023/12/11 11:26, Jiufu Guo wrote: >> Hi, >> >> For constant building e.g. r120=0x, which does not fit 'li or lis', >> 'pli' is used to build this constant via 'emit_move_insn'. >> >> While for a complicated constant, e.g. 0xULL, w

Re: [PATCH V4 1/3]rs6000: accurate num_insns_constant_gpr

2023-12-12 Thread Jiufu Guo
Hi, "Kewen.Lin" writes: > Hi Jeff, > > on 2023/12/11 11:26, Jiufu Guo wrote: >> Hi, >> >> Trunk gcc supports more constants to be built via two instructions: >> e.g. "li/lis; xori/xoris/rldicl/rldicr/rldic". >> And then num_insns_constant should also be updated. >> >> Function "rs6000_emit_s

Re: [PATCH] aarch64/expr: Use ccmp when the outer expression is used twice [PR100942]

2023-12-12 Thread Andrew Pinski
On Tue, Dec 12, 2023 at 12:22 AM Andrew Pinski wrote: > > Ccmp is not used if the result of the and/ior is used by both > a GIMPLE_COND and a GIMPLE_ASSIGN. This improves the code generation > here by using ccmp in this case. > Two changes is required, first we need to allow the outer statement's

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread chenglulu
在 2023/12/13 上午2:27, Xi Ruoyao 写道: fld.s $f1,$r4,0 fld.s $f0,$r4,4 fld.s $f3,$r4,8 fld.s $f2,$r4,12 fcmp.slt.s $fcc1,$f0,$f3 fcmp.sgt.s $fcc0,$f1,$f2 movcf2gr$r13,$fcc1 movcf2gr$r12,$fcc0 o

[PATCH v2] LoongArch: Modify the check type of the vector builtin function.

2023-12-12 Thread chenxiaolong
On LoongArch architecture, using the latest gcc14 in regression test, it is found that the vector test cases in vector directory appear FAIL entries with unmatched pointer types. In order to solve this kind of problem, the type of the variable in the check result is modified with the parameter type

RE: [RFC] Intel AVX10.1 Compiler Design and Support

2023-12-12 Thread Jiang, Haochen
> > On the other hand, a new EVEX-capable level might bring earlier adoption > > of EVEX capabilities to AMD CPUs, which still should be an improvement > > over AVX2. This could benefit AMD as well. So I would really like to > > see some AMD feedback here. > > > > There's also the matter that tim

[PATCH] i386: Fix PR110790 testcase

2023-12-12 Thread Haochen Jiang
Hi all, This patch will fix the testcase fail previously introduced. Approved by another thread: https://gcc.gnu.org/pipermail/gcc-patches/2023-December/640288.html Pushed to trunk. Thx, Haochen gcc/testsuite/ChangeLog: * gcc.target/i386/pr110790-2.c: Change scan-assembler from shrq

Re: [PATCH] SRA: Force gimple operand in an additional corner case (PR 112822)

2023-12-12 Thread Jason Merrill
On 12/12/23 17:50, Peter Bergner wrote: On 12/12/23 1:26 PM, Richard Biener wrote: Am 12.12.2023 um 19:51 schrieb Peter Bergner : On 12/12/23 12:45 PM, Peter Bergner wrote: +/* PR target/112822 */ Oops, this should be: /* PR tree-optimization/112822 */ It's fixed on my end. Ok Pushed

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread chenglulu
在 2023/12/13 上午2:27, Xi Ruoyao 写道: On Tue, 2023-12-12 at 20:39 +0800, Xi Ruoyao wrote: fld.s $f1,$r4,0 fld.s $f0,$r4,4 fld.s $f3,$r4,8 fld.s $f2,$r4,12 fcmp.slt.s $fcc1,$f0,$f3 fcmp.sgt.s $fcc0,$f1,$f2 movcf2gr$r

Re: PING^1 [PATCH] range: Workaround different type precision issue between _Float128 and long double [PR112788]

2023-12-12 Thread Kewen.Lin
Hi Jakub & Andrew, on 2023/12/12 22:42, Jakub Jelinek wrote: > On Tue, Dec 12, 2023 at 09:33:38AM -0500, Andrew MacLeod wrote: >> I leave this for the release managers, but I am not opposed to it for this >> release... It would be nice to remove it for the next release > > I can live with it for

[PATCH #2a/2]

2023-12-12 Thread Alexandre Oliva
On Dec 12, 2023, Richard Biener wrote: > On Tue, Dec 12, 2023 at 3:03 AM Alexandre Oliva wrote: >> DECL_NOT_GIMPLE_REG_P (arg) = 0; > I wonder why you clear this at all? That code seems to be inherited from expand_thunk. ISTR that flag was not negated when I started the strub implementation,

[PATCH #2a/2] strub: indirect volatile parms in wrappers

2023-12-12 Thread Alexandre Oliva
[sorry that the previous, unfinished post got through] On Dec 12, 2023, Richard Biener wrote: > On Tue, Dec 12, 2023 at 3:03 AM Alexandre Oliva wrote: >> DECL_NOT_GIMPLE_REG_P (arg) = 0; > I wonder why you clear this at all? That code seems to be inherited from expand_thunk. ISTR that flag w

[PATCH] RISC-V: Add Zvfbfmin extension to the -march= option

2023-12-12 Thread Xiao Zeng
This patch would like to add new sub extension (aka Zvfbfmin) to the -march= option. It introduces a new data type BF16. Depending on different usage scenarios, the Zvfbfmin extension may depend on 'V' or 'Zve32f'. This patch only implements dependencies in scenario of Embedded Processor. In scena

Re: [PATCH DejaGNU 1/1] Support per-test execution timeout factor

2023-12-12 Thread Jacob Bachmeyer
Maciej W. Rozycki wrote: Add support for the `test_timeout_factor' global variable letting a test case scale the wait timeout used for code execution. This is useful for particularly slow test cases for which increasing the wait timeout globally would be excessive. * baseboards/qemu.

[PATCH] RISC-V: Don't make Ztso imply A

2023-12-12 Thread Palmer Dabbelt
I can't actually find anything in the ISA manual that makes Ztso imply A. In theory the memory ordering is just a different thing that the set of availiable instructions (ie, Ztso without A would still imply TSO for loads and stores). It also seems like a configuration that could be sane to build

Re: [PATCH] RISC-V: Add Zvfbfmin extension to the -march= option

2023-12-12 Thread Palmer Dabbelt
On Tue, 12 Dec 2023 19:24:51 PST (-0800), zengx...@eswincomputing.com wrote: This patch would like to add new sub extension (aka Zvfbfmin) to the -march= option. It introduces a new data type BF16. Depending on different usage scenarios, the Zvfbfmin extension may depend on 'V' or 'Zve32f'. This

Re: [PATCH] c++: End lifetime of objects in constexpr after destructor call [PR71093]

2023-12-12 Thread Jason Merrill
On 12/12/23 12:50, Jason Merrill wrote: On 12/12/23 10:24, Jason Merrill wrote: On 12/12/23 06:15, Jakub Jelinek wrote: On Tue, Dec 12, 2023 at 02:13:43PM +0300, Alexander Monakov wrote: On Tue, 12 Dec 2023, Jakub Jelinek wrote: On Mon, Dec 11, 2023 at 05:00:50PM -0500, Jason Merrill wrote

Re: [PATCH] SRA: Force gimple operand in an additional corner case (PR 112822)

2023-12-12 Thread Peter Bergner
On 12/12/23 8:36 PM, Jason Merrill wrote: > This test is failing for me below C++17, I think you need > > // { dg-do compile { target c++17 } } > or > // { dg-require-effective-target c++17 } Sorry about that. Should we do the above or should we just add -std=c++17 to dg-options? ...or do we ne

RE: [PATCH] [gcc-wwwdocs]gcc-13/14: Mention Intel new ISA and march support

2023-12-12 Thread Gerald Pfeifer
On Mon, 27 Nov 2023, Jiang, Haochen wrote: >> How about changing this to use "and", as in >> "The switch enables the AMX-FP16, PREFETCHI ISA extensions." >> ? > Ok for me. Done and pushed thusly. Gerald commit 617a25d7d89a9cce121e85b693eed1ee3f94354b Author: Gerald Pfeifer Date: Wed Dec 13

[PATCH] RISC-V: Postpone full available optimization [VSETVL PASS]

2023-12-12 Thread Juzhe-Zhong
Fix VSETVL BUG that AVL is polluted .L15: li a3,9 lui a4,%hi(s) sw a3,%lo(j)(t2) sh a5,%lo(s)(a4) <--a4 is hold the address of s beq t0,zero,.L42 sw t5,8(t4) vsetvli zero,a4,e8,m8,ta,ma <<--- a4 as avl Actually,

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Jiahao Xu
在 2023/12/13 上午2:27, Xi Ruoyao 写道: On Tue, 2023-12-12 at 20:39 +0800, Xi Ruoyao wrote: On Tue, 2023-12-12 at 19:59 +0800, Jiahao Xu wrote: I guess here the problem is floating-point compare instruction is much more costly than other instructions but the fact is not correctly modeled yet.  Cou

Re: [gcc-wwwdocs PATCH] gcc-13/14: Mention recent update for x86_64 backend

2023-12-12 Thread Gerald Pfeifer
On Fri, 8 Dec 2023, Haochen Jiang wrote: > +++ b/htdocs/gcc-13/changes.html > +Based on ISA extensions enabled on Alder Lake, the switch further enables > +the AVX-IFMA, AVX-VNNI-INT8, AVX-NE-CONVERT, CMPccXADD, ENQCMD and UINTR > +ISA extensions. Personally I would alphabetically sor

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Xi Ruoyao
On Wed, 2023-12-13 at 14:17 +0800, Jiahao Xu wrote: > This test was extracted from the hot functions of 526.blender_r. Setting > LOGICAL_OP_NON_SHORT_CIRCUIT to 0 resulted in a 26% decrease in dynamic > instruction count and a 13.4% performance improvement. After applying > the patch mentioned a

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Jiahao Xu
在 2023/12/13 下午2:21, Xi Ruoyao 写道: On Wed, 2023-12-13 at 14:17 +0800, Jiahao Xu wrote: This test was extracted from the hot functions of 526.blender_r. Setting LOGICAL_OP_NON_SHORT_CIRCUIT to 0 resulted in a 26% decrease in dynamic instruction count and a 13.4% performance improvement. After a

[PATCH] RISC-V: Fix dynamic lmul tests depended on abi

2023-12-12 Thread demin . han
These two tests depend on -mabi. Other toolchain configs would report: fatal error: gnu/stubs-ilp32.h: No such file or directory gcc/testsuite/ChangeLog: * gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul1-7.c: Fix abi issue * gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul2-4.c: Dit

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Xi Ruoyao
On Wed, 2023-12-13 at 14:32 +0800, Jiahao Xu wrote: > > 在 2023/12/13 下午2:21, Xi Ruoyao 写道: > > On Wed, 2023-12-13 at 14:17 +0800, Jiahao Xu wrote: > > > This test was extracted from the hot functions of 526.blender_r. Setting > > > LOGICAL_OP_NON_SHORT_CIRCUIT to 0 resulted in a 26% decrease in dy

[PATCH] Force broadcast constant to mem for vec_dup{v4di, v8si, v4df, v8df} when TARGET_AVX2 is not available.

2023-12-12 Thread liuhongt
vpbroadcastd/vpbroadcastq is avaiable under TARGET_AVX2, but vec_dup{v4di,v8si} pattern is avaiable under AVX with memory operand. And it will cause LRA/Reload to generate spill and reload if we put constant in register. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready push to trunk

Re: [PATCH] SRA: Force gimple operand in an additional corner case (PR 112822)

2023-12-12 Thread Richard Biener
On Tue, 12 Dec 2023, Peter Bergner wrote: > On 12/12/23 8:36 PM, Jason Merrill wrote: > > This test is failing for me below C++17, I think you need > > > > // { dg-do compile { target c++17 } } > > or > > // { dg-require-effective-target c++17 } > > Sorry about that. Should we do the above or s

[PATCH] middle-end/111591 - explain why TBAA doesn't need adjustment

2023-12-12 Thread Richard Biener
While tidying the prototype patch I've done for the reduced testcase in PR111591 and in that process trying to produce a testcase that is miscompiled by stack slot coalescing and the TBAA info that remains un-altered I've realized we do not need to adjust TBAA info. The following documents this in

<    1   2