Re: [PATCH v2 4/7] fortran: use grep instead of fgrep

2023-05-10 Thread Bernhard Reutner-Fischer via Gcc-patches
On Mon, 27 Jun 2022 14:10:36 +0800 Xi Ruoyao wrote: > fgrep has been deprecated in favor of grep -F for a long time, and the > next grep release (3.8 or 4.0) will print a warning of fgrep is used. > Stop using fgrep so we won't see the warning. > > We can't hard code grep -F here or it may break

Re: [x86_64 PATCH] Use [(const_int 0)] idiom consistently in i386.md

2023-05-10 Thread Uros Bizjak via Gcc-patches
On Wed, May 10, 2023 at 9:20 PM Roger Sayle wrote: > > > Hi Uros, > This cleans up the use of [(clobber (const_int 0))] in the i386 backend. > My apologies I must have copied this idiom from one of the other targets: > aarch64.md, arm.md, thumb1.md, avr.md, or sparc.md. > > This patch has been tes

Re: [PATCH v2 4/7] fortran: use grep instead of fgrep

2023-05-10 Thread Thomas Koenig via Gcc-patches
On 10.05.23 21:29, Bernhard Reutner-Fischer via Fortran wrote: On Mon, 27 Jun 2022 14:10:36 +0800 Xi Ruoyao wrote: fgrep has been deprecated in favor of grep -F for a long time, and the next grep release (3.8 or 4.0) will print a warning of fgrep is used. Stop using fgrep so we won't see the w

[PATCH] i386: Add missing vector extend patterns [PR92658]

