[PATCH v2] Simplify year::is_leap().

2023-11-10 Thread Cassio Neri
The current implementation returns (_M_y & (__is_multiple_of_100 ? 15 : 3)) == 0; where __is_multiple_of_100 is calculated using an obfuscated algorithm which saves one ror instruction when compared to _M_y % 100 == 0 [1]. In leap years calculation, it's mathematically correct to replace the d

[PATCH v2] Remove unnecessary "& 1" in year_month_day_last::day()

2023-11-10 Thread Cassio Neri
When year_month_day_last::day() was implemented, Dr. Matthias Kretz realised that the operation "& 1" wasn't necessary but we did not patch it at that time. This patch removes the unnecessary operation. libstdc++-v3/ChangeLog: * include/std/chrono: --- libstdc++-v3/include/std/chrono | 24 +

[PATCH v2] c++: fix parsing with auto(x) [PR112410]

2023-11-10 Thread Marek Polacek
On Thu, Nov 09, 2023 at 07:07:03PM -0500, Jason Merrill wrote: > On 11/9/23 14:58, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > -- >8 -- > > Here we are wrongly parsing > > > >int y(auto(42)); > > > > which uses the C++23 cast-to-prvalue featu

[PATCH] c-family: Let libcpp know when the compilation is for a PCH [PR9471]

2023-11-10 Thread Lewis Hyatt
Hello- The PR may be 20 years old, but by now it only needs a one-line fix :). Is it OK please? Bootstrapped + regtested all langauges on x86-64 Linux. Thanks! -Lewis https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9471 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47857 -- >8 -- libcpp will gener

Re: [PATCH] libgcc/m68k: Fixes for soft float

2023-11-10 Thread Keith Packard
> I pushed this to the trunk after fixing a few minor whitespace nits. > You didn't mention the divdf change, but I'll assume that was just an > oversight. Yeah, a couple of minor fixes there that I forgot to mention in the log. > I'm largely trusting your reputation on the fpgnulib changes.

[committed] libstdc++: Do not use assume attribute for Clang [PR112467]

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux (-m32 and -m64). Pushed to trunk. -- >8 -- Clang has an 'assume' attribute, but it's a function attribute not a statement attribute. The recently-added use of the statement form causes an error with Clang. libstdc++-v3/ChangeLog: PR libstdc++/112467 * include

[committed] libstdc++: Simplify std::string_view comparisons (LWG 3950)

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- LWG 3950 points out that the comparisons of std::basic_string_view can be simplified to just a single overload of operator== and a single overload of operator<=>. Those overloads work fine for homogeneous comparisons of two string view objects. libs

[committed] libstdc++: Add static_assert to std::integer_sequence [PR112473]

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- C++20 allows class types as non-type template parameters, but std::integer_sequence explicitly disallows them. Enforce that. libstdc++-v3/ChangeLog: PR libstdc++/112473 * include/bits/utility.h (integer_sequence): Add static_assert.

[committed] libstdc++: Fix broken tests for

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- When I added these tests I gave them .h file extensions, so they've never been run. They need to use the no_pch option, so that they only test the header and don't get via . libstdc++-v3/ChangeLog: * testsuite/26_numerics/headers/complex

