[committed] RISC-V: Implement locality for __builtin_prefetch

2024-07-14 Thread Monk Chiang
The patch add the Zihintntl instructions in the prefetch pattern. Zicbop has prefetch instructions. Zihintntl has NTL instructions. Insert NTL instructions before prefetch instruction, if target has Zihintntl extension. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_print_operand): Add

[PATCH] i386: extend trunc{128}2{16,32,64}'s scope.

2024-07-14 Thread Hu, Lin1
Hi, all Based on actual usage, trunc{128}2{16,32,64} use some instructions from sse/sse3, so extend their scope to extend the scope of optimization. Bootstraped and regtest on x86-64-linux-gnu, OK for trunk? BRs, Lin gcc/ChangeLog: PR target/107432 * config/i386/sse.md

Re: [COMMITTED] CRIS: Adjust gcc.dg/tree-ssa/loop-1.c

2024-07-14 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Mon, 15 Jul 2024 05:06:43 +0200 > With r15-1619-g3b9b8d6cfdf593, there's a XPASS and a FAIL > for this test-case for cris-elf. Looking at the generated > code, _foo is indeed no longer saved in a register for CRIS. > While that looks like a regression,

Re: [i386] adjust flag_omit_frame_pointer in a single function [PR113719] (was: Re: [PATCH] [i386] restore recompute to override opts after change [PR113719])

2024-07-14 Thread Hongtao Liu
On Thu, Jul 11, 2024 at 9:07 PM Alexandre Oliva wrote: > > On Jul 4, 2024, Alexandre Oliva wrote: > > > On Jul 3, 2024, Rainer Orth wrote: > > > Hmm, I wonder if leaf frame pointer has to do with that. > > It did, in a way. > > > > The first two patches for PR113719 have each regressed >

[COMMITTED] CRIS: Adjust gcc.dg/tree-ssa/loop-1.c

2024-07-14 Thread Hans-Peter Nilsson
Committed. -- >8 -- With r15-1619-g3b9b8d6cfdf593, there's a XPASS and a FAIL for this test-case for cris-elf. Looking at the generated code, _foo is indeed no longer saved in a register for CRIS. While that looks like a regression, coremark results are the same around this revision, so simply

Re: [PATCH] [APX NF] Add a pass to convert legacy insn to NF insns

2024-07-14 Thread Hongtao Liu
On Wed, Jul 10, 2024 at 2:46 PM Hongyu Wang wrote: > > Hi, > > For APX ccmp, current infrastructure will always generate cstore for > the ccmp flag user, like > > cmpe%rcx, %r8 > ccmpnel %rax, %rbx > seta%dil > add %rcx, %r9 > add %r9, %rdx

Re: [committed] Fix previously latent bug in reorg affecting cris port

2024-07-14 Thread Hans-Peter Nilsson
> From: Hans-Peter Nilsson > Date: Fri, 12 Jul 2024 02:11:45 +0200 > > > Date: Wed, 3 Jul 2024 12:46:46 -0600 > > From: Jeff Law > > > The late-combine patch has triggered a previously latent bug in reorg. > > > > Basically we have a sequence like this in the middle of reorg before we > >

Re: [PATCH] AVX512BF16: Do not allow permutation with vcvtne2ps2bf16 [PR115889]

2024-07-14 Thread Hongtao Liu
On Mon, Jul 15, 2024 at 10:21 AM Hongyu Wang wrote: > > > Could you just git revert 6d0b7b69d143025f271d0041cfa29cf26e6c343b? > > We can still deal with BFmode permutation the same way as HFmode, so > the change in ix86_vectorize_vec_perm_const can be preserved. > > Hongtao Liu 于2024年7月15日周一

Re: [PATCH] AVX512BF16: Do not allow permutation with vcvtne2ps2bf16 [PR115889]