2023-05-10 Thread Uros Bizjak via Gcc-patches
Add missing insn pattern for v2qi -> v2si vector extend and named expanders to activate generation of vector extends to 8-byte and 4-byte vectors. gcc/ChangeLog: PR target/92658 * config/i386/mmx.md (sse4_1_v2qiv2si2): New insn pattern. (v4qiv4hi2): New expander. (v2hiv2si2): Ditt

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-10 Thread 钟居哲
Thanks Richard. I am planning to seperate a patch with only creat_iv stuff only. Are you suggesting that I remove "tree_code incr_op = code;" Use the argument directly ? I saw the codes here: /* For easier readability of the created code, produce MINUS_EXPRs when suitable. */ if (TREE_

[pushed] c++: adjust conversion diagnostics

2023-05-10 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- While looking at PR109247 I made this change to improve diagnostics. I don't think I'm going ahead with that patch, but this still seems like a worthy cleanup. gcc/cp/ChangeLog: * call.cc (convert_like_internal): Share ck_ref_bind

Re: [PATCH] c++: converted lambda as template argument [PR83258, ...]

2023-05-10 Thread Jason Merrill via Gcc-patches
On 5/10/23 14:11, Patrick Palka wrote: On Wed, 10 May 2023, Jason Merrill wrote: On 5/10/23 11:36, Patrick Palka wrote: r8-1253-g3d2e25a240c711 removed the template argument linkage requirement in convert_nontype_argument for C++17, but we need to also remove the one in convert_nontype_argumen

Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-10 Thread Richard Sandiford via Gcc-patches
钟居哲 writes: > Thanks Richard. > I am planning to seperate a patch with only creat_iv stuff only. > > Are you suggesting that I remove "tree_code incr_op = code;" > Use the argument directly ? > > I saw the codes here: > > /* For easier readability of the created code, produce MINUS_EXPRs >

[PATCH v2] c++: wrong std::is_convertible with cv-qual fn [PR109680]

2023-05-10 Thread Marek Polacek via Gcc-patches
On Wed, May 03, 2023 at 03:37:03PM -0400, Jason Merrill wrote: > On 5/2/23 19:10, Marek Polacek wrote: > > This PR points out that std::is_convertible has given the wrong answer > > in > > > >static_assert (!std::is_convertible_v , ""); > > > > since r13-2822 implemented __is_{,nothrow_}conve

[PATCH] match.pd: Simplify popcount(X&Y)+popcount(X|Y) as popcount(X)+popcount(Y)

2023-05-10 Thread Roger Sayle
This patch teaches match.pd to simplify popcount(X&Y)+popcount(X|Y) as popcount(X)+popcount(Y), and the related simplifications that popcount(X)+popcount(Y)-popcount(X&Y) is popcount(X|Y). As surprising as it might seem, this idiom is common in cheminformatics codes (for Tanimoto coefficient calc

Re: [PATCH] i386: Honour -mdirect-extern-access when calling __fentry__

2023-05-10 Thread H.J. Lu via Gcc-patches
On Wed, May 10, 2023 at 2:17 AM Uros Bizjak wrote: > > On Tue, May 9, 2023 at 10:58 AM Ard Biesheuvel wrote: > > > > The small and medium PIC code models generate profiling calls that > > always load the address of __fentry__() via the GOT, even if > > -mdirect-extern-access is in effect. > > > >

Re: [PATCH v2] c++: wrong std::is_convertible with cv-qual fn [PR109680]

2023-05-10 Thread Jason Merrill via Gcc-patches
On 5/10/23 17:28, Marek Polacek wrote: On Wed, May 03, 2023 at 03:37:03PM -0400, Jason Merrill wrote: On 5/2/23 19:10, Marek Polacek wrote: This PR points out that std::is_convertible has given the wrong answer in static_assert (!std::is_convertible_v , ""); since r13-2822 implemented __i

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-10 Thread 钟居哲
I am sorry that I am still confused about that. Is this what you want ? bool use_minus_p = TREE_CODE (step) == INTEGER_CST && ((TYPE_UNSIGNED (TREE_TYPE (step)) && tree_int_cst_lt (step1, step)) || (!TYPE_UNSIGNED (TREE_TYPE (step)) && !tree_expr_nonnegative_warnv_p (step

Re: Re: [PATCH] riscv: Add vectorized binops and insn_expander helpers.

2023-05-10 Thread 钟居哲
>> This I added in order to match the scalar variants like >> [(set (match_operand:VI_QHS 0 "register_operand" "=vd,vd, vr, vr") >> (if_then_else:VI_QHS >> (unspec: >> [(match_operand: 1 "vector_mask_operand" "vm,vm,Wc1,Wc1") >> (match_operand 5 "vector_length_operand""rK,rK

Re: Re: [PATCH] riscv: Split off shift patterns for autovectorization.

2023-05-10 Thread 钟居哲
>> I don't think VEL is _wrong_ here, as it's an integer type that's big >> enough to hold the shift amount, but we might get some odd generated >> code for the QI and HI flavors as we frequently don't handle the shorter >> types well. This implementation has been proved works well in both my down

Re: [PATCH take #3] match.pd: Simplify popcount/parity of bswap/rotate.

2023-05-10 Thread Jeff Law via Gcc-patches
On 5/10/23 09:47, Bernhard Reutner-Fischer via Gcc-patches wrote: Hi Roger! On 10 May 2023 16:46:10 CEST, Roger Sayle wrote: Just a nit: +/* { dg-final { scan-tree-dump-times "bswap" 0 "optimized" } } */ Can you please use scan-tree-dump-not instead? OK with that change. I considered aski

Re: [PATCH] match.pd: Simplify popcount(X&Y)+popcount(X|Y) as popcount(X)+popcount(Y)

2023-05-10 Thread Jeff Law via Gcc-patches
On 5/10/23 15:53, Roger Sayle wrote: This patch teaches match.pd to simplify popcount(X&Y)+popcount(X|Y) as popcount(X)+popcount(Y), and the related simplifications that popcount(X)+popcount(Y)-popcount(X&Y) is popcount(X|Y). As surprising as it might seem, this idiom is common in cheminform

Re: [RFC,patch] Linker plugin - extend API for offloading corner case (aka: LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook [GCC PR109128])

2023-05-10 Thread Alan Modra via Gcc-patches
On Thu, May 04, 2023 at 11:02:25AM +, Richard Biener via Binutils wrote: > So since we expect the linker to use the host side table is there a way > for the plugin to exactly query that (the set of symbols the linker > uses from the object passed to the plugin)? That would be possible and rela

Ping^^: [PATCH V2] extract DF/SF/SI/HI/QI subreg from parameter word on stack

2023-05-10 Thread Jiufu Guo via Gcc-patches
Hi, I would like to ping: https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609396.html We know there are a few issues related to aggregate parameter and returns. I'm thinking if it is ok for trunk to use this patch to resolve part of those issues. BR, Jeff (Jiufu) Jiufu Guo via Gcc-p

Re: [PATCH] RISC-V: Support const series vector for RVV auto-vectorization

2023-05-10 Thread Kito Cheng via Gcc-patches
O > diff --git a/gcc/config/riscv/riscv-protos.h b/gcc/config/riscv/riscv-protos.h > index c0293a306f9..e8a728ae226 100644 > --- a/gcc/config/riscv/riscv-protos.h > +++ b/gcc/config/riscv/riscv-protos.h > @@ -219,6 +219,7 @@ rtx gen_avl_for_scalar_move (rtx); > void expand_tuple_move (machine_mode

[r14-475 Regression] FAIL: libgomp.oacc-fortran/update-dt-array.f90 -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O1 (test for excess errors) on Linux/x86_64

2023-05-10 Thread haochen.jiang via Gcc-patches
On Linux/x86_64, 508f082829af680ec4c1a5bcf55fe464986e3c95 is the first bad commit commit 508f082829af680ec4c1a5bcf55fe464986e3c95 Author: Uros Bizjak Date: Thu May 4 12:59:24 2023 +0200 i386: Improve index_register_operand predicate caused FAIL: gfortran.dg/pr65450.f90 -O3 -fomit-frame

RE: [EXTERNAL] Re: [PATCH] Fixes and workarounds for warnings during autoprofiledbootstrap build

2023-05-10 Thread Eugene Rozenfeld via Gcc-patches
> I cannot find a call to this debug function on trunk. How exactly did this > trigger a warning? Here is the command during autoprofiledbootstrap build that resulted in a warning: ~/gcc1_objdir/gcc$ /home/erozen/gcc1_objdir/./prev-gcc/xg++ -B/home/erozen/gcc1_objdir/./prev-gcc/ -B/home/er

RE: [EXTERNAL] Re: [PATCH] Fixes and workarounds for warnings during autoprofiledbootstrap build

2023-05-10 Thread Eugene Rozenfeld via Gcc-patches
I'm ok with disabling warnings as errors for autoprofiledbootstrap. What's the proper way to do that? Searching for "--disable-werror" I see matches in lib configure files but not in gcc files. Thanks, Eugene -Original Message- From: Richard Biener Sent: Tuesday, May 9, 2023 11:40 PM

Re: [PATCH] riscv: Add autovectorization tests for binary integer

2023-05-10 Thread Kito Cheng via Gcc-patches
Don't forgot to add Michael to co-author, you can added by following line: Co-authored-by: Michael Collison And GCC's changelog generating script will recognize that and generate the right thing for that :)

Re: [PATCH] riscv: Clarify vlmax and length handling.

2023-05-10 Thread Kito Cheng via Gcc-patches
LGTM, and just one nit, use RISC-V in the title would be better since Palmer's patchwork filter is set to "RISC-V", so using "riscv:" might be missed during patchwork review meeting :P On Thu, May 11, 2023 at 2:54 AM Palmer Dabbelt wrote: > > On Wed, 10 May 2023 11:50:32 PDT (-0700), rdapp@g

[PATCH v4] Var-Tracking: Typedef pointer_mux as decl_or_value

2023-05-10 Thread Pan Li via Gcc-patches
From: Pan Li The decl_or_value is defined as void * before this PATCH. It will take care of both the tree_node and rtx_def. Unfortunately, given a void pointer cannot tell the input is tree_node or rtx_def. Then we have some implicit structure layout requirement similar as below. Or we will touc

Re: [PATCH] riscv: Clarify vlmax and length handling.

2023-05-10 Thread juzhe.zh...@rivai.ai
This part LGTM. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-05-10 23:24 To: gcc-patches; juzhe.zh...@rivai.ai; Kito Cheng; Michael Collison; palmer; jeffreyalaw CC: rdapp.gcc Subject: [PATCH] riscv: Clarify vlmax and length handling. Hi, this patch tries to improve the wrappers that em

RE: [PATCH v3] Var-Tracking: Typedef pointer_mux as decl_or_value

2023-05-10 Thread Li, Pan2 via Gcc-patches
Thanks Richard Sandiford. Update PATCH v4 here -> https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618099.html. > - if (dv_as_opaque (node->dv) != decl || node->offset != offset) > + if (node->dv.first_or_null () != decl || node->offset != > + offset) > Genuine question, but: is the

Re: [PATCH] riscv: Add autovectorization tests for binary integer

2023-05-10 Thread juzhe.zh...@rivai.ai
LGTM. The whole implementation is your own work, but tests are mostly base on Michael so add Michael as co-author in testcase patch and then commit. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-05-10 23:24 To: gcc-patches; juzhe.zh...@rivai.ai; Kito Cheng; Michael Collison; palmer; jeff

RE: [PATCH] RISC-V: Update RVV integer compare simplification comments

2023-05-10 Thread Li, Pan2 via Gcc-patches
Hi Jeff, Thanks a lot. If no more comments, I can commit it to trunk later, 😊. Pan -Original Message- From: Jeff Law Sent: Tuesday, May 9, 2023 6:06 AM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@sifive.com; Wang, Yanzhang Subject: Re: [PATCH] RISC-V:

[PATCH] MAINTAINERS: Add myself to write after approval

2023-05-10 Thread juzhe . zhong
From: Ju-Zhe Zhong Signed-off-by: Juzhe Zhong ChangeLog: * MAINTAINERS: Add myself. --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4b846c6b288..1c380bef5c5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -521,6 +521,7 @@ James Lemke

[commited] MAINTAINERS: Add myself to write after approval

2023-05-10 Thread juzhe . zhong
From: Ju-Zhe Zhong Signed-off-by: Juzhe Zhong ChangeLog: * MAINTAINERS: Add myself. --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4b846c6b288..1c380bef5c5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -521,6 +521,7 @@ James Lemke

Re: [PATCH] riscv: Add autovectorization tests for binary integer

2023-05-10 Thread Jeff Law via Gcc-patches
On 5/10/23 20:26, Kito Cheng wrote: Don't forgot to add Michael to co-author, you can added by following line: Co-authored-by: Michael Collison And GCC's changelog generating script will recognize that and generate the right thing for that :) Thanks for pointing that out. I was looking for

