[PATCH] RISC-V: Elimilate warning

2023-09-11 Thread Li Xu
From: xuli ./riscv-gcc/gcc/config/riscv/riscv-vector-builtins-bases.cc:1719:34: warning: unused parameter 'e' [-Wunused-parameter] rtx expand (function_expander ) const override ^ gcc/ChangeLog: *

[Bug middle-end/102202] Inefficent expansion of memset when range is [0,1]

2023-09-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102202 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Component|target

[Bug tree-optimization/111364] `MAX_EXPR <= a` is not optimized to `a >= b`

2023-09-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111364 --- Comment #4 from Andrew Pinski --- Created attachment 55884 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55884=edit Full patch which I am testing

[PATCH 2/2] libstdc++: Optimize is_member_pointer trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_member_pointer trait by dispatching to the new __is_member_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_pointer): Use __is_member_pointer built-in trait. (is_member_pointer_v):

[PATCH 1/2] c++: Implement __is_member_pointer built-in trait

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_member_pointer. gcc/cp/ChangeLog: * cp-trait.def (IS_MEMBER_POINTER): Define __is_member_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_POINTER. * semantics.cc (trait_expr_value): Likewise.

[PATCH 0/2] Optimize is_member_pointer trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch series optimizes is_member_pointer trait performance. The first patch implements __is_member_pointer built-in trait. The second patch optimizes is_member_pointer trait performance by using __is_member_pointer built-in trait if available. The performance improvement is shown in the

[Bug tree-optimization/107881] (a <= b) == (b >= a) should be optimized to (a == b)

2023-09-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107881 Andrew Pinski changed: What|Removed |Added URL||https://gcc.gnu.org/piperma

[PATCH] MATCH: Simplify (a CMP1 b) ^ (a CMP2 b)

2023-09-11 Thread Andrew Pinski via Gcc-patches
This adds the missing optimizations here. Note we don't need to match where CMP1 and CMP2 are complements of each other as that is already handled elsewhere. I added a new executable testcase to make sure we optimize it correctly as I had originally messed up one of the entries for the resulting

[Bug sanitizer/111382] New: Sanitizer says that the right address calculated in parentheses is misaligned.

2023-09-11 Thread aamelnikov at inbox dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111382 Bug ID: 111382 Summary: Sanitizer says that the right address calculated in parentheses is misaligned. Product: gcc Version: 9.4.0 Status: UNCONFIRMED

Re: [PATCH] RISC-V: Finish Typing Un-Typed Instructions and Turn on Assert

2023-09-11 Thread Jeff Law via Gcc-patches
On 9/11/23 21:17, Lehua Ding wrote: Hi Jeff, On 2023/9/12 11:00, Jeff Law wrote: I'd rather be consistent and make it policy that every insn has a type. Since the type set here will not be used by sched pass (these insn pattern will not exit at shced pass since use define_insn_and_split

[Bug target/111381] New: RISC-V: missed autovec MULH for signed * unsigned

2023-09-11 Thread lehua.ding at rivai dot ai via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111381 Bug ID: 111381 Summary: RISC-V: missed autovec MULH for signed * unsigned Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3

Re: [PATCH v2 2/2] riscv: Add support for str(n)cmp inline expansion

2023-09-11 Thread Jeff Law via Gcc-patches
On 9/6/23 10:07, Christoph Muellner wrote: From: Christoph Müllner This patch implements expansions for the cmpstrsi and cmpstrnsi builtins for RV32/RV64 for xlen-aligned strings if Zbb or XTheadBb instructions are available. The expansion basically emits a comparison sequence which

Re: [PATCH v2 1/2] riscv: Add support for strlen inline expansion

2023-09-11 Thread Jeff Law via Gcc-patches
On 9/6/23 10:07, Christoph Muellner wrote: From: Christoph Müllner This patch implements the expansion of the strlen builtin for RV32/RV64 for xlen-aligned aligned strings if Zbb or XTheadBb instructions are available. The inserted sequences are: rv32gc_zbb (RV64 is similar): add

Re: Re: [PATCH] RISC-V: Add vcreate intrinsics for RVV tuple types

2023-09-11 Thread Li Xu
Committed, thanks juzhe and kito. -- Li Xu >LGTM, thanks for implement this :) > >On Tue, Sep 12, 2023 at 10:16 AM juzhe.zh...@rivai.ai > wrote: >> >> Thanks for support it. >> LGTM from my side. >> Wait for kito's more comments. >> >> >> >> juzhe.zh...@rivai.ai >> >> From: Li Xu >>

