[committed] libstdc++: Add std::formatter specializations for extended float types

2023-08-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This makes it possible to format _Float32, _Float64 etc. in C++20 mode. Previously it was only possible to format them in C++23 when the typedefs and the std::to_chars overloads were defined. Instead of relying on std::to_chars for those types, we

Re: Another bug for __builtin_object_size? (Or expected behavior)

2023-08-17 Thread Siddhesh Poyarekar
On 2023-08-17 16:23, Qing Zhao wrote: Then, I think whatever MIN or MAX, the early phase has more precise information than the later phase, we should use its result if it’s NOT UNKNOWN? We can't be sure about that though, can we? For example for something like this: struct S { int a; ch

Re: Another bug for __builtin_object_size? (Or expected behavior)

2023-08-17 Thread Qing Zhao via Gcc-patches
> On Aug 17, 2023, at 4:57 PM, Siddhesh Poyarekar wrote: > > On 2023-08-17 16:23, Qing Zhao wrote: Then, I think whatever MIN or MAX, the early phase has more precise information than the later phase, we should use its result if it’s NOT UNKNOWN? >>> >>> We can't be sure about

Re: Another bug for __builtin_object_size? (Or expected behavior)

2023-08-17 Thread Siddhesh Poyarekar
On 2023-08-17 17:25, Qing Zhao wrote: It's not exactly the same issue, the earlier discussion was about choosing sizes in the same pass while the current one is about choosing between passes, but I agree it "rhymes". This is what I was alluding to originally (for OST_MINIMUM use MIN_EXPR if b

Re: [committed] libstdc++: Reuse double overload of __convert_to_v if possible

2023-08-17 Thread Hans-Peter Nilsson via Gcc-patches
> Date: Thu, 17 Aug 2023 21:32:29 +0100 > From: Jonathan Wakely via Gcc-patches > Tested x86_64-linux. Pushed to trunk. Does the below typo imply that for x86_64-linux, "__DBL_MANT_DIG__ == __LDBL_MANT_DIG__" is false and the code is actually untested? > libstdc++-v3/ChangeLog: > > * con

[committed] libstdc++: Replace global std::string objects in tzdb.cc

2023-08-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- When the library is built with --disable-libstdcxx-dual-abi the only type of std::string supported is the COW string, and the two global std::string objects in tzdb.cc have to allocate memory. I added them thinking they would fit in the SSO string bu

Re: [committed] libstdc++: Reuse double overload of __convert_to_v if possible

2023-08-17 Thread Jonathan Wakely via Gcc-patches
On Fri, 18 Aug 2023 at 00:20, Hans-Peter Nilsson wrote: > > > Date: Thu, 17 Aug 2023 21:32:29 +0100 > > From: Jonathan Wakely via Gcc-patches > > > Tested x86_64-linux. Pushed to trunk. > > Does the below typo imply that for x86_64-linux, > "__DBL_MANT_DIG__ == __LDBL_MANT_DIG__" is false and the

Re: [PATCH] sso-string@gnu-versioned-namespace [PR83077]

2023-08-17 Thread Jonathan Wakely via Gcc-patches
On Thu, 17 Aug 2023 at 20:44, Jonathan Wakely wrote: > > On Thu, 17 Aug 2023 at 20:37, Jonathan Wakely wrote: > > > > On Thu, 17 Aug 2023 at 19:59, Jonathan Wakely wrote: > > > > > > On Thu, 17 Aug 2023 at 18:40, François Dumont > > > wrote: > > > > > > > > > > > > On 17/08/2023 19:22, Jonatha

RISC-V: Deduplicate #error messages in testsuite

2023-08-17 Thread juzhe.zh...@rivai.ai
FAIL: gcc.target/riscv/zvkn-1.c -O0 (test for excess errors) FAIL: gcc.target/riscv/zvkn-1.c -O1 (test for excess errors) FAIL: gcc.target/riscv/zvkn-1.c -O2 (test for excess errors) FAIL: gcc.target/riscv/zvkn-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess

[PATCH] testsuite: Improve test in dg-require-python-h

2023-08-17 Thread Thiago Jung Bauermann via Gcc-patches
If GCC is tested with a sysroot which doesn't contain a Python installation (e.g., with a command such as "make check-gcc-c FLAGS_UNDER_TEST="--sysroot=/some/path"), but there's a python3-config in $PATH, then the testsuite will pick up the host's Python.h which can't actually be used: Executing o

Re: [PATCH V2] RISC-V: Add the missed half floating-point mode patterns of local_pic_load/store when only use zfhmin or zhinxmin

2023-08-17 Thread Lehua Ding
Committed, thanks Robin and Palmer. -- Original -- From: "Palmer Dabbelt"

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