2024-07-14 Thread Hongyu Wang
> Could you just git revert 6d0b7b69d143025f271d0041cfa29cf26e6c343b? We can still deal with BFmode permutation the same way as HFmode, so the change in ix86_vectorize_vec_perm_const can be preserved. Hongtao Liu 于2024年7月15日周一 09:40写道: > > On Sat, Jul 13, 2024 at 3:44 PM Hongyu Wang wrote: > >

[PATCH, rs6000] Remove redundant guard for float128 mode patterns

2024-07-14 Thread HAO CHEN GUI
Hi, This patch removes FLOAT128_IEEE_P guard when the mode of pattern is IEEE128 and FLOAT128_IBM_P when the mode of pattern is IBM128. The mode iterators already do the checking. So they're redundant. Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. Is it OK for

[PATCHv2, rs6000] Add TARGET_FLOAT128_HW guard for quad-precision insns

2024-07-14 Thread HAO CHEN GUI
Hi, This patch adds TARGET_FLOAT128_HW into pattern conditions for quad- precision insns. Some qp patterns are guarded by TARGET_P9_VECTOR originally, so replace it with "TARGET_FLOAT128_HW". For test case float128-cmp2-runnable.c, it should be guarded with ppc_float128_hw as it calls qp

Re: [PATCH] AVX512BF16: Do not allow permutation with vcvtne2ps2bf16 [PR115889]

2024-07-14 Thread Hongtao Liu
On Sat, Jul 13, 2024 at 3:44 PM Hongyu Wang wrote: > > Hi, > > According to the instruction spec of AVX512BF16, the convert from float > to BF16 is not a simple truncation. It has special handling for > denormal/nan, even for normal float it will add an extra bias according > to the least

Re: Re: [PATCH 3/3 v3] RISC-V: Add md files for vector BFloat16

2024-07-14 Thread wangf...@eswincomputing.com
On 2024-07-12 06:19  Jeff Law wrote: > > > >On 7/11/24 1:10 AM, Feng Wang wrote: >> V3: Add Bfloat16 vector insn in generic-vector-ooo.md >> v2: Rebase >> Accroding to the BFloat16 spec, some vector iterators and new pattern >> are added in md files. >> >> Signed-off-by: Feng Wang >>

[PR middle-end/114635] Set OMP safelen handling to INT_MAX when the pragma didn’t provide one.

2024-07-14 Thread Kugan Vivekanandarajah
OMP safelen handling is assigning backend provided max as an int even when the pragma didn’t provide one. As a result, vectoriser is rejecting SVE modes while comparing poly_int with the safelen. That is, for the attached test case, omp_max_vf gets [16, 16] from the backend. This then

[PATCH] Use foreach, not lmap, for tcl <= 8.5 compat

2024-07-14 Thread Jørgen Kvalsvik
lmap was introduced in tcl 8.6, and while it was released in 2012, lmap does not really make too much of a difference to warrant the friction on consverative (and relevant) systems. gcc/testsuite/ChangeLog: * lib/gcov.exp: Use foreach for tcl <= 8.5. --- gcc/testsuite/lib/gcov.exp | 28

Re: [PATCH] MATCH: add abs support for half float