Re: [PATCH 2/2] RISC-V: Make SHA-256, SM3 and SM4 builtins operate on uint32_t

2023-09-11 Thread Tsukasa OI via Gcc-patches
On 2023/09/12 11:44, Kito Cheng wrote: > LGTM, I think llvm and GCC are inconsistent for those intrinsics API > is really unfortunate...so really appreciate making those API align :) I guess that you mean LGTM to this patch set (given the context). If so, I will commit this patch set later. >

Re: [PATCH] RISC-V: Finish Typing Un-Typed Instructions and Turn on Assert

2023-09-11 Thread Lehua Ding
Hi Jeff, On 2023/9/12 11:00, Jeff Law wrote: I'd rather be consistent and make it policy that every insn has a type. Since the type set here will not be used by sched pass (these insn pattern will not exit at shced pass since use define_insn_and_split with condition `TARGET_VECTOR &&

Re: [PATCH 3/3] [V2] [RISC-V] support cm.mva01s cm.mvsa01 in zcmp

2023-09-11 Thread Jeff Law via Gcc-patches
On 9/7/23 14:33, Palmer Dabbelt wrote: On Thu, 07 Sep 2023 13:16:36 PDT (-0700), dimi...@dinux.eu wrote: Hi, This patch appears to have caused PR 111259. Thanks.  Looks like wer'e not running our tests with RTL checking, Patrick is going to try and see if we've got compute time left for

[Bug target/111366] error: inlining failed in call to 'always_inline' 'hwy::PreventElision(int&)void': target specific option mismatch

2023-09-11 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111366 --- Comment #10 from Kewen Lin --- (In reply to Jan Wassenberg from comment #5) > Thanks for reporting this. One might think this is caused by -mcpu=power9 > clashing with our #pragma target altivec,vsx,power8-vector. > > However, what makes

[Bug target/111380] New: Inconsistent behaviors between non-LTO and LTO

2023-09-11 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111380 Bug ID: 111380 Summary: Inconsistent behaviors between non-LTO and LTO Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

Re: [PATCH v5] RISC-V:Optimize the MASK opt generation

2023-09-11 Thread Jeff Law via Gcc-patches
On 9/7/23 19:26, Feng Wang wrote: Supported ISA specs (for use with the -misa-spec= option): diff --git a/gcc/opt-functions.awk b/gcc/opt-functions.awk index 36de4639318..cbfcf7dabcf 100644 --- a/gcc/opt-functions.awk +++ b/gcc/opt-functions.awk @@ -387,3 +387,14 @@ function

Re: [PATCH] RISC-V: Finish Typing Un-Typed Instructions and Turn on Assert

2023-09-11 Thread Jeff Law via Gcc-patches
On 9/11/23 20:33, Lehua Ding wrote: Hi Edwin, Sorry to bother you. I have a small question for you. On 2023/9/12 6:52, Edwin Lu wrote: --- a/gcc/config/riscv/autovec-opt.md +++ b/gcc/config/riscv/autovec-opt.md @@ -649,7 +649,8 @@ (define_insn_and_split "*cond_" gen_int_mode

[Bug target/111366] error: inlining failed in call to 'always_inline' 'hwy::PreventElision(int&)void': target specific option mismatch

2023-09-11 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111366 Kewen Lin changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug libstdc++/66414] string::find ten times slower than strstr

2023-09-11 Thread scc at teamt5 dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66414 --- Comment #16 from Chih-Hsuan Yang --- (In reply to Jonathan Wakely from comment #15) > (In reply to Chih-Hsuan Yang from comment #11) > > Could you please provide an update on the progress here? > > > All progress is already recorded above.

[PATCH 1/2] c++: Implement __is_bounded_array built-in trait

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_bounded_array. gcc/cp/ChangeLog: * cp-trait.def (IS_BOUNDED_ARRAY): Define __is_bounded_array. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_BOUNDED_ARRAY. * semantics.cc (trait_expr_value): Likewise.

[PATCH 2/2] libstdc++: Optimize is_bounded_array trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_bounded_array trait by dispatching to the new __is_bounded_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_bounded_array_v): Use __is_bounded_array built-in trait. Signed-off-by: Ken Matsui ---

[PATCH 0/2] Optimize is_bounded_array trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch series optimizes is_bounded_array trait performance. The first patch implements __is_bounded_array built-in trait. The second patch optimizes is_bounded_array trait performance by using __is_bounded_array built-in trait if available. The performance improvement is shown in the