[committed v2] RISC-V: Support const series vector for RVV auto-vectorization

2023-05-10 Thread Kito Cheng via Gcc-patches
From: Juzhe-Zhong Off line discussed with Ju-Zhe, and send and committed by me because he got some network issue. V2 Changes: - Code restructure and rename emit_indexop to emit_index_op. - Minor comment tweak. -- This patch is the prerequiste patch for more RVV auto-vectorization support. S

Re: [PATCH v3] Var-Tracking: Typedef pointer_mux as decl_or_value

2023-05-10 Thread Richard Sandiford via Gcc-patches
"Li, Pan2" writes: > Thanks Richard Sandiford. Update PATCH v4 here -> > https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618099.html. > >> - if (dv_as_opaque (node->dv) != decl || node->offset != offset) >> + if (node->dv.first_or_null () != decl || node->offset != >> + offset) > >>

Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-10 Thread Richard Sandiford via Gcc-patches
钟居哲 writes: > I am sorry that I am still confused about that. > > Is this what you want ? > > bool use_minus_p = TREE_CODE (step) == INTEGER_CST && ((TYPE_UNSIGNED > (TREE_TYPE (step)) && tree_int_cst_lt (step1, step)) > || (!TYPE_UNSIGNED (TREE_TYPE (step)) && > !tree_exp

[PATCH V5] VECT: Add tree_code into "creat_iv" and allow it can handle MINUS_EXPR IV.

2023-05-10 Thread juzhe . zhong
From: Juzhe-Zhong This is patch is a seperate patch preparing for supporting decrement IV. gcc/ChangeLog: * cfgloopmanip.cc (create_empty_loop_on_edge): Add PLUS_EXPR. * gimple-loop-interchange.cc (tree_loop_interchange::map_inductions_to_loop): Ditto. * tree-ssa-loop-i

Re: Re: [PATCH V4] VECT: Add decrement IV iteration loop control by variable amount support

2023-05-10 Thread juzhe.zh...@rivai.ai
Thank you so much. Can you take a look at this patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618110.html Thanks. juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-05-11 12:50 To: 钟居哲 CC: gcc-patches; rguenther Subject: Re: [PATCH V4] VECT: Add decrement IV iteration loop con

Re: [PATCH] i386: Honour -mdirect-extern-access when calling __fentry__

2023-05-10 Thread Uros Bizjak via Gcc-patches
On Thu, May 11, 2023 at 12:04 AM H.J. Lu wrote: > > On Wed, May 10, 2023 at 2:17 AM Uros Bizjak wrote: > > > > On Tue, May 9, 2023 at 10:58 AM Ard Biesheuvel wrote: > > > > > > The small and medium PIC code models generate profiling calls that > > > always load the address of __fentry__() via th

[PATCH v5] Var-Tracking: Typedef pointer_mux as decl_or_value

2023-05-10 Thread Pan Li via Gcc-patches
From: Pan Li The decl_or_value is defined as void * before this PATCH. It will take care of both the tree_node and rtx_def. Unfortunately, given a void pointer cannot tell the input is tree_node or rtx_def. Then we have some implicit structure layout requirement similar as below. Or we will touc

RE: [PATCH v3] Var-Tracking: Typedef pointer_mux as decl_or_value

2023-05-10 Thread Li, Pan2 via Gcc-patches
Yes, you are right. The decl_or_value take first works well, missed this detail in previous and updated the PATCH v5 for this. Thank you! Pan -Original Message- From: Richard Sandiford Sent: Thursday, May 11, 2023 12:43 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai

RE: [PATCH v3] Var-Tracking: Typedef pointer_mux as decl_or_value

2023-05-10 Thread Bernhard Reutner-Fischer via Gcc-patches
On 11 May 2023 04:30:16 CEST, "Li, Pan2 via Gcc-patches" wrote: >../../gcc/var-tracking.cc:3233:28: error: no match for 'operator!=' (operand >types are 'rtx' {aka 'rtx_def*'} and 'decl_or_value' {aka >'pointer_mux'}). Wouldn't you usually declare operator!= by !(left == right) ? thanks,

<    1   2