2024-07-14 Thread Andrew Pinski
On Sun, Jul 14, 2024 at 1:12 AM Kugan Vivekanandarajah wrote: > > This patch extends abs detection in matched for half float. > > Bootstrapped and regression test on aarch64-linux-gnu. Is this OK for trunk? This is basically this pattern: ``` /* A >=/> 0 ? A : -Asame as abs (A) */ (for cmp

Re: [pushed] Add function filtering to gcov

2024-07-14 Thread Jørgen Kvalsvik
Certainly, I can rewrite from lmap. I'll send a patch shortly. On 7/14/24 16:27, Roger Sayle wrote: I’m seeing (dejagnu) testsuite problems from this (recent) patch. Running /home/roger/GCC/patchem/gcc/testsuite/gcc.misc-tests/gcov.exp ... ERROR: (DejaGnu) proc "lmap key { snd } { if

Re: [Patch, fortran] PR84868 - [11/12/13/14/15 Regression] ICE in gfc_conv_descriptor_offset, at fortran/trans-array.c:208

2024-07-14 Thread Harald Anlauf
Hi Paul, at first sight the patch seems to be the right approach, but it breaks for the following two variations: (1) LEN_TRIM is elemental, but the following is erroneously rejected: function g(n) result(z) integer, intent(in) :: n character, parameter :: d(3,3) = 'x'

Re: [x86 PATCH] Tweak i386-expand.cc to restore bootstrap on RHEL.

2024-07-14 Thread Uros Bizjak
On Sun, Jul 14, 2024 at 3:42 PM Roger Sayle wrote: > > > This is a minor change to restore bootstrap on systems using gcc 4.8 > as a host compiler. The fatal error is: > > In file included from gcc/gcc/coretypes.h:471:0, > from gcc/gcc/config/i386/i386-expand.cc:23: >

Re: [pushed] Add function filtering to gcov

2024-07-14 Thread Roger Sayle
I’m seeing (dejagnu) testsuite problems from this (recent) patch. Running /home/roger/GCC/patchem/gcc/testsuite/gcc.misc-tests/gcov.exp ... ERROR: (DejaGnu) proc "lmap key { snd } { if { $key in $seen } continue set key }" does not exist. The error code is NONE The info on

[x86 PATCH] Tweak i386-expand.cc to restore bootstrap on RHEL.

2024-07-14 Thread Roger Sayle
This is a minor change to restore bootstrap on systems using gcc 4.8 as a host compiler. The fatal error is: In file included from gcc/gcc/coretypes.h:471:0, from gcc/gcc/config/i386/i386-expand.cc:23: gcc/gcc/config/i386/i386-expand.cc: In function 'void

[match.pd PATCH] PR tree-optimization/114661: Generalize MULT_EXPR recognition (take #2)

2024-07-14 Thread Roger Sayle
Hi Richard, Many thanks for the review and recommendation to use nop_convert?. This revised patch implements that suggestion, which required a little experimentation/tweaking as ranger/EVRP records the ranges on the useless type conversions rather than the multiplications. This patch has been

[pushed] wwwdocs: gcc-*: Tweak links to testing instructions to use https

2024-07-14 Thread Gerald Pfeifer
Business as usual; pushed. Gerald --- htdocs/gcc-5/buildstat.html | 2 +- htdocs/gcc-6/buildstat.html | 2 +- htdocs/gcc-7/buildstat.html | 2 +- htdocs/gcc-8/buildstat.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/gcc-5/buildstat.html

[PATCH] gimple-fold: consistent dump of builtin call simplifications

2024-07-14 Thread rubin.gerritsen
Previously only simplifications of the `__st[xrp]cpy_chk` were dumped. Now all call replacement simplifications are dumped. Examples of statements with corresponding dumpfile entries: `printf("mystr\n");`: optimized: simplified printf to __builtin_puts `printf("%c", 'a');`:

[PATCH] MATCH: add abs support for half float

2024-07-14 Thread Kugan Vivekanandarajah
This patch extends abs detection in matched for half float. Bootstrapped and regression test on aarch64-linux-gnu. Is this OK for trunk? gcc/ChangeLog: * match.pd: Add pattern to convert (type)A >=/> 0 ? A : -A into abs (A) for half float. gcc/testsuite/ChangeLog: *

Re: [PATCH] fortran: Correctly evaluate the MASK argument of MINLOC/MAXLOC

2024-07-14 Thread Paul Richard Thomas
Hi Mikael, The fix is blindingly obvious :-) Not only that, the failing testcase runs correctly. OK for mainline and please backport to 14-branch before the 14.2 release. Thanks for the patch Paul On Sat, 13 Jul 2024 at 10:48, Mikael Morin wrote: > From: Mikael Morin > > Hello, > > I'm