Re: [PATCH] RISC-V: Add vcreate intrinsics for RVV tuple types

2023-09-11 Thread Kito Cheng via Gcc-patches
LGTM, thanks for implement this :) On Tue, Sep 12, 2023 at 10:16 AM juzhe.zh...@rivai.ai wrote: > > Thanks for support it. > LGTM from my side. > Wait for kito's more comments. > > > > juzhe.zh...@rivai.ai > > From: Li Xu > Date: 2023-09-12 10:08 > To: gcc-patches > CC: kito.cheng; palmer;

Re: [PATCH 2/2] RISC-V: Make SHA-256, SM3 and SM4 builtins operate on uint32_t

2023-09-11 Thread Kito Cheng via Gcc-patches
LGTM, I think llvm and GCC are inconsistent for those intrinsics API is really unfortunate...so really appreciate making those API align :) And did you have plan to add riscv_crypto.h after updating/fixing all builtin? On Tue, Sep 12, 2023 at 9:29 AM Tsukasa OI via Gcc-patches wrote: > > From:

Re: [PATCH] RISC-V: Finish Typing Un-Typed Instructions and Turn on Assert

2023-09-11 Thread Lehua Ding
Hi Edwin, Sorry to bother you. I have a small question for you. On 2023/9/12 6:52, Edwin Lu wrote: --- a/gcc/config/riscv/autovec-opt.md +++ b/gcc/config/riscv/autovec-opt.md @@ -649,7 +649,8 @@ (define_insn_and_split "*cond_" gen_int_mode (GET_MODE_NUNITS (mode), Pmode)};

Re: [PATCH] RISC-V: Add vcreate intrinsics for RVV tuple types

2023-09-11 Thread juzhe.zh...@rivai.ai
Thanks for support it. LGTM from my side. Wait for kito's more comments. juzhe.zh...@rivai.ai From: Li Xu Date: 2023-09-12 10:08 To: gcc-patches CC: kito.cheng; palmer; juzhe.zhong; pan2.li; gaofei; wangfeng; xuli Subject: [PATCH] RISC-V: Add vcreate intrinsics for RVV tuple types From: xuli

[PATCH] RISC-V: Add vcreate intrinsics for RVV tuple types

2023-09-11 Thread Li Xu
From: xuli gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (class vcreate): (BASE): New class. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vcreate): Add vcreate support. *

Re: [PATCH v5] RISC-V:Optimize the MASK opt generation

2023-09-11 Thread Kito Cheng via Gcc-patches
Hi Feng: This version is LGTM, but I guess I would like to ask Jeff or another global maintainer to approve that, anyway I'll follow up this in the next gcc sync up meeting :) On Fri, Sep 8, 2023 at 9:28 AM Feng Wang wrote: > > Accoring to Kito's advice, using "MASK(name) Var(other_flag_name)"

[Bug target/96762] ICE in extract_insn, at recog.c:2294 (error: unrecognizable insn)

2023-09-11 Thread guihaoc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96762 HaoChen Gui changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug target/96762] ICE in extract_insn, at recog.c:2294 (error: unrecognizable insn)

2023-09-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96762 --- Comment #9 from CVS Commits --- The releases/gcc-11 branch has been updated by HaoChen Gui : https://gcc.gnu.org/g:2eb8e5cba7408e2a4016a8f5c48e4980abdd1d08 commit r11-10985-g2eb8e5cba7408e2a4016a8f5c48e4980abdd1d08 Author: Haochen Gui

Re: [PATCH 0/2] resolve confilct between zcmp multi push/pop and shrink-wrap-separate

2023-09-11 Thread Kito Cheng via Gcc-patches
Pushed to trunk, thanks :) On Wed, Sep 6, 2023 at 5:41 PM Fei Gao wrote: > > Enable muti push and pop for Zcmp when shrink-wrap-separate is ineffective. > > Fei Gao (2): > allow targets to check shrink-wrap-separate enabled or not > [V2][RISC-V] enable muti push and pop for Zcmp when

[Bug target/96762] ICE in extract_insn, at recog.c:2294 (error: unrecognizable insn)

2023-09-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96762 --- Comment #8 from CVS Commits --- The releases/gcc-12 branch has been updated by HaoChen Gui : https://gcc.gnu.org/g:ac0773956cef18cd4903365fb675447ee301d725 commit r12-9854-gac0773956cef18cd4903365fb675447ee301d725 Author: Haochen Gui

[Bug target/96762] ICE in extract_insn, at recog.c:2294 (error: unrecognizable insn)