[committed] libstdc++: Deprecate std::atomic_xxx overloads for std::shared_ptr

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- These overloads are deprecated in C++20 (and likely to be removed for C++26). The std::atomic> specialization should be preferred in new code. libstdc++-v3/ChangeLog: * include/bits/shared_ptr_atomic.h (atomic_is_lock_free) (atomic_

[committed] libstdc++: Fix test that fails with -ffreestanding

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- The -ffreestanding option disables Debug Mode, forcibly #undef'ing _GLIBCXX_DEBUG. This means that the dangling checks in std::pair are disabled for -ffreestanding in C++17 and earlier, because they depend on _GLIBCXX_DEBUG. Adjust the target specifi

[committed] libstdc++: Add [[nodiscard]] to std::span members

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- All std::span member functions are pure functions that have no side effects. They are only useful for their return value, so they should all warn if that value is not used. libstdc++-v3/ChangeLog: * include/std/span (span, as_bytes, as_writ

[committed] libstdc++: Add [[nodiscard]] to lock types

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- Adding this attribute means users get a warning when they accidentally create a temporary lock instead of creating an automatic variable with block scope. For std::lock_guard both constructors have side effects (they both take a mutex and so both ca

[committed] libstdc++: Remove handling for underscore-prefixed libm functions [PR111638]

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- The checks in linkage.m4 try to support math functions prefixed with underscores, like _acosf and _isinf. However, that doesn't work because they're renamed to the standard names using a macro, but then undefines that macro again. This simply remov

Re: [Ping][PATCH] libstdc++: Add missing functions to [PR79700]

2023-11-10 Thread Jonathan Wakely
I've finally convinced myself that this patch is OK, because we provide stub versions of all the functions being declared here. So if a target is missing them, we provide them anyway. That happens to be broken for the avr target, but that defaults to --disable-libstdcxx anyway. I've pushed the pat

[pushed] testsuite: fix lambda-decltype3.C in C++11

2023-11-10 Thread Marek Polacek
Tested x86_64-pc-linux-gnu, applying to trunk. -- >8 -- This fixes FAIL: g++.dg/cpp0x/lambda/lambda-decltype3.C -std=c++11 (test for excess errors) due to lambda-decltype3.C:25:6: error: lambda capture initializers only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions] gcc/tes

Re: [PATCH v3] libiberty: Use posix_spawn in pex-unix when available.

2023-11-10 Thread Patrick O'Neill
On 11/10/23 03:00, Prathamesh Kulkarni wrote: On Thu, 5 Oct 2023 at 00:00, Brendan Shanks wrote: Hi, This patch implements pex_unix_exec_child using posix_spawn when available. This should especially benefit recent macOS (where vfork just calls fork), but should have equivalent or faster per

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

2023-11-10 Thread Peter Bergner
On 8/25/23 6:20 AM, Kewen.Lin wrote: > btw, I was also expecting that we don't implicitly set > OPTION_MASK_PCREL any more for Power10, that is to remove > OPTION_MASK_PCREL from OTHER_POWER10_MASKS. So my patch removes the flag from the default power10 flags, like you want. However, it doesn't r

Re: [PATCH] C99 testsuite readiness: More unverified testcase un-reductions

2023-11-10 Thread Jeff Law
On 11/10/23 15:06, Florian Weimer wrote: gcc/testsuite/ * gcc.c-torture/compile/BUG17.c (main): Add missing int return type and missing void type. * gcc.c-torture/compile/BUG18.c (main): Likewise. Call __builtin_printf instead of printf. * gcc.c-tortur

Re: [PATCH] C99 testsuite readiness: Compile more tests with -std=gnu89

2023-11-10 Thread Jeff Law
On 11/10/23 15:07, Florian Weimer wrote: gcc/testsuite/ * gcc.c-torture/compile/386.c: Compile with -std=gnu89. * gcc.c-torture/compile/BUG1.c: Likewise. * gcc.c-torture/compile/BUG11.c: Likewise. * gcc.c-torture/compile/BUG16.c: Likewise. * gcc.c-tortu

Re: [PATCH] C99 testsuite readiness: Add missing abort, exit declarations

2023-11-10 Thread Jeff Law
On 11/10/23 15:07, Florian Weimer wrote: The execute tests use abort/exit to report failure/success, but they generally do not declare these functions (or include ). This change adds declarations as appropriate. It would have been possible to switch to __builtin_abort and __builtin_exit inste

Re: [PATCH] C99 testsuite readiness: Cleanup of execute tests

2023-11-10 Thread Jeff Law
On 11/10/23 15:07, Florian Weimer wrote: This change updates the gcc.c-torture/execute/ to avoid obsolete language constructs. In the changed tests, use of the features appears to be accidental, and updating allows the tests run with the default compiler flags. gcc/testsuite/ * gcc.

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

2023-11-10 Thread Peter Bergner
On 8/27/23 9:06 PM, Kewen.Lin wrote: > Assuming we only have ELFv2_ABI_CHECK in PCREL_SUPPORTED_BY_OS, we > can have either TARGET_PCREL or !TARGET_PCREL after the checking. > For the latter, it's fine and don't need any checks. For the former, > if it's implicit, for !TARGET_PREFIXED we will clean

[PATCH] MAINTAINERS: Fix formatting

2023-11-10 Thread Sam James
ChangeLog: * MAINTAINERS (Write After Approval): Fix indentation and missing email bracket. Signed-off-by: Sam James --- MAINTAINERS | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index c43167d9a752..9ad68687f769 100644 --- a

Re: [committed] Enable LRA on several ports

2023-11-10 Thread Jeff Law
On 8/13/23 20:11, Hans-Peter Nilsson wrote: On Mon, 1 May 2023, Jeff Law wrote: Spurred by Segher's RFC, I went ahead and tested several ports with LRA enabled. Not surprisingly, many failed, but a few built their full set of libraries successful and of those a few even ran their testsuite

Re: [PATCH] libgcc/m68k: Fixes for soft float

2023-11-10 Thread Jeff Law
On 8/22/23 20:15, Keith Packard via Gcc-patches wrote: Check for non-zero denorm in __adddf3. Need to check both the upper and lower 32-bit chunks of a 64-bit float for a non-zero value when checking to see if the value is -0. Fix __addsf3 when the sum exponent is exactly 0xff to ensure that

Re: [PATCH 4/4] maintainer-scripts/gcc_release: cleanup whitespace

2023-11-10 Thread Sam James
Joseph Myers writes: > On Thu, 2 Nov 2023, Sam James wrote: > >> maintainer-scripts/ >> * gcc_release: Cleanup whitespace. > > OK. Thanks. Would you mind pushing the two you approved?

[Committed] RISC-V: Add test for PR112469

2023-11-10 Thread Juzhe-Zhong
As PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112469 which has been fixed by Richard patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635994.html Add tests to avoid regression. Committed. PR target/112469 gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autov

Re: [PATCH] doc: Add fpatchable-function-entry to Option-Summary page[PR110983]

2023-11-10 Thread Jeff Law
On 8/28/23 23:25, Mao via Gcc-patches wrote: The -fpatchable-function-entry is missing in both the web doc [1] and the man page's "Option Summary" section. This patch is to add it. [1]: https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html THanks. I created a ChangeLog and pushed this to t

Re: [PATCH v3 3/4] ifcvt: Handle multiple rewired regs and refactor noce_convert_multiple_sets

2023-11-10 Thread Jeff Law
On 8/30/23 04:13, Manolis Tsamis wrote: The existing implementation of need_cmov_or_rewire and noce_convert_multiple_sets_1 assumes that sets are either REG or SUBREG. This commit enchances them so they can handle/rewire arbitrary set statements. To do that a new helper struct noce_multiple_s

[PATCH 2/4] Add support for integer vector pair built-ins

2023-11-10 Thread Michael Meissner
This patch adds a series of built-in functions to allow users to write code to do a number of simple operations where the loop is done using the __vector_pair type. The __vector_pair type is an opaque type. These built-in functions keep the two 128-bit vectors within the __vector_pair together, a

Re: [PATCH] libgccjit: Fix GGC segfault when using -flto

2023-11-10 Thread David Malcolm
On Fri, 2023-11-10 at 11:02 -0500, Antoni Boucher wrote: > Hi. > This patch fixes the segfault when using -flto with libgccjit (bug > 111396). > > You mentioned in bugzilla that this didn't fix the reproducer for > you, Rereading https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111396 it looks like a

[PATCH 4/4] Add support for doing a horizontal add on vector pair elements.

2023-11-10 Thread Michael Meissner
This patch adds a series of built-in functions to allow users to write code to do a number of simple operations where the loop is done using the __vector_pair type. The __vector_pair type is an opaque type. These built-in functions keep the two 128-bit vectors within the __vector_pair together, a

[PATCH 3/4] Add support for initializing and extracting from vector pairs

2023-11-10 Thread Michael Meissner
This patch adds a series of built-in functions to allow users to write code to do a number of simple operations where the loop is done using the __vector_pair type. The __vector_pair type is an opaque type. These built-in functions keep the two 128-bit vectors within the __vector_pair together, a

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-10 Thread Jason Merrill
[combined reply to all three threads] On 11/9/23 23:24, waffl3x wrote: I'm unfortunately going down a rabbit hole again. --function.h:608 `/* If pointers to member functions use the least significant bit to indicate whether a function is virtual, ensure a pointer to this function will have t

[PATCH 1/4] Add support for floating point vector pair built-in functions

2023-11-10 Thread Michael Meissner
This patch adds a series of built-in functions to allow users to write code to do a number of simple operations where the loop is done using the __vector_pair type. The __vector_pair type is an opaque type. These built-in functions keep the two 128-bit vectors within the __vector_pair together, a

[PATCH 0/4] Add vector pair builtins to PowerPC

2023-11-10 Thread Michael Meissner
These set of patches add support for using the vector pair load (lxvp, plxvp, and lxvpx) instructions and the vector pair store (stxvp, pstxvp, and stxvpx) that were introduced with ISA 3.1 on Power10 systems. With GCC 13, the only place vector pairs (and vector quads) were used were to feed into

[PATCH, V2] Power10: Add options to disable load and store vector pair.

2023-11-10 Thread Michael Meissner
This is version 2 of the patch to add -mno-load-vector-pair and -mno-store-vector-pair undocumented tuning switches. The differences between the first version of the patch and this version is that I added explicit RTL abi attributes for when the compiler can generate the load vector pair and store

[PATCH] c++/modules: more checks for exporting names with using-declarations

2023-11-10 Thread Nathaniel Shead
I noticed while fixing PR106849 that we don't currently check validity of exporting non-functions via using-declarations either; this patch adds those checks factored out into a new function. I also tried to make the error messages a bit more descriptive. This patch is based on [1] (with the adjus

[PATCH] C99 testsuite readiness: Compile more tests with -std=gnu89

2023-11-10 Thread Florian Weimer
gcc/testsuite/ * gcc.c-torture/compile/386.c: Compile with -std=gnu89. * gcc.c-torture/compile/BUG1.c: Likewise. * gcc.c-torture/compile/BUG11.c: Likewise. * gcc.c-torture/compile/BUG16.c: Likewise. * gcc.c-torture/compile/BUG2.c: Likewise. * gcc.c-t

[PATCH] C99 testsuite readiness: More unverified testcase un-reductions

2023-11-10 Thread Florian Weimer
gcc/testsuite/ * gcc.c-torture/compile/BUG17.c (main): Add missing int return type and missing void type. * gcc.c-torture/compile/BUG18.c (main): Likewise. Call __builtin_printf instead of printf. * gcc.c-torture/compile/BUG21.c (Nase): Add missing void

[PATCH] C99 testsuite readiness: Verified un-reductions

2023-11-10 Thread Florian Weimer
gcc/testsuite/ * gcc.c-torture/compile/20080613-1.c (hop_sendmsg): Call __builtin_memcpy instead of memcpy. * gcc.c-torture/compile/complex-6.c (bar): Declare. * gcc.c-torture/compile/pr23445.c (__brelse): Declare. * gcc.c-torture/compile/pr23946.c (long2str)

[PATCH] C99 testsuite readiness: -fpermissive tests

2023-11-10 Thread Florian Weimer
These tests use obsolete language constructs, but they are not clearly targeting C89, either. So use -fpermissive to keep future errors as warnings. The reasons why obsolete constructs are used used vary from test to test. Some tests deliberately exercise later stages of the compiler that only o

Re: [PATCH v3 4/4] ifcvt: Remove obsolete code for subreg handling in noce_convert_multiple_sets

2023-11-10 Thread Jeff Law
On 8/30/23 04:14, Manolis Tsamis wrote: This code used to handle register replacement issues with SUBREG before simplify_replace_rtx was introduced. This should not be needed anymore as new_val has the correct mode and that should be preserved by simplify_replace_rtx. gcc/ChangeLog:

[committed] RISC-V: Fix indentation of "length" attribute for branches and jumps

2023-11-10 Thread Maciej W. Rozycki
The "length" attribute calculation expressions for branches and jumps are incorrectly and misleadingly indented, and they overrun the 80 column limit as well, all of this causing troubles in following them. Correct all these issues. gcc/ * config/riscv/riscv.md (length): Fix inde

Re: [PATCH v3 2/4] ifcvt: Allow more operations in multiple set if conversion

2023-11-10 Thread Jeff Law
On 10/19/23 13:46, Richard Sandiford wrote: + /* Allow a wide range of operations and let the costing function decide +if the conversion is worth it later. */ + enum rtx_code code = GET_CODE (src); + if (!(CONSTANT_P (src) + || code == REG + || code

Re: [PATCH v3 1/4] ifcvt: handle sequences that clobber flags in noce_convert_multiple_sets

2023-11-10 Thread Jeff Law
On 10/20/23 03:16, Richard Sandiford wrote: Thanks for the context. Robin Dapp writes: Sorry for the slow review. TBH I was hoping someone else would pick it up, since (a) I'm not very familiar with this code, and (b) I don't really agree with the way that the current code works. I'm not

[PATCH 1/3] options: add gcc/regenerate-opt-urls.py

2023-11-10 Thread David Malcolm
gcc/ChangeLog: * doc/options.texi (Option properties): Add UrlSuffix and description of regenerate-opt-urls.py. * regenerate-opt-urls.py: New file. --- gcc/doc/options.texi | 17 ++ gcc/regenerate-opt-urls.py | 366 + 2 files chang

[PATCH 3/3] diagnostics: use the .opt.urls files to urlify quoted text

2023-11-10 Thread David Malcolm
This patch adds machinery for using the .opt.urls files linking to the documentation of our options in gcc_urlifier. For every enabled .opt file, the corresponding .opt.urls file will also be used when constructing the "optionslist" file. The patch adds a new awk script to process the optionslist

[PATCH 0/3] Option handling: add documentation URLs

2023-11-10 Thread David Malcolm
In r14-5118-gc5db4d8ba5f3de I added a mechanism to automatically add URLs to quoted strings in diagnostics. This was based on a data table mapping strings to URLs, with placeholder data covering various pragmas and a couple of options. The following patches add automatic URLification in our diagn

Re: [PATCH] c++: non-dependent .* folding [PR112427]

2023-11-10 Thread Jason Merrill
On 11/10/23 10:28, Patrick Palka wrote: On Fri, 10 Nov 2023, Patrick Palka wrote: On Thu, 9 Nov 2023, Jason Merrill wrote: On 11/8/23 16:59, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Here when building up the non-dependent

Re: [PATCH v3 1/4] ifcvt: handle sequences that clobber flags in noce_convert_multiple_sets

2023-11-10 Thread Jeff Law
On 10/20/23 01:04, Robin Dapp wrote: But I'm not sure which cases this code is trying to catch. Is it trying to catch cases where seq2 "spontaneously" uses registers that happen to overlap with cond? If so, then when does that happen? And if it does happen, wouldn't the sequence also have

Re: [PATCH v3 1/4] ifcvt: handle sequences that clobber flags in noce_convert_multiple_sets

2023-11-10 Thread Jeff Law
On 10/19/23 13:41, Richard Sandiford wrote: Manolis Tsamis writes: This is an extension of what was done in PR106590. Currently if a sequence generated in noce_convert_multiple_sets clobbers the condition rtx (cc_cmp or rev_cc_cmp) then only seq1 is used afterwards (sequences that emit the

Re: [PATCH v3 2/2]middle-end match.pd: optimize fneg (fabs (x)) to copysign (x, -1) [PR109154]

2023-11-10 Thread Andrew Pinski
On Fri, Nov 10, 2023 at 5:12 AM Richard Biener wrote: > > On Fri, 10 Nov 2023, Tamar Christina wrote: > > > > > Hi Prathamesh, > > > > Yes Arm requires SIMD for copysign. The testcases fail because they don't > > turn on Neon. > > > > I'll update them. > > On x86_64 with -m32 I see > > FAIL: gcc.

Re: [RFC 1/2] RISC-V: Add support for _Bfloat16.

2023-11-10 Thread Jeff Law
On 10/25/23 04:15, Jin Ma wrote: +;; The conversion of DF to BF needs to be done with SF if there is a +;; chance to generate at least one instruction, otherwise just using +;; libfunc __truncdfbf2. +(define_expand "truncdfbf2" + [(set (match_operand:BF 0 "register_operand" "=f") +

Re: [PING 2] [C PATCH] Synthesize nonnull attribute for parameters declared with static

2023-11-10 Thread Jeff Law
On 10/21/23 05:09, Martin Uecker wrote: C programmers increasingly use static to indicate that pointer parameters are non-null. Clang can exploit this for warnings and optimizations. GCC has some warnings but not all warnings it has for nonnull. Below is a patch to add a nonnull attribute

Re: [PATCH] attribs: Use existing traits for excl_hash_traits

2023-11-10 Thread Jeff Law
On 11/6/23 05:32, Richard Sandiford wrote: Ping. Richard Sandiford via Gcc-patches writes: excl_hash_traits can be defined more simply by reusing existing traits. Tested on aarch64-linux-gnu. OK to install? Richard gcc/ * attribs.cc (excl_hash_traits): Delete. (test_att

Re: [PATCH 3/3] attribs: Namespace-aware lookup_attribute_spec

2023-11-10 Thread Jeff Law
On 11/6/23 05:24, Richard Sandiford wrote: attribute_ignored_p already used a namespace-aware query to find the attribute_spec for an existing attribute: const attribute_spec *as = lookup_attribute_spec (TREE_PURPOSE (attr)); This patch does the same for other callers in the file. Te

Re: [PATCH 3/3] RISC-V: Add support for XCVbi extension in CV32E40P

2023-11-10 Thread Jeff Law
On 11/8/23 04:09, Mary Bennett wrote: Spec: github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md Contributors: Mary Bennett Nandni Jamnadas Pietra Ferreira Charlie Keaney Jessica Mills Craig Blackmore Simon Cook Jeremy Bennett Hel

Re: [PATCH] c++: fix tf_decltype manipulation for COMPOUND_EXPR

2023-11-10 Thread Patrick Palka
On Fri, 10 Nov 2023, Jason Merrill wrote: > On 11/10/23 12:25, Patrick Palka wrote: > > On Thu, 9 Nov 2023, Jason Merrill wrote: > > > > > On 11/7/23 10:08, Patrick Palka wrote: > > > > bootstrapped and regtested on x86_64-pc-linxu-gnu, does this look OK for > > > > trunk? > > > > > > > > -- >8

Re: [PATCH] Avoid generate vblendps with ymm16+

2023-11-10 Thread Jakub Jelinek
On Thu, Nov 09, 2023 at 03:27:11PM +0800, Hongtao Liu wrote: > On Thu, Nov 9, 2023 at 3:15 PM Hu, Lin1 wrote: > > > > This patch aims to avoid generate vblendps with ymm16+, And have > > bootstrapped and tested on x86_64-pc-linux-gnu{-m32,-m64}. Ok for trunk? > > > > gcc/ChangeLog: > > > >

Re: [PATCH] c++: fix tf_decltype manipulation for COMPOUND_EXPR

2023-11-10 Thread Jason Merrill
On 11/10/23 12:25, Patrick Palka wrote: On Thu, 9 Nov 2023, Jason Merrill wrote: On 11/7/23 10:08, Patrick Palka wrote: bootstrapped and regtested on x86_64-pc-linxu-gnu, does this look OK for trunk? -- >8 -- In the COMPOUND_EXPR case of tsubst_expr, we were redundantly clearing the tf_declt

[Committed] g++: Rely on dg-do-what-default to avoid running pr102788.cc on non-vector targets

2023-11-10 Thread Patrick O'Neill
On 11/9/23 17:20, Jeff Law wrote: On 11/2/23 17:45, Patrick O'Neill wrote: Testcases in g++.dg/vect rely on check_vect_support_and_set_flags to set dg-do-what-default and avoid running vector tests on non-vector targets. The three testcases in this patch overwrite the default with dg-do run.

[PATCH] aarch64: Avoid -Wincompatible-pointer-types warning in Linux unwinder

2023-11-10 Thread Florian Weimer
* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state): Add cast to the expected type in sc assignment. (Almost a v2, but the other issue was already fixed via in r14-4183.) --- libgcc/config/aarch64/linux-unwind.h | 5 - 1 file changed, 4 insertions(+), 1 del

Re: [PATCH] g++: Add require-effective-target to multi-input file testcase pr95401.cc

2023-11-10 Thread Patrick O'Neill
On 11/9/23 17:34, Jeff Law wrote: On 11/3/23 00:18, Patrick O'Neill wrote: On non-vector targets dejagnu attempts dg-do compile for pr95401.cc. This produces a command like this: g++ pr95401.cc pr95401a.cc -S -o pr95401.s which isn't valid (gcc does not accept multiple input files when using

Re: [PATCH] c++: fix tf_decltype manipulation for COMPOUND_EXPR

2023-11-10 Thread Patrick Palka
On Thu, 9 Nov 2023, Jason Merrill wrote: > On 11/7/23 10:08, Patrick Palka wrote: > > bootstrapped and regtested on x86_64-pc-linxu-gnu, does this look OK for > > trunk? > > > > -- >8 -- > > > > In the COMPOUND_EXPR case of tsubst_expr, we were redundantly clearing > > the tf_decltype flag when

[pushed][PR112337][IRA]: Check autoinc and memory address after temporary equivalence substitution

2023-11-10 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112337 The patch was successfully bootstrapped an tested on x86-64, ppc64le, and aarch64. commit b3d1d30eeed67c78e223c146a464d2fdd1dde894 Author: Vladimir N. Makarov Date: Fri Nov 10 11:14:46 2023 -0500 [IRA]: Check

Re: [PATCH][Ada] Fix syntax errors in expect.c

2023-11-10 Thread Marc Poulhiès
Andris Pavēnis writes: > Fixing these errors (attached patch for master branch) was not sufficient for > building Ada cross-compiler, but it fixed compiler errors. > > This would perhaps qualify for trivial change, but it seems that I no more > have > write access (I got it in 2015, but have n

[PATCH] libgccjit: Fix GGC segfault when using -flto

2023-11-10 Thread Antoni Boucher
Hi. This patch fixes the segfault when using -flto with libgccjit (bug 111396). You mentioned in bugzilla that this didn't fix the reproducer for you, but it does for me. At first, the test case would not pass, but running "make install" made it pass. Not sure if this is normal. Could you please

Re: [PATCH 0/7] ira/lra: Support subreg coalesce

2023-11-10 Thread Dimitar Dimitrov
On Fri, Nov 10, 2023 at 04:53:57PM +0800, Lehua Ding wrote: > > > The divide by zero error above is interesting. I'm not sure why > > > ira_reg_class_max_nregs[] yields 0 for the pseudo register 168 in > > > the following rtx: > > > (debug_insn 168 167 169 19 (var_location:SI encoding (reg/v:SI 168

[pushed] Allow md iterators to include other iterators

2023-11-10 Thread Richard Sandiford
This patch allows an .md iterator to include the contents of previous iterators, possibly with an extra condition attached. Too much indirection might become hard to follow, so for the AArch64 changes I tried to stick to things that seemed likely to be uncontroversial: (a) structure iterators tha

[committed] i386: Clear stack protector scratch with zero/sign-extend instruction

2023-11-10 Thread Uros Bizjak
Use unrelated register initializations using zero/sign-extend instructions to clear stack protector scratch register. Handle only SI -> DImode extensions for 64-bit targets, as this is the only extension that triggers the peephole in a non-negligible number. Also use explicit check for word_mode

Re: [PATCH] c++: non-dependent .* folding [PR112427]

2023-11-10 Thread Patrick Palka
On Fri, 10 Nov 2023, Patrick Palka wrote: > On Thu, 9 Nov 2023, Jason Merrill wrote: > > > On 11/8/23 16:59, Patrick Palka wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for > > > trunk? > > > > > > -- >8 -- > > > > > > Here when building up the non-dependent

Re: [PATCH] AArch64: Cleanup memset expansion

2023-11-10 Thread Richard Earnshaw
On 10/11/2023 14:46, Kyrylo Tkachov wrote: -Original Message- From: Richard Earnshaw Sent: Friday, November 10, 2023 11:31 AM To: Wilco Dijkstra ; Kyrylo Tkachov ; GCC Patches Cc: Richard Sandiford ; Richard Earnshaw Subject: Re: [PATCH] AArch64: Cleanup memset expansion On 10

Re: [PATCH] c++: non-dependent .* folding [PR112427]

2023-11-10 Thread Patrick Palka
On Thu, 9 Nov 2023, Jason Merrill wrote: > On 11/8/23 16:59, Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for > > trunk? > > > > -- >8 -- > > > > Here when building up the non-dependent .* expression, we crash from > > fold_convert on 'b.a' due to

Re: [PATCH] riscv: thead: Add support for the XTheadInt ISA extension

2023-11-10 Thread Christoph Müllner
On Tue, Nov 7, 2023 at 4:04 AM Jin Ma wrote: > > The XTheadInt ISA extension provides acceleration interruption > instructions as defined in T-Head-specific: > > * th.ipush > * th.ipop Overall, it looks ok to me. There are just a few small issues to clean up (see below). > > gcc/ChangeLog: > >

Re: [PATCH] c++: constantness of local var in constexpr fn [PR111703, PR112269]

2023-11-10 Thread Patrick Palka
On Wed, 1 Nov 2023, Patrick Palka wrote: > On Tue, 31 Oct 2023, Patrick Palka wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for > > trunk? Does it look OK for release branches as well for sake of PR111703? Ping. > > > > -- >8 -- > > > > potential_constant_

RE: [PATCH] AArch64: Cleanup memset expansion

2023-11-10 Thread Kyrylo Tkachov
> -Original Message- > From: Richard Earnshaw > Sent: Friday, November 10, 2023 11:31 AM > To: Wilco Dijkstra ; Kyrylo Tkachov > ; GCC Patches > Cc: Richard Sandiford ; Richard Earnshaw > > Subject: Re: [PATCH] AArch64: Cleanup memset expansion > > > > On 10/11/2023 10:17, Wilco Dij

Re: PING^1 [PATCH v3] sched: Change no_real_insns_p to no_real_nondebug_insns_p [PR108273]

2023-11-10 Thread Alexander Monakov
On Fri, 10 Nov 2023, Richard Biener wrote: > On Fri, Nov 10, 2023 at 3:18 PM Alexander Monakov wrote: > > > > > > On Fri, 10 Nov 2023, Richard Biener wrote: > > > > > > I'm afraid ignoring debug-only BBs goes contrary to overall > > > > var-tracking design: > > > > DEBUG_INSNs participate in de

Re: [PATCH] tree-ssa-loop-ivopts : Add live analysis in regs used in decision making

2023-11-10 Thread Ajit Agarwal
Hello Richard: On 10/11/23 7:29 pm, Richard Biener wrote: > On Fri, Nov 10, 2023 at 7:42 AM Ajit Agarwal wrote: >> >> Hello Richard: >> >> >> On 09/11/23 6:21 pm, Richard Biener wrote: >>> On Wed, Nov 8, 2023 at 4:00 PM Ajit Agarwal wrote: tree-ssa-loop-ivopts : Add live analysis in re

Re: [PATCH 0/7] ira/lra: Support subreg coalesce

2023-11-10 Thread Jeff Law
On 11/10/23 03:39, Richard Sandiford wrote: Lehua Ding writes: On 2023/11/10 18:16, Richard Sandiford wrote: Lehua Ding writes: Hi Richard, On 2023/11/8 17:40, Richard Sandiford wrote: Tracking subreg liveness will sometimes expose dead code that wasn't obvious without it. PR89606 has

Re: PING^1 [PATCH v3] sched: Change no_real_insns_p to no_real_nondebug_insns_p [PR108273]

2023-11-10 Thread Richard Biener
On Fri, Nov 10, 2023 at 3:18 PM Alexander Monakov wrote: > > > On Fri, 10 Nov 2023, Richard Biener wrote: > > > > I'm afraid ignoring debug-only BBs goes contrary to overall var-tracking > > > design: > > > DEBUG_INSNs participate in dependency graph so that schedulers can remove > > > or > > >

回复:Re: [PATCH v2] RISC-V: Fixbug for that XTheadMemPair causes interrupt to fail.

2023-11-10 Thread 马进(方耀)
I'm very sorry, I misunderstood. There's no difference between them, please ignore it. 马进 阿里巴巴及蚂蚁集团 电话:057128223456-89384085 邮箱:yaofang...@alibaba-inc.com 地址:浙江-杭州-西溪B区 B2-7-E6-090 阿里巴巴及蚂蚁集团 企业主页 信息安全声明:本邮件包含信息归

Re: PING^1 [PATCH v3] sched: Change no_real_insns_p to no_real_nondebug_insns_p [PR108273]

2023-11-10 Thread Alexander Monakov
On Fri, 10 Nov 2023, Richard Biener wrote: > > I'm afraid ignoring debug-only BBs goes contrary to overall var-tracking > > design: > > DEBUG_INSNs participate in dependency graph so that schedulers can remove or > > mutate them as needed when moving real insns across them. > > Note that debug

Re: [PATCH v2] RISC-V: Fixbug for that XTheadMemPair causes interrupt to fail.

2023-11-10 Thread Kito Cheng
I thought Christoph was already committed? Do you mind describing the difference between v1 and v2? On Fri, Nov 10, 2023 at 9:55 PM Jin Ma wrote: > The t0 register is used as a temporary register for interrupts, so it needs > special treatment. It is necessary to avoid using "th.ldd" in the inte

Re: [PATCH] tree-ssa-loop-ivopts : Add live analysis in regs used in decision making

2023-11-10 Thread Richard Biener
On Fri, Nov 10, 2023 at 7:42 AM Ajit Agarwal wrote: > > Hello Richard: > > > On 09/11/23 6:21 pm, Richard Biener wrote: > > On Wed, Nov 8, 2023 at 4:00 PM Ajit Agarwal wrote: > >> > >> tree-ssa-loop-ivopts : Add live analysis in regs used in decision making. > >> > >> Add live anaysis in regs use

[PATCH v2] RISC-V: Fixbug for that XTheadMemPair causes interrupt to fail.

2023-11-10 Thread Jin Ma
The t0 register is used as a temporary register for interrupts, so it needs special treatment. It is necessary to avoid using "th.ldd" in the interrupt program to stop the subsequent operation of the t0 register, so they need to exchange positions in the function "riscv_for_each_saved_reg". gcc/Ch

Re: [PATCH] Simplify vector ((VCE?(a cmp b ? -1 : 0)) < 0) ? c : d to just (VCE:a cmp VCE:b) ? c : d.

2023-11-10 Thread Richard Biener
On Fri, Nov 10, 2023 at 2:52 AM liuhongt wrote: > > When I'm working on PR112443, I notice there's some misoptimizations: after we > fold _mm{,256}_blendv_epi8/pd/ps into gimple, the backend fails to combine it > back to v{,p}blendv{v,ps,pd} since the pattern is too complicated, so I think > maybe

Re: [PATCH, expand] Call misaligned memory reference in expand_builtin_return [PR112417]

2023-11-10 Thread Richard Biener
On Fri, Nov 10, 2023 at 11:10 AM HAO CHEN GUI wrote: > > Hi Richard, > > 在 2023/11/10 17:06, Richard Biener 写道: > > On Fri, Nov 10, 2023 at 8:52 AM HAO CHEN GUI wrote: > >> > >> Hi Richard, > >> Thanks so much for your comments. > >> > >> 在 2023/11/9 19:41, Richard Biener 写道: > >>> I'm not sure

Re: [PATCH V2] Middle-end: Fix bug of induction variable vectorization for RVV

2023-11-10 Thread Richard Biener
On Fri, 10 Nov 2023, Juzhe-Zhong wrote: > PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112438 > > 1. Since SELECT_VL result is not necessary always VF in non-final iteration. > > Current GIMPLE IR is wrong: > > # vect_vec_iv_.8_22 = PHI <_21(4), { 0, 1, 2, ... }(3)> > ... > _35 = .SELECT_VL

Re: PING^1 [PATCH v3] sched: Change no_real_insns_p to no_real_nondebug_insns_p [PR108273]

2023-11-10 Thread Richard Biener
On Fri, Nov 10, 2023 at 12:25 PM Alexander Monakov wrote: > > > On Thu, 9 Nov 2023, Jeff Law wrote: > > > > Yeah, I noticed that the scheduler takes care of DEBUG_INSNs as normal > > > operations. When I started to work on this issue, initially I wanted to > > > try > > > something similar to yo

Re: [PATCH] Handle constant CONSTRUCTORs in operand_compare

2023-11-10 Thread Richard Biener
On Fri, Nov 10, 2023 at 12:17 PM Eric Botcazou wrote: > > Hi, > > this teaches operand_compare to compare constant CONSTRUCTORs, which is quite > helpful for so-called fat pointers in Ada, i.e. objects that are semantically > pointers but are represented by structures made up of two pointers. Thi

Re: [PATCH] RISC-V: Fix bug that XTheadMemPair extension caused fcsr not to be saved and restored before and after interrupt.

2023-11-10 Thread Christoph Müllner
On Fri, Nov 10, 2023 at 2:20 PM Kito Cheng wrote: > > LGTM Committed after shortening the commit message's heading. > > Christoph Müllner 於 2023年11月10日 週五,20:55寫道: >> >> On Fri, Nov 10, 2023 at 8:14 AM Jin Ma wrote: >> > >> > The t0 register is used as a temporary register for interrupts, so it

Re: [PATCH v3] libiberty: Use posix_spawn in pex-unix when available.

2023-11-10 Thread Richard Biener
On Fri, Nov 10, 2023 at 12:01 PM Prathamesh Kulkarni wrote: > > On Thu, 5 Oct 2023 at 00:00, Brendan Shanks wrote: > > > > Hi, > > > > This patch implements pex_unix_exec_child using posix_spawn when > > available. > > > > This should especially benefit recent macOS (where vfork just calls > > fo

Re: Re: [PATCH] RISC-V: Add combine optimization by slideup for vec_init vectorization

2023-11-10 Thread 钟居哲
Thanks. Robin. Committed. >> The test patterns are a bit unwieldy but not a blocker >>IMHO. Could probably done shorter using macro magic? I have no idea. But I think we can revisit it and refine tests when we have time. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-11-10 20:47 To: Juzhe

Re: [PATCH] RISC-V: Fix bug that XTheadMemPair extension caused fcsr not to be saved and restored before and after interrupt.

2023-11-10 Thread Kito Cheng
LGTM Christoph Müllner 於 2023年11月10日 週五,20:55寫道: > On Fri, Nov 10, 2023 at 8:14 AM Jin Ma wrote: > > > > The t0 register is used as a temporary register for interrupts, so it > needs > > special treatment. It is necessary to avoid using "th.ldd" in the > interrupt > > program to stop the subsequ

[PATCH] tree-optimization/110221 - SLP and loop mask/len

2023-11-10 Thread Richard Biener
The following fixes the issue that when SLP stmts are internal defs but appear invariant because they end up only using invariant defs then they get scheduled outside of the loop. This nice optimization breaks down when loop masks or lens are applied since those are not explicitly tracked as depen

Re: [PATCH v3 2/2]middle-end match.pd: optimize fneg (fabs (x)) to copysign (x, -1) [PR109154]

2023-11-10 Thread Richard Biener
On Fri, 10 Nov 2023, Tamar Christina wrote: > > Hi Prathamesh, > > Yes Arm requires SIMD for copysign. The testcases fail because they don't > turn on Neon. > > I'll update them. On x86_64 with -m32 I see FAIL: gcc.dg/pr55152-2.c scan-tree-dump-times optimized ".COPYSIGN" 1 FAIL: gcc.dg/pr55

Re: [PATCH] RISC-V: Fix bug that XTheadMemPair extension caused fcsr not to be saved and restored before and after interrupt.

2023-11-10 Thread Christoph Müllner
On Fri, Nov 10, 2023 at 8:14 AM Jin Ma wrote: > > The t0 register is used as a temporary register for interrupts, so it needs > special treatment. It is necessary to avoid using "th.ldd" in the interrupt > program to stop the subsequent operation of the t0 register, so they need to > exchange posi

[PATCH] RISC-V: testsuite: Fix 32-bit FAILs.

2023-11-10 Thread Robin Dapp
Hi, this patch fixes several more FAILs that would only show up in 32-bit runs. Regards Robin gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/binop/vmul-zvfh-run.c: Adjust. * gcc.target/riscv/rvv/autovec/binop/vsub-zvfh-run.c: Ditto. * gcc.target/riscv/rvv/autov

  1   2   >