2023-08-17 Thread Pan Li via Gcc-patches
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 (class binop_frm): Removed. (class reverse_binop_fr

[PATCH] RISC-V: Fix -march error of zhinxmin testcases

2023-08-17 Thread Lehua Ding
This little patch fixs the -march error of a zhinxmin testcase I added earlier and an old zhinxmin testcase, since these testcases are for zhinxmin extension and not zfhmin extension. --- gcc/testsuite/gcc.target/riscv/_Float16-zhinxmin-3.c | 2 +- gcc/testsuite/gcc.target/riscv/_Float16-zhinxmin

Re: [PATCH V2] RISC-V: Forbidden fuse vlmax vsetvl to DEMAND_NONZERO_AVL vsetvl

2023-08-17 Thread Lehua Ding
Committed, thanks Robin. -- Original -- From: "Robin Dapp"

RE: [PATCH v4] libgfortran: Replace mutex with rwlock

2023-08-17 Thread Zhu, Lipeng via Gcc-patches
Hi Thomas, > > Hi Lipeng, > > > May I know any comment or concern on this patch, thanks for your time > > 😄 > > Thanks for your patience in getting this reviewed. > > A few remarks / questions. > > Which strategy is used in this implementation, read-preferring or write- > preferring? And if

[PATCH v6] libgfortran: Replace mutex with rwlock

2023-08-17 Thread Zhu, Lipeng via Gcc-patches
From: Lipeng Zhu This patch try to introduce the rwlock and split the read/write to unit_root tree and unit_cache with rwlock instead of the mutex to increase CPU efficiency. In the get_gfc_unit function, the percentage to step into the insert_unit function is around 30%, in most instances, we ca

Re: [PATCH] improve error for when /usr/include isn't found [PR90835]

2023-08-17 Thread Eric Gallager
On Thu, Aug 17, 2023 at 4:05 PM Iain Sandoe wrote: > > Hi Eric, > > thanks for working on this. > > > On 17 Aug 2023, at 20:35, Eric Gallager wrote: > > > > This is a pretty simple patch that ought to help Darwin users understand > > better why their build is failing when they forget to pass the

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

2023-08-17 Thread Tsukasa OI via Gcc-patches
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 in the RISC-V testsuite, this commit quot

[PATCH 2/2] RISC-V: Add quotes to #error messages (all)

2023-08-17 Thread Tsukasa OI via Gcc-patches
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 in the RISC-V testsuite, this commit quot

[PATCH] i386: Add AVX2 pragma wrapper for AVX512DQVL intrins

2023-08-17 Thread Haochen Jiang via Gcc-patches
Hi all, This patch aims to fix PR111051, which actually make sure that AVX2 intrins are visible to AVX512/AVX10 intrins under any circumstances. I will also apply the same fix on AVX512DQ scalar intrins. Regtested on on x86_64-pc-linux-gnu. Ok for trunk? Thx, Haochen PR target/111051

Re: [PATCH] i386: Add AVX2 pragma wrapper for AVX512DQVL intrins

2023-08-17 Thread Hongtao Liu via Gcc-patches
On Fri, Aug 18, 2023 at 2:01 PM Haochen Jiang via Gcc-patches wrote: > > Hi all, > > This patch aims to fix PR111051, which actually make sure that AVX2 > intrins are visible to AVX512/AVX10 intrins under any circumstances. > > I will also apply the same fix on AVX512DQ scalar intrins. > > Regtest

Re: [PATCH V4 1/4] rs6000: build constant via li;rotldi

2023-08-17 Thread guojiufu via Gcc-patches
Hi Segher, As discussed on "~" vs. "-", "~" is correct for this patch. I updated the patch according to Kewen's comments. If ok, I would commit to trunk. BR, Jeff (Jiufu Guo) On 2023-07-04 11:28, Kewen.Lin wrote: Hi Jeff, on 2023/7/4 10:18, Jiufu Guo via Gcc-patches wrote: Hi, If a c

Re: [PATCH] Document cond_neg, cond_one_cmpl, cond_len_neg and cond_len_one_cmpl standard patterns

2023-08-17 Thread Richard Biener via Gcc-patches
On Thu, Aug 17, 2023 at 9:26 PM Andrew Pinski via Gcc-patches wrote: > > When I added `cond_one_cmpl` (and the corresponding IFN) I had noticed > cond_neg > standard named pattern was not documented and this adds the documentation for > all 4 named patterns now. > > OK? Tested by building the man

Re: [PATCH v3] LoongArch:Implement 128-bit floating point functions in gcc.

2023-08-17 Thread chenxiaolong
在 2023-08-17四的 15:08 +,Joseph Myers写道: > On Thu, 17 Aug 2023, Xi Ruoyao via Gcc-patches wrote: > > > So I guess we just need > > > > builtin_define ("__builtin_fabsq=__builtin_fabsf128"); > > builtin_define ("__builtin_nanq=__builtin_nanf128"); > > > > etc. to map the "q" builtins to "f128"

Re: [PATCH] RISC-V: Fix -march error of zhinxmin testcases

2023-08-17 Thread Robin Dapp via Gcc-patches
> This little patch fixs the -march error of a zhinxmin testcase I added earlier > and an old zhinxmin testcase, since these testcases are for zhinxmin extension > and not zfhmin extension. Arg, I should have noticed that ;) OK, of course. Regards Robin

[PATCH] Support -march=gracemont

2023-08-17 Thread liuhongt via Gcc-patches
Alderlake-N is E-core only, add it as an alias of Alderlake. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Any comments? gcc/ChangeLog: * common/config/i386/cpuinfo.h (get_intel_cpu): Detect Alderlake-N. * common/config/i386/i386-common.cc (alias_table): Suppo

Re: [PATCH v3] LoongArch:Implement 128-bit floating point functions in gcc.

2023-08-17 Thread Xi Ruoyao via Gcc-patches
On Fri, 2023-08-18 at 14:39 +0800, chenxiaolong wrote: > 在 2023-08-17四的 15:08 +,Joseph Myers写道: > > On Thu, 17 Aug 2023, Xi Ruoyao via Gcc-patches wrote: > > > > > So I guess we just need > > > > > > builtin_define ("__builtin_fabsq=__builtin_fabsf128"); > > > builtin_define ("__builtin_nanq=

<    1   2