2023-09-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96762 --- Comment #7 from CVS Commits --- The releases/gcc-13 branch has been updated by HaoChen Gui : https://gcc.gnu.org/g:f4358054dbaf7fb361e603e3693d9410312b88e7 commit r13-7793-gf4358054dbaf7fb361e603e3693d9410312b88e7 Author: Haochen Gui

RE: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread Li, Pan2 via Gcc-patches
Got it, will have a try. Pan From: juzhe.zh...@rivai.ai Sent: Tuesday, September 12, 2023 9:30 AM To: Li, Pan2 Cc: kito.cheng ; gcc-patches ; Wang, Yanzhang Subject: Re: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic Add a function call

[Bug target/108812] gcc.target/powerpc/p9-sign_extend-runnable.c fails on power 9 BE

2023-09-11 Thread guihaoc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108812 HaoChen Gui changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED

Re: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread juzhe.zh...@rivai.ai
Add a function call get_non_overloaded_instance into instance. The instance already know it is void vmv (void). In this function search the arglist. and return the real non-overloaded decl. juzhe.zh...@rivai.ai From: Li, Pan2 Date: 2023-09-12 09:20 To: 钟居哲 CC: kito.cheng; gcc-patches; Wang,

[PATCH 1/2] RISC-V: Make bit manipulation value / round number and shift amount types for builtins unsigned

2023-09-11 Thread Tsukasa OI via Gcc-patches
From: Tsukasa OI For bit manipulation operations, input(s) and the manipulated output are better to be unsigned like other target-independent builtins like __builtin_bswap32 and __builtin_popcount. Although this is not completely compatible as before (as the type changes), most code will run

[PATCH 2/2] RISC-V: Make SHA-256, SM3 and SM4 builtins operate on uint32_t

