Re: [PATCH] RISC-V: Add conditional unary neg/abs/not autovec patterns

2023-08-21 Thread Andrew Pinski via Gcc-patches
On Mon, Aug 21, 2023 at 10:42 PM Lehua Ding wrote: > > Hi, > > This patch add conditional unary neg/abs/not autovec patterns to RISC-V > backend. > Consider this C code: > > void > test_3 (float *__restrict a, float *__restrict b, int *__restrict pred, int n) > { > for (int i = 0; i < n; i +=

[PATCH] RISC-V: Add conditional unary neg/abs/not autovec patterns

2023-08-21 Thread Lehua Ding
Hi, This patch add conditional unary neg/abs/not autovec patterns to RISC-V backend. Consider this C code: void test_3 (float *__restrict a, float *__restrict b, int *__restrict pred, int n) { for (int i = 0; i < n; i += 1) { a[i] = pred[i] ? __builtin_fabsf (b[i]) : a[i]; } }

Re: Loop-ch improvements, part 3

2023-08-21 Thread Hongtao Liu via Gcc-patches
On Mon, Jul 17, 2023 at 5:18 PM Richard Biener via Gcc-patches wrote: > > On Fri, 14 Jul 2023, Jan Hubicka wrote: > > > Hi, > > loop-ch currently does analysis using ranger for all loops to identify > > candidates and then follows by phase where headers are duplicated (which > > breaks SSA and

[PATCH v2] RISC-V: Refactor RVV class by frm_op_type template arg

2023-08-21 Thread Pan Li via Gcc-patches
From: Pan Li Update in v2: * Added gcc_assert for vx format in binop. * Passed riscv/rvv.exp test. Original Log: As suggested by kito, we will add new frm_opt_type template arg to the op class, to avoid the duplicated function expand. Signed-off-by: Pan Li gcc/ChangeLog: *

RE: Intel AVX10.1 Compiler Design and Support

2023-08-21 Thread Jiang, Haochen via Gcc-patches
> -Original Message- > From: ZiNgA BuRgA > Sent: Monday, August 21, 2023 5:27 PM > To: Richard Biener ; Hongtao Liu > > Cc: Jiang, Haochen ; gcc-patches@gcc.gnu.org > Subject: Re: Intel AVX10.1 Compiler Design and Support > > Another way (not saying this is better, just throwing out

Re: [PATCH] RISC-V: Change fnms testcases assertion to xfail

2023-08-21 Thread Lehua Ding
Committed, thanks Juzhe. On 2023/8/22 11:05, juzhe.zh...@rivai.ai wrote: LGTM. juzhe.zh...@rivai.ai From: Lehua Ding Date: 2023-08-22 11:02 To: gcc-patches CC: juzhe.zhong; kito.cheng; rdapp.gcc; palmer; jeffreyalaw Subject: [PATCH] RISC-V: Change fnms testcases assertion to xfail Hi,

Re: PING^^^^ [PATCH] mklog: fix bugs of --append option

2023-08-21 Thread Lehua Ding
Gentle ping this little fix patch. Can anyone help review this patch? Thanks in advance. Best, Lehua On 2023/7/26 14:30, Lehua Ding wrote: Hi, Gentle Ping. I sent a V2 patch as below for an additional fix Python code format error, which Martin reported, thanks. Best, Lehua

Re: [PATCH] RISC-V: Change fnms testcases assertion to xfail

2023-08-21 Thread juzhe.zh...@rivai.ai
LGTM. juzhe.zh...@rivai.ai From: Lehua Ding Date: 2023-08-22 11:02 To: gcc-patches CC: juzhe.zhong; kito.cheng; rdapp.gcc; palmer; jeffreyalaw Subject: [PATCH] RISC-V: Change fnms testcases assertion to xfail Hi, This patch fixes inappropriate assertions in fnms testcases since we want to

[PATCH] RISC-V: Change fnms testcases assertion to xfail

2023-08-21 Thread Lehua Ding
Hi, This patch fixes inappropriate assertions in fnms testcases since we want to generate .COND_FNMS but actually generate .FNMS + .VCOND_MASK. A patch to do this optimization will follow. Best, Lehua gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/cond/cond_fms_fnms-1.c:

Re: Re: [PATCH] gimple_fold: Support COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS gimple fold

2023-08-21 Thread juzhe.zh...@rivai.ai
Hi, Richard. Address all comments and fix V2: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628070.html >> What's this used for? I'm surprised it doesn't cause a bootstrap failure. Oh yes. it's redundant variable and remove it in V2. I am also surprised that bootstrap didn't report

[PATCH] [x86] Testcase fix.

2023-08-21 Thread liuhongt via Gcc-patches
Commit as an abvious fix. gcc/testsuite/ChangeLog: * gcc.target/i386/invariant-ternlog-1.c: Only scan %rdx under TARGET_64BIT. --- gcc/testsuite/gcc.target/i386/invariant-ternlog-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: Re: [PATCH] RISCV: Fix PR111074 [GCC13 BUG]

2023-08-21 Thread juzhe.zh...@rivai.ai
Ok to backport GCC 13. You could disscuss with Pan Li whether you backport it or he backport it. Thanks. juzhe.zh...@rivai.ai From: Li Xu Date: 2023-08-22 10:42 To: xuli1; gcc-patches CC: kito.cheng; palmer; juzhe.zhong Subject: Re: [PATCH] RISCV: Fix PR111074 [GCC13 BUG] The test case is

Re: [PATCH] RISCV: Fix PR111074 [GCC13 BUG]

2023-08-21 Thread Li Xu
The test case is too complicated and I can't simplify it, so no test case is added. -- Li Xu >From: xuli > >This patch fixes this issue happens on GCC-13. >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111074 > >This patch should be backported to GCC-13. >GCC-14 has rewritten

Re: [PATCH] RISCV: Fix PR111074 [GCC13 BUG]

2023-08-21 Thread juzhe.zh...@rivai.ai
Thanks for fixing it. I am wonder could you add testcase into the patch? Or the testcase is too big and not appropriate to add. juzhe.zh...@rivai.ai From: Li Xu Date: 2023-08-22 10:29 To: gcc-patches CC: kito.cheng; palmer; juzhe.zhong; xuli Subject: [PATCH] RISCV: Fix PR111074 [GCC13 BUG]

[PATCH] RISCV: Fix PR111074 [GCC13 BUG]

2023-08-21 Thread Li Xu
From: xuli This patch fixes this issue happens on GCC-13. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111074 This patch should be backported to GCC-13. GCC-14 has rewritten propagate_avl function, so there is no issue. PR target/111074 gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc

[PATCH V2] gimple_fold: Support COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS gimple fold

2023-08-21 Thread Juzhe-Zhong
Hi, Richard and Richi. Currently, GCC support COND_LEN_FMA for floating-point **NO** -ffast-math. It's supported in tree-ssa-math-opts.cc. However, GCC failed to support COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS. Consider this following case: #define TEST_TYPE(TYPE)

[PATCH] c++: refine CWG 2369 satisfaction vs non-dep convs [PR99599]

2023-08-21 Thread Patrick Palka via Gcc-patches
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look like a reasonable approach? I didn't observe any compile time/memory impact of this change. -- >8 -- As described in detail in the PR, CWG 2369 has the surprising consequence of introducing constraint recursion in seemingly valid

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-08-21 Thread Kewen.Lin via Gcc-patches
Hi Jeevitha, on 2023/8/21 18:32, jeevitha wrote: > Hi All, > > The following patch has been bootstrapped and regtested on powerpc64-linux. I think we should test this on powerpc64le-linux P8 or P9 (no P10) as well. > > It is currently possible to incorrectly enable PCREL for targets that do

Re: Re: [PATCH V5] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-21 Thread juzhe.zh...@rivai.ai
Thanks kewen. I am gonna wait for stefan's test result before I merge this patch. Thanks. juzhe.zh...@rivai.ai From: Kewen.Lin Date: 2023-08-22 09:12 To: Juzhe-Zhong CC: richard.sandiford; rguenther; stefansf; gcc-patches Subject: Re: [PATCH V5] VECT: Support loop len control on EXTRACT_LAST

[pushed 6/6] analyzer: check format strings for null termination [PR105899]

2023-08-21 Thread David Malcolm via Gcc-patches
This patch extends -fanalyzer to check the format strings of calls to functions marked with '__attribute__ ((format...))'. The only checking done in this patch is to check that the format string is a valid null-terminated string; this patch doesn't attempt to check the content of the format

[pushed 4/6] analyzer: replace -Wanalyzer-unterminated-string with scan_for_null_terminator [PR105899]

2023-08-21 Thread David Malcolm via Gcc-patches
In r14-3169-g325f9e88802daa I added check_for_null_terminated_string_arg to -fanalyzer, calling it in various places, with a sole check for unterminated string constants, adding -Wanalyzer-unterminated-string for this case. This patch adds region_model::scan_for_null_terminator, which simulates

[pushed 2/6] analyzer: add ability for context to add events to a saved_diagnostic

2023-08-21 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-3372-g2503dd59b588d3. gcc/analyzer/ChangeLog: * diagnostic-manager.cc (saved_diagnostic::add_event): New. (saved_diagnostic::add_any_saved_events): New. (diagnostic_manager::add_event):

[pushed 5/6] analyzer: add kf_fopen

2023-08-21 Thread David Malcolm via Gcc-patches
Add checking to -fanalyzer that both params of calls to "fopen" are valid null-terminated strings. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-3375-g4325c82736d9e8. gcc/analyzer/ChangeLog: * kf.cc (class kf_fopen): New.

[pushed 3/6] analyzer: handle NULL inner context in region_model_context_decorator

2023-08-21 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-3373-g1e7b0a5d7a45dc. gcc/analyzer/ChangeLog: * region-model.cc (region_model_context_decorator::add_event): Handle m_inner being NULL. * region-model.h (class

[pushed 1/6] analyzer: convert note_adding_context to annotating_context

2023-08-21 Thread David Malcolm via Gcc-patches
This is enabling work towards the context being able to inject events into diagnostic paths, rather than just notes after the warning. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-3371-ge40a935db29cfd. gcc/analyzer/ChangeLog: * region-model.cc

Re: [PATCH V5] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-21 Thread Kewen.Lin via Gcc-patches
Hi Juzhe, on 2023/8/21 18:59, Juzhe-Zhong wrote: > Co-Authored-By: Kewen.Lin > > Hi, @Richi and @Richard, base on previous disscussion, I simpily fix issuses > for > powerpc and s390 with your suggestions: > > - machine_mode len_load_mode = get_len_load_store_mode > -

RE: [PATCH v1] RISC-V: Refactor RVV class by frm_op_type template arg

2023-08-21 Thread Li, Pan2 via Gcc-patches
Thanks Kito and Jeff for comments, will double check and address the comment in v2. Pan -Original Message- From: Kito Cheng Sent: Monday, August 21, 2023 11:07 PM To: Jeff Law Cc: Li, Pan2 ; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; Wang, Yanzhang Subject: Re: [PATCH v1]

RE: [PATCH v1] RISC-V: Support RVV VFWREDUSUM.VS rounding mode intrinsic API

2023-08-21 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Monday, August 21, 2023 11:06 PM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; Wang, Yanzhang ; kito.ch...@gmail.com Subject: Re: [PATCH v1] RISC-V: Support RVV VFWREDUSUM.VS rounding mode

Re: [PATCH] Remove XFAIL from gcc/testsuite/gcc.dg/unroll-7.c

2023-08-21 Thread Thiago Jung Bauermann via Gcc-patches
Richard Sandiford writes: > Thiago Jung Bauermann via Gcc-patches writes: >> This test passes since commit e41103081bfa "Fix undefined behaviour in >> profile_count::differs_from_p", so remove the xfail annotation. >> >> Tested on aarch64-linux-gnu, armv8l-linux-gnueabihf and

Re: [PATCH] bpf: neg instruction does not accept an immediate

2023-08-21 Thread Jose E. Marchesi via Gcc-patches
> The BPF virtual machine does not support neg nor neg32 instructions with > an immediate. > > The erroneous instructions were removed from binutils: > https://sourceware.org/pipermail/binutils/2023-August/129135.html > > Change the define_insn so that an immediate cannot be accepted. > > From

Re: [PATCH] RISC-V: Add Types to Un-Typed Sync Instructions:

2023-08-21 Thread Jeff Law via Gcc-patches
On 8/21/23 10:51, Edwin Lu wrote: Related Discussion: https://inbox.sourceware.org/gcc-patches/12fb5088-3f28-0a69-de1e-f387371a5...@gmail.com/ This patch updates the sync instructions to ensure that no insn is left without a type attribute. Updates a total of 6 insns to have type "atomic"

Re: [PATCH] Fix tests sensitive to internal library allocations

2023-08-21 Thread Jonathan Wakely via Gcc-patches
On Mon, 21 Aug 2023 at 21:20, François Dumont wrote: > > Here is the updated and tested patch. OK for trunk, thanks. We could consider it for the branches too (I'm going to remove the global strings on the gcc-13 branch tomorrow). > > On 21/08/2023 20:07, Jonathan Wakely wrote: > > On Mon, 21

Re: [PATCH] RISC-V: Add Types to Missing Bitmanip Instructions:

2023-08-21 Thread Jeff Law via Gcc-patches
On 8/21/23 10:37, Edwin Lu wrote: This patch updates the bitmanip instructions to ensure that no insn is left without a type attribute. Updates a total of 8 insns to have type "bitmanip" Tested for regressions using rv32/64 multilib with newlib/linux. gcc/Changelog: *

[PATCH] bpf: neg instruction does not accept an immediate

2023-08-21 Thread David Faust via Gcc-patches
The BPF virtual machine does not support neg nor neg32 instructions with an immediate. The erroneous instructions were removed from binutils: https://sourceware.org/pipermail/binutils/2023-August/129135.html Change the define_insn so that an immediate cannot be accepted. >From testing, a

Re: [PATCH 2/2] VR-VALUES: Rewrite test_for_singularity using range_op_handler

2023-08-21 Thread Andrew Pinski via Gcc-patches
On Fri, Aug 11, 2023 at 8:08 AM Andrew MacLeod via Gcc-patches wrote: > > > On 8/11/23 05:51, Richard Biener wrote: > > On Fri, Aug 11, 2023 at 11:17 AM Andrew Pinski via Gcc-patches > > wrote: > >> So it turns out there was a simplier way of starting to > >> improve VRP to start to fix PR

Re: [PATCH 0/2] libstdc++: Documentation fixes.

2023-08-21 Thread Jonathan Wakely via Gcc-patches
On Mon, 21 Aug 2023, 21:33 Bruno Victal, wrote: > This small patch-series fixes the 'doc-install-info' rule > and updates the URI used for docbook-xsl. > Thanks! I'll get these committed tomorrow. > Bruno Victal (2): > libstdc++: Fix 'doc-install-info' rule. > libstdc++: Update docbook

[PATCH 1/2] libstdc++: Fix 'doc-install-info' rule.

2023-08-21 Thread Bruno Victal
The info manual isn't moved to the expected location after generation which causes the install rule for it to fail. libstdc++-v3/Changelog: * doc/Makefile.in: Regenerate. * doc/Makefile.am: Fix 'doc-install-info' rule. Fix typo in commment. ---

[PATCH 2/2] libstdc++: Update docbook xsl URI.

2023-08-21 Thread Bruno Victal
The URI for namespaced docbook-xsl was updated to reflect the current DocBook upstream at . libstdc++-v3/Changelog: * acinclude.m4: Update docbook xsl URI. * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 0/2] libstdc++: Documentation fixes.

2023-08-21 Thread Bruno Victal
This small patch-series fixes the 'doc-install-info' rule and updates the URI used for docbook-xsl. Bruno Victal (2): libstdc++: Fix 'doc-install-info' rule. libstdc++: Update docbook xsl URI. libstdc++-v3/acinclude.m4| 2 +- libstdc++-v3/doc/Makefile.am | 4 ++-- 2 files changed, 3

Re: RISCV test infrastructure for d / v / zfh extensions

2023-08-21 Thread Robin Dapp via Gcc-patches
Hi Joern. > Hmm, you are right. I personally prefer my version because it allows > consistent naming of the > different tests, also easily extendible when new extensions need testing. > Although the riscv_vector name has the advantage that it is better > legible for people who are > not used to

Re: [PATCH] Fix tests sensitive to internal library allocations

2023-08-21 Thread François Dumont via Gcc-patches
Here is the updated and tested patch. On 21/08/2023 20:07, Jonathan Wakely wrote: On Mon, 21 Aug 2023 at 18:05, François Dumont via Libstdc++ wrote: Hi Here is a propocal to fix tests sensitive to libstdc++ internal allocations. Surely the enter() and exit() calls should be a constructor

Re: [PATCH] libgomp, testsuite: Do not call nonstandard functions on darwin

2023-08-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 21, 2023 at 10:00:30PM +0200, FX Coudert wrote: > >> I understand, I wanted to not just report the issue but propose an option. > >> It seems a bit heavy to design an effective target just for one test, > >> though, no? > > > > It has the advantage of getting it right on all current

Re: [PATCH] libgomp, testsuite: Do not call nonstandard functions on darwin

2023-08-21 Thread FX Coudert via Gcc-patches
>> I understand, I wanted to not just report the issue but propose an option. >> It seems a bit heavy to design an effective target just for one test, >> though, no? > > It has the advantage of getting it right on all current and future targets. Something like this? (not tested yet) diff

Re: [PATCH] RISC-V: Support simplify (-1-x) for vector.

2023-08-21 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 16 Aug 2023 at 14:12, yanzhang.wang--- via Gcc-patches wrote: > > From: Yanzhang Wang > > The pattern is enabled for scalar but not for vector. The patch try to > make it consistent and will convert below code, (CCing Richard S.) Hi, Sorry if this comment is not relevant to the patch but

Re: [PATCH] libgomp, testsuite: Do not call nonstandard functions on darwin

2023-08-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 21, 2023 at 09:50:37PM +0200, FX Coudert wrote: > > I don't like the #if !defined(__APPLE__) conditionals everywhere in the > > test, I think much cleaner would be to add an effective target to test > > for those functions > > I understand, I wanted to not just report the issue but

Re: [PATCH] libgomp, testsuite: Do not call nonstandard functions on darwin

2023-08-21 Thread FX Coudert via Gcc-patches
> I don't like the #if !defined(__APPLE__) conditionals everywhere in the > test, I think much cleaner would be to add an effective target to test > for those functions I understand, I wanted to not just report the issue but propose an option. It seems a bit heavy to design an effective target

[PATCH] Fortran: implement vector sections in DATA statements [PR49588]

2023-08-21 Thread Harald Anlauf via Gcc-patches
Dear all, the attached patch implements vector sections in DATA statements. The implementation is simpler than the size of the patch suggests, as part of changes try to clean up the existing code to make it easier to understand, as ordinary sections (start:end:stride) and vector sections may

Re: [PATCH] libgomp, testsuite: Do not call nonstandard functions on darwin

2023-08-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 21, 2023 at 09:12:09PM +0200, Tobias Burnus wrote: > OK. — I'd prefer if you also changed + tested a fix for my (a) + (b) > remarks, but as those are unrelated, I understand if you don't and just > commit your Darwin patch. I don't like the #if !defined(__APPLE__) conditionals

Re: [PATCH] Remove XFAIL from gcc/testsuite/gcc.dg/unroll-7.c

2023-08-21 Thread Richard Sandiford via Gcc-patches
Thiago Jung Bauermann via Gcc-patches writes: > This test passes since commit e41103081bfa "Fix undefined behaviour in > profile_count::differs_from_p", so remove the xfail annotation. > > Tested on aarch64-linux-gnu, armv8l-linux-gnueabihf and x86_64-linux-gnu. > > gcc/testsuite/ChangeLog: >

Re: [PATCH] libgomp, testsuite: Do not call nonstandard functions on darwin

2023-08-21 Thread Tobias Burnus
Hi FX, On 20.08.23 21:37, FX Coudert wrote: testsuite/libgomp.c/simd-math-1.c calls nonstandard functions that are not available on darwin (and possibly other systems?). Namely: * "gamma" which has been repaced by tgamma and lgamma as BSD's gamma == tgamma while glibc's gamma == lgamma. *

Re: [PATCH] testsuite: Adjust g++.dg/gomp/pr58567.C to new compiler message

2023-08-21 Thread Thiago Jung Bauermann via Gcc-patches
Hello Tobias, Tobias Burnus writes: > On 18.08.23 23:24, Thiago Jung Bauermann wrote: >> Tobias Burnus writes: >>> the patch looks good to me. Thanks! Can you commit the patch yourself or >>> do you need someone to do this for you? >> Thank you! I don't have commit access, so I would need

Re: [PATCH] Fix tests sensitive to internal library allocations

2023-08-21 Thread Jonathan Wakely via Gcc-patches
On Mon, 21 Aug 2023 at 18:05, François Dumont via Libstdc++ wrote: > > Hi > > Here is a propocal to fix tests sensitive to libstdc++ internal allocations. Surely the enter() and exit() calls should be a constructor and destructor? The constructor could use count() to get the count, and then

[PATCH V2] Emit funcall external declarations only if actually used.

2023-08-21 Thread Jose E. Marchesi via Gcc-patches
[Differences from V1: - Prototype for call_from_call_insn moved before comment block. - Reuse the `call' flag for SYMBOL_REF_LIBCALL. - Fallback to check REG_CALL_DECL in non-direct calls. - New test to check correct behavior for non-direct calls.] There are many places in GCC where alternative

Re: [PATCH v7 4/5] OpenMP/OpenACC: Unordered/non-constant component offset runtime diagnostic

2023-08-21 Thread Julian Brown
On Fri, 18 Aug 2023 15:47:50 -0700 Julian Brown wrote: > This version of the patch scales back the previously-posted version to > merely add a diagnostic for incorrect usage of component accesses with > variably-indexed arrays of structs: the only permitted variant is > where we have multiple

Re: Patch ping Re: [PATCH 0/12] GCC _BitInt support [PR102989]

2023-08-21 Thread Joseph Myers
On Mon, 21 Aug 2023, Jakub Jelinek via Gcc-patches wrote: > Joseph, could I ask now at least for an overall design review of the > C patches (8-10,13) whether its interfaces with middle-end are ok, > so that Richi can review the middle-end parts? I am fine with the interface to the middle-end

[RISCV][committed] Remove spurious newline in ztso sequence

2023-08-21 Thread Jeff Law via Gcc-patches
amo-table-ztso-load-3 the coordination branch after merging up the Ztso changes due to a spurious newline in the output causing scan-function-body to fail. There's probably an over-zealous .* or similar regexp in the framework. I didn't see it in a quick scan, but could have easily missed

[no subject]

2023-08-21 Thread Jacco via Gcc-patches
Hello, Hope you are doing well with the family. I noticed on LinkedIn. Can I share an idea here?

[PATCH] Fix tests sensitive to internal library allocations

2023-08-21 Thread François Dumont via Gcc-patches
Hi Here is a propocal to fix tests sensitive to libstdc++ internal allocations. Tested by restoring allocation in tzdb.cc. As announced I'm also adding a test to detect such allocations. If it is ok let me know if you prefer to see it in a different place.     libstdc++: Fix tests relying

[PATCH] RISC-V: Add Types to Un-Typed Sync Instructions:

2023-08-21 Thread Edwin Lu
Related Discussion: https://inbox.sourceware.org/gcc-patches/12fb5088-3f28-0a69-de1e-f387371a5...@gmail.com/ This patch updates the sync instructions to ensure that no insn is left without a type attribute. Updates a total of 6 insns to have type "atomic" Tested for regressions using rv32/64

[PATCH] RISC-V: Add Types to Missing Bitmanip Instructions:

2023-08-21 Thread Edwin Lu
Related Discussion: https://inbox.sourceware.org/gcc-patches/12fb5088-3f28-0a69-de1e-f387371a5...@gmail.com/ This patch updates the bitmanip instructions to ensure that no insn is left without a type attribute. Updates a total of 8 insns to have type "bitmanip" Tested for regressions using

Re: [PATCH] aarch64: fix format specifier

2023-08-21 Thread Richard Earnshaw (lists) via Gcc-patches
On 18/08/2023 17:37, FX Coudert via Gcc-patches wrote: A rather trivial fix for fprintf() specifier of a HOST_WIDE_INT value. Tested on aarch64-apple-darwin. OK to commit? FX OK. R.

[OpenMP/offloading][RFC] How to handle target/device-specifics with C pre-processor (in general, inside 'omp declare variant')

2023-08-21 Thread Tobias Burnus
RFC – and idea how to handle this best in GCC? See the two examples below for what we would like to support. * * * In GCC, we handle OpenMP (and OpenACC) by parsing the input file once, produce an internal representation (in LTO format) for offloading code and only at link time process it by

RE: [PING][PATCH] arm: Remove unsigned variant of vcaddq_m

2023-08-21 Thread Kyrylo Tkachov via Gcc-patches
Ok. Thanks, Kyrill From: Stam Markianos-Wright Sent: Saturday, August 19, 2023 12:42 PM To: gcc-patches@gcc.gnu.org Cc: Kyrylo Tkachov ; Richard Earnshaw Subject: [PING][PATCH] arm: Remove unsigned variant of vcaddq_m (Pinging since I realised that this is required for my later Low

Re: [PATCH] RISC-V: Refactor Phase 3 (Demand fusion) of VSETVL PASS

2023-08-21 Thread Kito Cheng via Gcc-patches
I think I could do some details review tomorrow on the plane, I am free from the meeting hell tomorrow :p Robin Dapp via Gcc-patches 於 2023年8月21日 週一 23:24 寫道: > Hi Juzhe, > > thanks, this is a reasonable approach and improves readability noticeably. > LGTM but I'd like to wait for other

[PATCH] s390: Fix builtins vec_rli and verll

2023-08-21 Thread Stefan Schulze Frielinghaus via Gcc-patches
The second argument of these builtins is an unsigned immediate. For vec_rli the API allows immediates up to 64 bits whereas the instruction verll only allows immediates up to 32 bits. Since the shift count equals the immediate modulo vector element size, truncating those immediates is fine.

[PATCH] s390: Fix some builtin definitions

2023-08-21 Thread Stefan Schulze Frielinghaus via Gcc-patches
Bootstrapped and regtested on s390. Ok for mainline? gcc/ChangeLog: * config/s390/s390-builtins.def (s390_vec_signed_flt): Fix builtin flag. (s390_vec_unsigned_flt): Ditto. (s390_vec_revb_flt): Ditto. (s390_vec_reve_flt): Ditto. (s390_vclfnhs):

Patch ping Re: [PATCH 0/12] GCC _BitInt support [PR102989]

2023-08-21 Thread Jakub Jelinek via Gcc-patches
Hi! On Wed, Aug 09, 2023 at 08:14:14PM +0200, Jakub Jelinek via Gcc-patches wrote: > Jakub Jelinek (12): > expr: Small optimization [PR102989] > lto-streamer-in: Adjust assert [PR102989] > phiopt: Fix phiopt ICE on vops [PR102989] > Middle-end _BitInt support [PR102989] > _BitInt

Re: [PATCH] RISC-V: Refactor Phase 3 (Demand fusion) of VSETVL PASS

2023-08-21 Thread Robin Dapp via Gcc-patches
Hi Juzhe, thanks, this is a reasonable approach and improves readability noticeably. LGTM but I'd like to wait for other opinions (e.g. by Kito) as I haven't looked closely into the vsetvl pass before and cannot entirely review it quickly. As we already have good test coverage there is not much

Re: [PATCH v1] RISC-V: Refactor RVV class by frm_op_type template arg

2023-08-21 Thread Kito Cheng via Gcc-patches
Just one nit from me: plz add assertion to OP_TYPE_vx to make sure NO FRM_OP == HAS_FRM there On Mon, Aug 21, 2023 at 11:04 PM Jeff Law via Gcc-patches wrote: > > > > On 8/17/23 20:53, Pan Li via Gcc-patches wrote: > > From: Pan Li > > > > As suggested by kito, we will add new frm_opt_type

Re: [PATCH v1] RISC-V: Support RVV VFWREDUSUM.VS rounding mode intrinsic API

2023-08-21 Thread Jeff Law via Gcc-patches
On 8/17/23 02:05, Pan Li via Gcc-patches wrote: From: Pan Li This patch would like to support the rounding mode API for the VFWREDUSUM.VS as the below samples * __riscv_vfwredusum_vs_f32m1_f64m1_rm * __riscv_vfwredusum_vs_f32m1_f64m1_rm_m Signed-off-by: Pan Li gcc/ChangeLog: *

Re: [PATCH v1] RISC-V: Refactor RVV class by frm_op_type template arg

2023-08-21 Thread Jeff Law via Gcc-patches
On 8/17/23 20:53, Pan Li via Gcc-patches wrote: From: Pan Li As suggested by kito, we will add new frm_opt_type template arg to the op class, to avoid the duplicated function expand. Signed-off-by: Pan Li gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc

Re: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-08-21 Thread Jeff Law via Gcc-patches
On 8/21/23 01:26, pan2...@intel.com wrote: From: Pan Li We have EMIT hook in mode switching already, which will insert the insn before in most cases. However, in some arch like RISC-V, it requires the additional insn to be inserted after when meet a call. | | <- EMIT HOOK,

Re: [PATCH] gimple_fold: Support COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS gimple fold

2023-08-21 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Wed, 16 Aug 2023, Juzhe-Zhong wrote: > >> Hi, Richard and Richi. >> >> Currently, GCC support COND_LEN_FMA for floating-point **NO** -ffast-math. >> It's supported in tree-ssa-math-opts.cc. However, GCC failed to support >> COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS.

Re: [PATCH] gimple_fold: Support COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS gimple fold

2023-08-21 Thread Richard Sandiford via Gcc-patches
Juzhe-Zhong writes: > Hi, Richard and Richi. > > Currently, GCC support COND_LEN_FMA for floating-point **NO** -ffast-math. > It's supported in tree-ssa-math-opts.cc. However, GCC failed to support > COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS. > > Consider this following case: > #define

Re: [RFC PATCH v2 1/2] RISC-V: __builtin_riscv_pause for all environment

2023-08-21 Thread Jeff Law via Gcc-patches
On 8/16/23 02:33, Philipp Tomsich wrote: Could we use the underlying 'fence' instruction (unless the assembler rejects the specific form that is needed) instead of the hex-insn? Should this also check HAVE_AS_MARCH_ZIHINTPAUSE (which must then also be added to configure.ac)? It seems

[COMMITTED] [frange] Return false if nothing changed in union_nans().

2023-08-21 Thread Aldy Hernandez via Gcc-patches
When one operand is a known NAN, we always return TRUE from union_nans(), even if no change occurred. This patch fixes the oversight. gcc/ChangeLog: * value-range.cc (frange::union_nans): Return false if nothing changed. (range_tests_floats): New test. ---

Re: [PATCH V5] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-21 Thread Richard Biener via Gcc-patches
On Mon, 21 Aug 2023, Juzhe-Zhong wrote: > Co-Authored-By: Kewen.Lin > > Hi, @Richi and @Richard, base on previous disscussion, I simpily fix issuses > for > powerpc and s390 with your suggestions: > > - machine_mode len_load_mode = get_len_load_store_mode > -(loop_vinfo->vector_mode,

Re: RISC-V: Added support for CRC.

2023-08-21 Thread Mariam Harutyunyan via Gcc-patches
Thank you for the review. I'm already working on suggested changes. The answers to the few questions are attached here. Thanks, Mariam On Wed, Aug 16, 2023 at 8:59 AM Jeff Law wrote: > > > On 8/3/23 13:37, Mariam Harutyunyan via Gcc-patches wrote: > > This patch adds CRC support for the RISC-V

Re: [committed][RISC-V] Fix 20010221-1.c with zicond

2023-08-21 Thread Maciej W. Rozycki
On Tue, 8 Aug 2023, Jeff Law wrote: > > I wonder however why do we need so much more code, including the middle > > end too, to support this ISA extension than we do for the very same set of > > MIPSr6 instructions under ISA_HAS_SEL, hmm... > Because it doesn't handle as many cases as we're

Re: [PATCH 1/2] RISC-V: Add quotes to #error messages

2023-08-21 Thread Jeff Law via Gcc-patches
On 8/17/23 21:52, Tsukasa OI wrote: From: Tsukasa OI In commit 1aaf3a64e92a ("[PATCH] RISC-V: Deduplicate #error messages in testsuite"), the author made a mistake to miss the test after adding quotes around extension names. To avoid future errors and for consistency with other #error uses

Re: [PATCH] RISC-V/testsuite: Add missing conversion tests.

2023-08-21 Thread Jeff Law via Gcc-patches
On 8/18/23 13:32, Robin Dapp wrote: Hi, this patch adds some missing tests for vf[nw]cvt. Regards Robin gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/conversions/vfncvt-ftoi-run.c: Add tests. *

Re: [PATCH] Fix FAIL: gcc.target/i386/pr87007-5.c

2023-08-21 Thread Hongtao Liu via Gcc-patches
On Mon, Aug 21, 2023 at 8:59 PM Richard Biener wrote: > > On Mon, 21 Aug 2023, Hongtao Liu wrote: > > > On Mon, Aug 21, 2023 at 8:25?PM Richard Biener via Gcc-patches > > wrote: > > > > > > The following fixes the gcc.target/i386/pr87007-5.c testcase which > > > changed code generation again

Re: [PATCH] Fix FAIL: gcc.target/i386/pr87007-5.c

2023-08-21 Thread Richard Biener via Gcc-patches
On Mon, 21 Aug 2023, Hongtao Liu wrote: > On Mon, Aug 21, 2023 at 8:25?PM Richard Biener via Gcc-patches > wrote: > > > > The following fixes the gcc.target/i386/pr87007-5.c testcase which > > changed code generation again after the recent sinking improvements. > > We now have > > > >

Re: [PATCH] Fix FAIL: gcc.target/i386/pr87007-5.c

2023-08-21 Thread Hongtao Liu via Gcc-patches
On Mon, Aug 21, 2023 at 8:40 PM Hongtao Liu wrote: > > On Mon, Aug 21, 2023 at 8:25 PM Richard Biener via Gcc-patches > wrote: > > > > The following fixes the gcc.target/i386/pr87007-5.c testcase which > > changed code generation again after the recent sinking improvements. > > We now have > > >

Re: [PATCH] Fix FAIL: gcc.target/i386/pr87007-5.c

2023-08-21 Thread Hongtao Liu via Gcc-patches
On Mon, Aug 21, 2023 at 8:25 PM Richard Biener via Gcc-patches wrote: > > The following fixes the gcc.target/i386/pr87007-5.c testcase which > changed code generation again after the recent sinking improvements. > We now have > > vxorps %xmm0, %xmm0, %xmm0 > vsqrtsd d2(%rip),

RE: RE: [PATCH v1] RISC-V: Support RVV VFWREDUSUM.VS rounding mode intrinsic API

2023-08-21 Thread Li, Pan2 via Gcc-patches
By design, HAS_FRM must be present if this insn honor FRM. For example, if one insn don't honor FRM, there should be only one declaration as below. static CONSTEXPR const binop vfmax_obj; But if one insn honors FRM, there will be 2 declaration as below for code reuse. static CONSTEXPR const

[PATCH] Fix FAIL: gcc.target/i386/pr87007-5.c

2023-08-21 Thread Richard Biener via Gcc-patches
The following fixes the gcc.target/i386/pr87007-5.c testcase which changed code generation again after the recent sinking improvements. We now have vxorps %xmm0, %xmm0, %xmm0 vsqrtsd d2(%rip), %xmm0, %xmm0 and an unnecessary xor again in one case, the other vsqrtsd has a

[PATCH] Fix gcc.dg/vect/bb-slp-subgroups-2.c with 256bit vectors

2023-08-21 Thread Richard Biener via Gcc-patches
The following adds vect128, vect256 and vect512 effective targets and adjusts gcc.dg/vect/bb-slp-subgroups-2.c accordingly. Tested on x86_64-unknown-linux-gnu, pushed. * gcc.dg/vect/bb-slp-subgroups-2.c: Properly handle the vect256 case. ---

Re: [PATCH][RFC] tree-optimization/92335 - Improve sinking heuristics for vectorization

2023-08-21 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 21 Aug 2023 at 12:27, Richard Biener wrote: > > On Sat, 19 Aug 2023, Prathamesh Kulkarni wrote: > > > On Fri, 18 Aug 2023 at 17:11, Richard Biener wrote: > > > > > > On Fri, 18 Aug 2023, Richard Biener wrote: > > > > > > > On Thu, 17 Aug 2023, Prathamesh Kulkarni wrote: > > > > > > > > >

[PATCH] Fix gcc.dg/vect/bb-slp-46.c FAIL

2023-08-21 Thread Richard Biener via Gcc-patches
When relaxing vectorization of possibly overflowing reductions I failed to update a testcase that will now vectorize and no longer test for what it was written for. The following replaces the vectorizable add with a division. Tested on x86_64-unknown-linux-gnu, pushed. *

[PATCH V5] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-21 Thread Juzhe-Zhong
Co-Authored-By: Kewen.Lin Hi, @Richi and @Richard, base on previous disscussion, I simpily fix issuses for powerpc and s390 with your suggestions: - machine_mode len_load_mode = get_len_load_store_mode -(loop_vinfo->vector_mode, true).require (); - machine_mode len_store_mode =

Re: [PATCH] tree-optimization/111048 - avoid flawed logic in fold_vec_perm

2023-08-21 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Mon, 21 Aug 2023 at 12:26, Richard Biener wrote: >> >> On Sat, 19 Aug 2023, Prathamesh Kulkarni wrote: >> >> > On Fri, 18 Aug 2023 at 14:52, Richard Biener wrote: >> > > >> > > On Fri, 18 Aug 2023, Richard Sandiford wrote: >> > > >> > > > Richard Biener writes:

Re: [PATCH] tree-optimization/111048 - avoid flawed logic in fold_vec_perm

2023-08-21 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 21 Aug 2023 at 12:26, Richard Biener wrote: > > On Sat, 19 Aug 2023, Prathamesh Kulkarni wrote: > > > On Fri, 18 Aug 2023 at 14:52, Richard Biener wrote: > > > > > > On Fri, 18 Aug 2023, Richard Sandiford wrote: > > > > > > > Richard Biener writes: > > > > > The following avoids running

[PATCH] Adjust testcase for Intel GDS.

2023-08-21 Thread liuhongt via Gcc-patches
gcc/testsuite/ChangeLog: * gcc.target/i386/avx512f-pr88464-2.c: Add -mgather to options. * gcc.target/i386/avx512f-pr88464-3.c: Ditto. * gcc.target/i386/avx512f-pr88464-4.c: Ditto. * gcc.target/i386/avx512f-pr88464-6.c: Ditto. *

Re: Intel AVX10.1 Compiler Design and Support

2023-08-21 Thread Hongtao Liu via Gcc-patches
On Mon, Aug 21, 2023 at 5:35 PM Richard Biener wrote: > > On Mon, Aug 21, 2023 at 10:28 AM Hongtao Liu wrote: > > > > On Mon, Aug 21, 2023 at 4:09 PM Jakub Jelinek wrote: > > > > > > On Mon, Aug 21, 2023 at 09:36:16AM +0200, Richard Biener via Gcc-patches > > > wrote: > > > > > On Sun, Aug 20,

[PATCH] tree-optimization/111082 - bogus promoted min

2023-08-21 Thread Richard Biener via Gcc-patches
vectorize_slp_instance_root_stmt promotes operations with undefined overflow to unsigned arithmetic but fails to consider operations that do not overflow like MIN which it turned into MIN with wrong signedness and in the case of the PR an unsupported operation. The following rectifies this.

[committed] libstdc++: Remove reliance on unspecified behaviour in std::rethrow_if_nested test

2023-08-21 Thread Jonathan Wakely via Gcc-patches
This is the patch resolving the non-portable test that Iain raised in: https://gcc.gnu.org/pipermail/libstdc++/2023-August/056534.html Tested x86_64-linux. Pushed to trunk. Backports would be OK, but I don't think they are needed. -- >8 -- This test case calls std::set_terminate while there is

Re: Intel AVX10.1 Compiler Design and Support

2023-08-21 Thread Richard Biener via Gcc-patches
On Mon, Aug 21, 2023 at 11:34 AM Richard Biener wrote: > > On Mon, Aug 21, 2023 at 10:28 AM Hongtao Liu wrote: > > > > On Mon, Aug 21, 2023 at 4:09 PM Jakub Jelinek wrote: > > > > > > On Mon, Aug 21, 2023 at 09:36:16AM +0200, Richard Biener via Gcc-patches > > > wrote: > > > > > On Sun, Aug

Re: Intel AVX10.1 Compiler Design and Support

2023-08-21 Thread Richard Biener via Gcc-patches
On Mon, Aug 21, 2023 at 10:28 AM Hongtao Liu wrote: > > On Mon, Aug 21, 2023 at 4:09 PM Jakub Jelinek wrote: > > > > On Mon, Aug 21, 2023 at 09:36:16AM +0200, Richard Biener via Gcc-patches > > wrote: > > > > On Sun, Aug 20, 2023 at 6:44 AM ZiNgA BuRgA via Gcc-patches > > > > wrote: > > > > >

Re: [PATCH] LCM: Export 2 helpful functions as global for VSETVL PASS use in RISC-V backend

2023-08-21 Thread Lehua Ding
Committed, thanks Richard. On 2023/8/21 17:12, Richard Biener via Gcc-patches wrote: On Mon, 21 Aug 2023, juzhe.zh...@rivai.ai wrote: Hi, Richi. I found when I try this in lcm.h: namespace lcm { void compute_available (sbitmap *, sbitmap *, sbitmap *, sbitmap *); void compute_antinout_edge

  1   2   >