2023-09-11 Thread Tsukasa OI via Gcc-patches
From: Tsukasa OI This is in parity with the LLVM commit a64b3e92c7cb ("[RISCV] Re-define sha256, Zksed, and Zksh intrinsics to use i32 types."). SHA-256, SM3 and SM4 instructions operate on 32-bit integers and upper 32-bits have no effects on RV64 (the output is sign-extended from the original

[PATCH 0/2] RISC-V: Change RISC-V bit manipulation / scalar crypto builtin types

2023-09-11 Thread Tsukasa OI via Gcc-patches
Hello, My research suggests my previous RFC patchs will not break any real-world programs (as far as I could find) and I will submit this patch set (previously, two RFC patch sets) for upstream contribution. RFC PATCH 1 (combined to this):

RE: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread Li, Pan2 via Gcc-patches
We cannot leverage this instance for correctness. The rfun of below code is the overloaded builtin is for the overloaded function, which is registered as void xxx(void) as aarch64 did to avoid the conflict. Let’s take vmv_v_i32m1 as example in rfun table. Index 0: void vmv_v(void) overloaded

[Bug c++/111379] comparison between unequal pointers to void should be illegal during constant evaluation

2023-09-11 Thread de34 at live dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111379 Jiang An changed: What|Removed |Added CC||de34 at live dot cn --- Comment #1 from

[PATCH 3/3] libstdc++: Fix std::not_fn perfect forwarding [PR111327]

2023-09-11 Thread Patrick Palka via Gcc-patches
The previous patch fixed perfect forwarding for std::bind_front. This patch fixes the same issue for std::not_fn. Tested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps 13? PR libstdc++/111327 libstdc++-v3/ChangeLog: * include/std/functional

[PATCH 2/3] libstdc++: Fix std::bind_front perfect forwarding [PR111327]

2023-09-11 Thread Patrick Palka via Gcc-patches
In order to properly implement a perfect forwarding call wrapper (before 'deducing this' at least) we need a total of 8 operator() overloads, 4 main ones and 4 deleted ones for each const/ref qual pair, as described in section 5.5 of P0847R6. Otherwise the wrapper may not perfectly forward

[PATCH 1/3] libstdc++: Remove std::bind_front specialization for no bound args

2023-09-11 Thread Patrick Palka via Gcc-patches
This specialization for the case of no bound args, added by r13-4214-gcbd05ca5ab1231, seems to be mostly obsoleted by r13-5033-ge2eab3c4edb6aa which added [[no_unique_address]] to the main template's data members. And the compile time advantage of avoiding an empty tuple and index_sequence seems

Re: Re: [PATCH 2/2] [RISC-V] Enalble zcmp for -Os

2023-09-11 Thread Fei Gao
On 2023-09-06 16:06  Kito Cheng wrote: > >On Wed, Sep 6, 2023 at 9:47 AM Fei Gao wrote: >> >> On 2023-09-05 20:02  Kito Cheng wrote: >> > >> >> @@ -5569,7 +5571,9 @@ riscv_avoid_multi_push (const struct >> >> riscv_frame_info *frame) >> >>  { >> >>    if (!TARGET_ZCMP || crtl->calls_eh_return

[Linaro-TCWG-CI] gcc patch #75674: FAIL: 88 regressions

2023-09-11 Thread ci_notify--- via Gcc-patches
Dear contributor, our automatic CI has detected problems related to your patch(es). Please find some details below. If you have any questions, please follow up on linaro-toolch...@lists.linaro.org mailing list, Libera's #linaro-tcwg channel, or ping your favourite Linaro toolchain developer

Re: RISC-V: Replace not + bitwise_imm with li + bitwise_not

2023-09-11 Thread Jeff Law via Gcc-patches
On 9/11/23 13:16, Andrew Waterman via Gcc-patches wrote: Note this is a size-speed tradeoff, as the Zcb extension has a 16-bit-wide C.NOT instruction. Might want to suppress this optimization when Zcb is present and the function is being optimize > for size. Yea, let's gate this on

Re: Re: [PATCH V3] RISC-V: Support Dynamic LMUL Cost model

2023-09-11 Thread juzhe.zh...@rivai.ai
>> What about one test with global live ranges? Not a necessity IMHO we can >> still >> add it later. We already have. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-09-12 04:31 To: Juzhe-Zhong; gcc-patches CC: rdapp.gcc; kito.cheng; kito.cheng; jeffreyalaw Subject: Re: [PATCH V3] RISC-V:

Re: [PATCH] RISC-V: Finish Typing Un-Typed Instructions and Turn on Assert

2023-09-11 Thread Jeff Law via Gcc-patches
On 9/11/23 16:52, Edwin Lu wrote: Updates autovec instruction that was added after last patch and turns on the assert statement to ensure all new instructions have a type. * config/riscv/autovec-opt.md: Update type * config/riscv/riscv.cc (riscv_sched_variable_issue): Remove

Re: [PATCH v5] Implement new RTL optimizations pass: fold-mem-offsets.

2023-09-11 Thread Jeff Law via Gcc-patches
On 9/9/23 02:46, Manolis Tsamis wrote: This is a new RTL pass that tries to optimize memory offset calculations by moving them from add immediate instructions to the memory loads/stores. For example it can transform this: addi t4,sp,16 add t2,a6,t4 shl t3,t2,1 ld a2,0(t3)

[Bug tree-optimization/111364] `MAX_EXPR <= a` is not optimized to `a >= b`

2023-09-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111364 --- Comment #3 from Andrew Pinski --- Created attachment 55882 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55882=edit max testcase

[Bug tree-optimization/111364] `MAX_EXPR <= a` is not optimized to `a >= b`

2023-09-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111364 --- Comment #2 from Andrew Pinski --- diff --git a/gcc/match.pd b/gcc/match.pd index 51985c1bad4..bf49c167792 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -3902,9 +3902,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (maxmin @0 (bit_not @1

[PATCH 2/2] libstdc++: Optimize is_scoped_enum trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_scoped_enum trait by dispatching to the new __is_scoped_enum built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scoped_enum): Use __is_scoped_enum built-in trait. (is_scoped_enum_v): Likewise.

[PATCH 1/2] c++: Implement __is_scoped_enum built-in trait

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_scoped_enum. gcc/cp/ChangeLog: * cp-trait.def (IS_SCOPED_ENUM): Define __is_scoped_enum. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SCOPED_ENUM. * semantics.cc (trait_expr_value): Likewise.

[PATCH 0/2] Optimize is_scoped_enum trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch series optimizes is_scoped_enum trait performance. The first patch implements __is_scoped_enum built-in trait. The second patch optimizes is_scoped_enum trait performance by using __is_scoped_enum built-in trait if available. The performance improvement is shown in the following

[Bug tree-optimization/111364] `MAX_EXPR <= a` is not optimized to `a >= b`

2023-09-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111364 --- Comment #1 from Andrew Pinski --- Created attachment 55881 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55881=edit mins testcase

Re: RE: [PATCH v1] RISC-V: Implement RESOLVE_OVERLOADED_BUILTIN for RVV intrinsic

2023-09-11 Thread 钟居哲
I don't understand. +tree +resolve_overloaded_builtin (location_t loc, unsigned int code, + vec *arglist) +{ + if (code >= vec_safe_length (registered_functions)) +return NULL_TREE; + + const registered_function *rfun = (*registered_functions)[code]; + + if (!rfun

[Bug testsuite/111071] [14 Regression] gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp has new failures since commit e7a36e4715c7

2023-09-11 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111071 Thiago Jung Bauermann changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Linaro-TCWG-CI] gcc patch #75674: FAIL: 68 regressions

2023-09-11 Thread ci_notify--- via Gcc-patches
Dear contributor, our automatic CI has detected problems related to your patch(es). Please find some details below. If you have any questions, please follow up on linaro-toolch...@lists.linaro.org mailing list, Libera's #linaro-tcwg channel, or ping your favourite Linaro toolchain developer

[PATCH] RISC-V: Finish Typing Un-Typed Instructions and Turn on Assert

2023-09-11 Thread Edwin Lu
Updates autovec instruction that was added after last patch and turns on the assert statement to ensure all new instructions have a type. * config/riscv/autovec-opt.md: Update type * config/riscv/riscv.cc (riscv_sched_variable_issue): Remove assert Signed-off-by: Edwin Lu ---

[Bug target/111372] libgcc: RISCV C++ exception handling stack usage grew in 13.1

2023-09-11 Thread juzhe.zhong at rivai dot ai via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111372 --- Comment #4 from JuzheZhong --- I am not familiar with this stuff. I would like to see whether kito has good suggestions.

[Bug c++/111379] New: comparison between unequal pointers to void should be illegal during constant evaluation

2023-09-11 Thread pkeir at outlook dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111379 Bug ID: 111379 Summary: comparison between unequal pointers to void should be illegal during constant evaluation Product: gcc Version: 14.0 Status: UNCONFIRMED

[PATCH 2/2] libstdc++: Optimize is_unbounded_array trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_unbounded_array trait by dispatching to the new __is_unbounded_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unbounded_array_v): Use __is_unbounded_array built-in trait. Signed-off-by: Ken Matsui ---

[PATCH 1/2] c++: Implement __is_unbounded_array built-in trait

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_unbounded_array. gcc/cp/ChangeLog: * cp-trait.def (IS_UNBOUNDED_ARRAY): Define __is_unbounded_array. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNBOUNDED_ARRAY. * semantics.cc (trait_expr_value):

[Bug tree-optimization/95185] [11/12/13/14 Regression] Failure to optimize specific kind of sign comparison check

2023-09-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95185 Andrew Pinski changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|pinskia at gcc

[PATCH 0/2] Optimize is_unbounded_array trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch series optimizes is_unbounded_array trait performance. The first patch implements __is_unbounded_array built-in trait. The second patch optimizes is_unbounded_array trait performance by using __is_unbounded_array built-in trait if available. The performance improvement is shown in the

[Bug c++/106310] [11 Regression] lookup after this-> seems wrong for dependent lookup since r12-6754-g30f2c22def739211

2023-09-11 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106310 Jason Merrill changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c++/106890] [11 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071

2023-09-11 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890 Jason Merrill changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c++/106310] [11 Regression] lookup after this-> seems wrong for dependent lookup since r12-6754-g30f2c22def739211

2023-09-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106310 --- Comment #17 from CVS Commits --- The releases/gcc-11 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:506d5f399bef7f2d8c48fd83d853c6ff7811a226 commit r11-10983-g506d5f399bef7f2d8c48fd83d853c6ff7811a226 Author: Jason

[Bug c++/109666] [12 Regression] Segmentation fault with std::array

2023-09-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109666 --- Comment #15 from CVS Commits --- The releases/gcc-11 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:0d7e5f90597167c36c7816f5bcf689472e8b1940 commit r11-10982-g0d7e5f90597167c36c7816f5bcf689472e8b1940 Author: Jason

[Bug c++/106890] [11 Regression] virtual inheritance triggers compiler error when instatiating derived class with in-class initialization since r8-2709-g12659e10c7820071

2023-09-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106890 --- Comment #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:0d7e5f90597167c36c7816f5bcf689472e8b1940 commit r11-10982-g0d7e5f90597167c36c7816f5bcf689472e8b1940 Author: Jason Merrill

[Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE

2023-09-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340 --- Comment #8 from CVS Commits --- The releases/gcc-13 branch has been updated by Uros Bizjak : https://gcc.gnu.org/g:65331a30922887304c183be4686ddaf12e990c6b commit r13-7791-g65331a30922887304c183be4686ddaf12e990c6b Author: Uros Bizjak

[Bug tree-optimization/107881] (a <= b) == (b >= a) should be optimized to (a == b)

2023-09-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107881 --- Comment #15 from Andrew Pinski --- For the ^/!= case here are the missing optimizations (note == can be handled too): ``` int ltgtxor(int a, int b) { _Bool c = a < b; _Bool d = a > b; return c ^ d; // a != b } int

[PING][PATCH 0/9] Add btf_decl_tag C attribute

2023-09-11 Thread David Faust via Gcc-patches
Ping. This series adds a new C language attribute for recording additional information in DWARF and BTF, similar to an existing attribute in clang. https://gcc.gnu.org/pipermail/gcc-patches/2023-July/624156.html There are components in c-family, dwarf, ctf and btf. Thanks. On 7/11/23 14:57,

[Bug modula2/111330] [13 Regression] Bootstrap failure building SeqFile.lo

2023-09-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111330 --- Comment #10 from CVS Commits --- The releases/gcc-13 branch has been updated by Gaius Mulley : https://gcc.gnu.org/g:6facc94692fe1a6a64a68c2dec2b87fb79ac853d commit r13-7790-g6facc94692fe1a6a64a68c2dec2b87fb79ac853d Author: Gaius Mulley

[Bug modula2/111330] [13 Regression] Bootstrap failure building SeqFile.lo

2023-09-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111330 --- Comment #9 from CVS Commits --- The master branch has been updated by Gaius Mulley : https://gcc.gnu.org/g:fbd72a2108d1c05ef7f50acd71d518e769abcced commit r14-3856-gfbd72a2108d1c05ef7f50acd71d518e769abcced Author: Gaius Mulley Date:

Re: [r14-3823 Regression] FAIL: c-c++-common/analyzer/compound-assignment-1.c -std=c++98 (test for warnings, line 72) on Linux/x86_64

2023-09-11 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 11, 2023 at 07:27:57PM +0200, Benjamin Priour via Gcc-patches wrote: > Thanks for the report, > > After investigation it seems the location of the new dejagnu directive for > C++ differs depending on the configuration. > The expected warning is still emitted, but its location differ

[Bug tree-optimization/111348] `(a CMP b) ? minmax : minmax` pattern missing :c on CMP

2023-09-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111348 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |14.0 Status|ASSIGNED

[Bug tree-optimization/111348] `(a CMP b) ? minmax : minmax` pattern missing :c on CMP

2023-09-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111348 --- Comment #3 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:8fdf712a38422952bbcde7e22eabcf821e6676b3 commit r14-3855-g8fdf712a38422952bbcde7e22eabcf821e6676b3 Author: Andrew Pinski Date:

[PATCH] MATCH: [PR111348] add missing :c to cmp in the `(a CMP b) ? minmax : minmax` pattern

2023-09-11 Thread Andrew Pinski via Gcc-patches
When I added this pattern in r14-337-gc43819a9b4cd, I had missed the :c on the cmp part of the pattern meaning there might be some missing optimizations happening. The testcase shows an example of the missed optmization. Committed as obvious after a bootstrap/test on x86_64-linux-gnu.

Re: [PATCH] gimple-match: Do not try UNCOND optimization with COND_LEN.

2023-09-11 Thread Robin Dapp via Gcc-patches
Hi, as Juzhe noticed in gcc.dg/pr92301.c there was still something missing in the last patch. The attached v2 makes sure we always have a COND_LEN operation before returning true and initializes len and bias even if they are unused. Bootstrapped and regtested on aarch64 and x86. Regards Robin

Re: [PATCH V3] RISC-V: Support Dynamic LMUL Cost model

2023-09-11 Thread Robin Dapp via Gcc-patches
Hi Juzhe, glad that we can use the dominator info directly. Could we move the calculation of the info to the beginning (if it's not available)? That makes it clearer that it's a prerequisite. Function comments look good now. Some general remarks kind of similar to v1: - I would prefer a

Re: [C PATCH 1/6 v2] c: reorganize recursive type checking

2023-09-11 Thread Joseph Myers
On Sun, 10 Sep 2023, Martin Uecker via Gcc-patches wrote: > Thanks Joseph, below is a a revised version of this patch > with slight additional changes to the comment of > tagged_types_tu_compatible_p. > > ok for trunk? The revised version of this patch is OK. -- Joseph S. Myers

[Bug libstdc++/111351] constexpr std::string objects permitted to escape constant evaluation when SSO

2023-09-11 Thread foom at fuhm dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111351 --- Comment #4 from James Y Knight --- vector and string are different in one key way: a zero-sized vector has no accessible storage, while a zero-sized string has 1 byte of readable storage -- the NUL terminator. Because of that, I don't think

[Bug modula2/111330] [13 Regression] Bootstrap failure building SeqFile.lo

2023-09-11 Thread gaius at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111330 --- Comment #8 from Gaius Mulley --- Created attachment 55880 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55880=edit Proposed fix v3 Here is v2 together with the -Wcase-enum switch implemented (and related fixes). I'll git commit v2

[Bug c++/106310] [11/12/13 Regression] lookup after this-> seems wrong for dependent lookup since r12-6754-g30f2c22def739211

2023-09-11 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106310 Jason Merrill changed: What|Removed |Added Status|RESOLVED|ASSIGNED Summary|[12/13

[Bug other/111377] [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian

2023-09-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111377 --- Comment #2 from Andrew Pinski --- https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629887.html

Re: RISC-V: Replace not + bitwise_imm with li + bitwise_not

2023-09-11 Thread Andrew Waterman via Gcc-patches
Note this is a size-speed tradeoff, as the Zcb extension has a 16-bit-wide C.NOT instruction. Might want to suppress this optimization when Zcb is present and the function is being optimized for size. On Mon, Sep 11, 2023 at 9:52 AM Jivan Hakobyan via Gcc-patches wrote: > > In the case when we

[Bug libstdc++/66414] string::find ten times slower than strstr

2023-09-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66414 --- Comment #15 from Jonathan Wakely --- (In reply to Chih-Hsuan Yang from comment #11) > Could you please provide an update on the progress here? All progress is already recorded above.

[Bug rtl-optimization/111378] New: Missed optimization for comparing with exact_log2 constants

2023-09-11 Thread lis8215 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111378 Bug ID: 111378 Summary: Missed optimization for comparing with exact_log2 constants Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal

Re: [PATCH] analyzer: implement symbolic value support for CPython plugin's refcnt checker [PR107646]

2023-09-11 Thread David Malcolm via Gcc
On Sun, 2023-09-10 at 22:12 -0400, Eric Feng wrote: > On Thu, Sep 7, 2023 at 1:28 PM David Malcolm > wrote: > > > On Mon, 2023-09-04 at 22:13 -0400, Eric Feng wrote: > > [...snip...] > > > > > > I know you're emulating the old behavior I implemented way back in > > cpychecker, but I don't

Re: [PATCH] analyzer: implement symbolic value support for CPython plugin's refcnt checker [PR107646]

2023-09-11 Thread David Malcolm via Gcc-patches
On Sun, 2023-09-10 at 22:12 -0400, Eric Feng wrote: > On Thu, Sep 7, 2023 at 1:28 PM David Malcolm > wrote: > > > On Mon, 2023-09-04 at 22:13 -0400, Eric Feng wrote: > > [...snip...] > > > > > > I know you're emulating the old behavior I implemented way back in > > cpychecker, but I don't

[committed] i386: Handle CONST_WIDE_INT in output_pic_addr_const [PR111340]

2023-09-11 Thread Uros Bizjak via Gcc-patches
PR target/111340 gcc/ChangeLog: * config/i386/i386.cc (output_pic_addr_const): Handle CONST_WIDE_INT. Call output_addr_const for CASE_CONST_SCALAR_INT. gcc/testsuite/ChangeLog: * gcc.target/i386/pr111340.c: New test. Bootstrapped and regression tested on x86_64-linux-gnu

[Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE

2023-09-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340 --- Comment #7 from CVS Commits --- The master branch has been updated by Uros Bizjak : https://gcc.gnu.org/g:048927ed8561ca994ad853fe85ccf8c2ca07a8fe commit r14-3854-g048927ed8561ca994ad853fe85ccf8c2ca07a8fe Author: Uros Bizjak Date: Mon

[Bug other/111377] [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian

2023-09-11 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111377 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

Re: [PATCH] fortran: Undo new symbols in all namespaces [PR110996]

2023-09-11 Thread Harald Anlauf via Gcc-patches
Hi Mikael, On 9/11/23 14:38, Mikael Morin via Gcc-patches wrote: Hello, this fixes a memory management issue in the fortran frontend. I have included the (reduced) testcase from the PR, even if it wasn't failing here on x86_64 with the test harness. Tested on x86_64-pc-linux-gnu and manually

  1   2   3   >