[PATCH] libstdc++: testsuite: tolerate non-cancelling sleep

2022-06-21 Thread Alexandre Oliva via Gcc-patches
Though sleep, nanosleep and clock_nanosleep are all POSIX cancellation points, not all target systems follow this POSIX requirement. 30_threads/thread/native_handle/cancel.cc will run until it times out on such systems. Rather than failing a C++ library test because of a limitation of the

[PATCH] libstdc++: testsuite: use -lbsd for net_ts on RTEMS

2022-06-21 Thread Alexandre Oliva via Gcc-patches
Networking functions that net_ts tests rely on are defined in libbsd on RTEMS, so link with it. Regstrapped on x86_64-linux-gnu, also tested with a cross to aarch64-rtems6. Ok to install? for libstdc++-v3/ChangeLog * testsuite/lib/dg-options.exp (add_options_for_net_ts): Add

Re: [PATCH] aarch64: testsuite: symbol-range compile only

2022-06-21 Thread Alexandre Oliva via Gcc-patches
On Jun 21, 2022, Richard Sandiford wrote: > Could we instead have a new target selector for whether the memory > map includes xGB of RAM? How about this? Testing on aarch64-rtems6.0. Ok to install? aarch64: testsuite: symbol-range fallback to compile From: Alexandre Oliva On some of our

Re: [PATCH RFA] ubsan: do return check with -fsanitize=unreachable

2022-06-21 Thread Jason Merrill via Gcc-patches
On 6/20/22 16:16, Jason Merrill wrote: On 6/20/22 07:05, Jakub Jelinek wrote: On Fri, Jun 17, 2022 at 05:20:02PM -0400, Jason Merrill wrote: Related to PR104642, the current situation where we get less return checking with just -fsanitize=unreachable than no sanitize flags seems undesirable;

Re: [PATCH RFA] ubsan: default to trap on unreachable at -O0 and -Og [PR104642]

2022-06-21 Thread Jason Merrill via Gcc-patches
On 6/21/22 07:17, Jakub Jelinek wrote: On Mon, Jun 20, 2022 at 04:30:51PM -0400, Jason Merrill wrote: I'd still prefer to see a separate -funreachable-traps. The thing is that -fsanitize{,-recover,-trap}= are global options, not per function (and only tweaked by no_sanitize attribute), while

Re: [PATCH] RISC-V: Add -mtune=thead-c906 to the invoke docs

2022-06-21 Thread Palmer Dabbelt
On Wed, 25 May 2022 23:11:00 PDT (-0700), Kito Cheng wrote: LGTM, thanks :) Committed. On Thu, May 26, 2022 at 10:31 AM Palmer Dabbelt wrote: gcc/ChangeLog * doc/invoke.texi (RISC-V): Document -mtune=thead-c906. Signed-off-by: Palmer Dabbelt --- gcc/doc/invoke.texi | 2 +- 1

Re: [PATCH] libgompd: Fix sizes in OMPD support and add local ICVs finctions.

2022-06-21 Thread Mohamed Atef via Gcc-patches
I forgot the DCO line. And I edited the commit message, but I can't push, even forced push doesn't work. Now I get the non-fast-forward error, is there any way to solve this? On Mon, Jun 20, 2022 at 9:31 AM Jakub Jelinek wrote: > On Fri, Jun 17, 2022 at 01:20:28AM +0200, Mohamed Atef wrote: > >

Re: [PATCH] xtensa: Fix buffer overflow

2022-06-21 Thread Max Filippov via Gcc-patches
On Tue, Jun 21, 2022 at 12:52 PM Takayuki 'January June' Suwa wrote: > > Fortify buffer overflow message reported. > (see https://github.com/earlephilhower/esp-quick-toolchain/issues/36) > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (bswapsi2_internal): > Enlarge the buffer

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-21 Thread Alexandre Oliva via Gcc-patches
On Jun 21, 2022, Fangrui Song wrote: > Is this similar to clang -nostdlib++ ? > When libstdc++ is selected, clang -nostdlib++ removes -lstdc++. Sounds like they're the same indeed, but the clang option you mention makes little sense to me, so I'd rather to introduce the one that does. If

RE: [PATCH 1/2]middle-end Support optimized division by pow2 bitmask

2022-06-21 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Tamar Christina > Sent: Tuesday, June 14, 2022 4:58 PM > To: Richard Sandiford ; Richard Biener > > Cc: gcc-patches@gcc.gnu.org; nd > Subject: RE: [PATCH 1/2]middle-end Support optimized division by pow2 > bitmask > > > > > -Original Message- > >

Re: [PATCH] libstdc++: testsuite: call sched_yield for nonpreemptive targets

2022-06-21 Thread Alexandre Oliva via Gcc-patches
On Jun 21, 2022, Jonathan Wakely wrote: > On Tue, 21 Jun 2022 at 06:54, Alexandre Oliva via Libstdc++ > wrote: >> >> >> As in the gcc testsuite, systems without preemptive multi-threading >> require sched_yield calls to be placed at points in which a context >> switch might be needed to

[PATCH] Fortran: fix simplification of INDEX(str1,str2) [PR105691]

2022-06-21 Thread Harald Anlauf via Gcc-patches
Dear all, compile time simplification of INDEX(str1,str2,back=.true.) gave wrong results. Looking at gfc_simplify_index, this appeared to be close to a complete mess, while the runtime library code - which was developed later - was a relief. The solution is to use the runtime library code as

[PATCH] Inline memchr with a small constant string

2022-06-21 Thread H.J. Lu via Gcc-patches
When memchr is applied on a constant string of no more than the bytes of a word, inline memchr by checking each byte in the constant string. int f (int a) { return __builtin_memchr ("eE", a, 2) != 0; } is simplified to int f (int a) { return (char) a == 'e' || (char) a == 'E'; } gcc/

[PATCH] xtensa: Fix buffer overflow

2022-06-21 Thread Takayuki 'January June' Suwa via Gcc-patches
Fortify buffer overflow message reported. (see https://github.com/earlephilhower/esp-quick-toolchain/issues/36) gcc/ChangeLog: * config/xtensa/xtensa.md (bswapsi2_internal): Enlarge the buffer that is obviously smaller than the template string given to sprintf(). ---

Re: [PATCH v2] tree-optimization/95821 - Convert strlen + strchr to memchr

2022-06-21 Thread Noah Goldstein via Gcc-patches
On Tue, Jun 21, 2022 at 5:01 AM Jakub Jelinek wrote: > > On Mon, Jun 20, 2022 at 02:42:20PM -0700, Noah Goldstein wrote: > > This patch allows for strchr(x, c) to the replace with memchr(x, c, > > strlen(x) + 1) if strlen(x) has already been computed earlier in the > > tree. > > > > Handles

[PATCH v3] tree-optimization/95821 - Convert strlen + strchr to memchr

2022-06-21 Thread Noah Goldstein via Gcc-patches
This patch allows for strchr(x, c) to the replace with memchr(x, c, strlen(x) + 1) if strlen(x) has already been computed earlier in the tree. Handles PR95821: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95821 Since memchr doesn't need to re-find the null terminator it is faster than strchr.

Re: [PATCH V2]rs6000: Store complicated constant into pool

2022-06-21 Thread Segher Boessenkool
Hi! On Thu, Jun 16, 2022 at 03:47:49PM +0800, Jiufu Guo wrote: > Segher Boessenkool writes: > >> >> --- a/gcc/testsuite/gcc.target/powerpc/medium_offset.c > >> >> +++ b/gcc/testsuite/gcc.target/powerpc/medium_offset.c > >> >> @@ -1,7 +1,7 @@ > >> >> /* { dg-do compile { target { powerpc*-*-* }

Re: [PATCH] gcc/configure.ac: fix --enable-fixed-point enablement [PR34422]

2022-06-21 Thread Eric Gallager via Gcc-patches
Hi, I'd like to ping this patch: https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596654.html (cc-ing the build machinery maintainers listed in MAINTAINERS this time) On Tue, Jun 14, 2022 at 3:51 PM Eric Gallager wrote: > > So, in investigating PR target/34422, I discovered that the gcc >

Re: [PATCH] data-ref: Improve non-loop disambiguation [PR106019]

2022-06-21 Thread Richard Biener via Gcc-patches
> Am 21.06.2022 um 17:16 schrieb Richard Sandiford via Gcc-patches > : > > When dr_may_alias_p is called without a loop context, it tries > to use the tree-affine interface to calculate the difference > between the two addresses and use that difference to check whether > the gap between the

Re: [PATCH] Enhance _Hashtable for range insertion 0/5

2022-06-21 Thread Jonathan Wakely via Gcc-patches
On Mon, 20 Jun 2022 at 17:58, François Dumont via Libstdc++ wrote: > > Hi > > Here is a series of patch to enhance _Hashtable behavior mostly in the > context of range insertion. I also start considering the problem of > memory fragmentation in this container with 2 objectives: > > - It is easier

Re: [PATCH] libgo: Recognize off64_t / loff_t type definition of musl libc

2022-06-21 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jun 21, 2022 at 8:16 AM Andreas Schwab wrote: > > On Jun 21 2022, Ian Lance Taylor via Gcc-patches wrote: > > > which seems to be Linux 3.13 and glibc 4.8.4. On that system I see > > That's stone age. I don't know who maintains these systems on the GCC compile farm. Ian

Re: kernel sparse annotations vs. compiler attributes and debug_annotate_{type,decl} WAS: Re: [PATCH 0/9] Add debug_annotate attributes

2022-06-21 Thread Jose E. Marchesi via Gcc-patches
> On 6/17/22 10:18 AM, Jose E. Marchesi wrote: >> Hi Yonghong. >> >>> On 6/15/22 1:57 PM, David Faust wrote: On 6/14/22 22:53, Yonghong Song wrote: > > > On 6/7/22 2:43 PM, David Faust wrote: >> Hello, >> >> This patch series adds support for: >> >> -

[committed] libgomp: Fix up target-31.c test [PR106045]

2022-06-21 Thread Jakub Jelinek via Gcc-patches
Hi! The i variable is used inside of the parallel in: #pragma omp simd safelen(32) private (v) for (i = 0; i < 64; i++) { v = 3 * i; ll[i] = u1 + v * u2[0] + u2[1] + x + y[0] + y[1] + v + h[0] + u3[i]; } where i is predetermined linear (so while

Re: [PATCH] libgo: Recognize off64_t / loff_t type definition of musl libc

2022-06-21 Thread Andreas Schwab
On Jun 21 2022, Ian Lance Taylor via Gcc-patches wrote: > which seems to be Linux 3.13 and glibc 4.8.4. On that system I see That's stone age. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely

[PATCH] data-ref: Improve non-loop disambiguation [PR106019]

2022-06-21 Thread Richard Sandiford via Gcc-patches
When dr_may_alias_p is called without a loop context, it tries to use the tree-affine interface to calculate the difference between the two addresses and use that difference to check whether the gap between the accesses is known at compile time. However, as the example in the PR shows, this

Re: [PATCH] libgo: Recognize off64_t / loff_t type definition of musl libc

2022-06-21 Thread Ian Lance Taylor via Gcc-patches
On Sat, Jun 18, 2022 at 8:59 AM Andreas Schwab wrote: > > On Jun 18 2022, Ian Lance Taylor wrote: > > > What target? > > aarch64-suse-linux, of course. Thanks. Sorry for missing that. > > What is the output of > > > > grep loff_t TARGET/libgo/gen-sysinfo.go > > type ___loff_t int64 > type

Re: PING^1 [PATCH] i386: Disallow sibcall when calling ifunc functions with PIC register

2022-06-21 Thread Uros Bizjak via Gcc-patches
On Tue, Jun 21, 2022 at 4:46 PM H.J. Lu wrote: > > On Mon, Jun 20, 2022 at 7:51 AM Uros Bizjak wrote: > > > > On Mon, Jun 20, 2022 at 4:03 PM H.J. Lu wrote: > > > > > > On Tue, Jun 14, 2022 at 12:25 PM H.J. Lu wrote: > > > > > > > > Disallow siball when calling ifunc functions with PIC

Re: [PATCH] i386: Add syscall to enable AMX for latest kernels

2022-06-21 Thread Uros Bizjak via Gcc-patches
On Tue, Jun 21, 2022 at 9:41 AM Jiang, Haochen wrote: > > > -Original Message- > > From: Uros Bizjak > > Sent: Tuesday, June 21, 2022 3:06 PM > > To: Jiang, Haochen > > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao > > Subject: Re: [PATCH] i386: Add syscall to enable AMX for latest kernels

Re: PING^1 [PATCH] i386: Disallow sibcall when calling ifunc functions with PIC register

2022-06-21 Thread H.J. Lu via Gcc-patches
On Mon, Jun 20, 2022 at 7:51 AM Uros Bizjak wrote: > > On Mon, Jun 20, 2022 at 4:03 PM H.J. Lu wrote: > > > > On Tue, Jun 14, 2022 at 12:25 PM H.J. Lu wrote: > > > > > > Disallow siball when calling ifunc functions with PIC register so that > > > PIC register can be restored. > > > > > > gcc/ >

RE: [PATCH 2/2]middle-end: Support recognition of three-way max/min.

2022-06-21 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Tuesday, June 21, 2022 2:15 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; ja...@redhat.com > Subject: RE: [PATCH 2/2]middle-end: Support recognition of three-way > max/min. > > On Mon, 20 Jun 2022, Tamar Christina wrote:

doc: Document module language-linkage supported

2022-06-21 Thread Nathan Sidwell via Gcc-patches
I missed we documented this as unimplemented, when I implemented it. -- Nathan SidwellFrom f1fcd6e3ad911945bc3c24a3a5c7ea99b910121e Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 21 Jun 2022 06:23:11 -0700 Subject: [PATCH] doc: Document module language-linkage supported I missed we

RE: [PATCH 2/2]middle-end: Support recognition of three-way max/min.

2022-06-21 Thread Richard Biener via Gcc-patches
On Mon, 20 Jun 2022, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Monday, June 20, 2022 9:36 AM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; ja...@redhat.com > > Subject: Re: [PATCH 2/2]middle-end: Support recognition of three-way > >

Re: [PATCH][wwwdocs] gcc-13: m2link branch

2022-06-21 Thread Gaius Mulley via Gcc-patches
Gerald Pfeifer writes: > Hi Gaius, > > On Tue, 21 Jun 2022, Gaius Mulley wrote: >> here is a proposed entry describing a new branch m2link containing the >> new scaffold development for modula-2. As the description says it is >> expected that this branch be short lived - terminating once

Re: [PATCH] libgo: Recognize off64_t / loff_t type definition of musl libc

2022-06-21 Thread Franz Sirl
Am 2022-06-21 um 09:34 schrieb Sören Tempel via Gcc-patches: Hi, The problem is: glibc defines loff_t in sys/types.h, not fcntl.h (where musl defines it). I falsely assumed that the newly committed AC_CHECK_TYPES invocation would include fcntl.h *in addition to* AC_INCLUDES_DEFAULT. However, as

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Richard Biener via Gcc-patches
On Tue, Jun 21, 2022 at 12:05 PM Xionghu Luo wrote: > > > > On 2022/6/21 15:33, Richard Biener via Gcc-patches wrote: > > On Tue, Jun 21, 2022 at 5:06 AM xionghuluo(罗雄虎) via Gcc-patches > > wrote: > >> > >> > >> Bootstrap and regression tested pass on x86_64-linux-gnu, OK for master? > > > > OK

Re: [PATCH v2] tree-optimization/95821 - Convert strlen + strchr to memchr

2022-06-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 20, 2022 at 02:42:20PM -0700, Noah Goldstein wrote: > This patch allows for strchr(x, c) to the replace with memchr(x, c, > strlen(x) + 1) if strlen(x) has already been computed earlier in the > tree. > > Handles PR95821: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95821 > > Since

Re: [PATCH][wwwdocs] gcc-13: m2link branch

2022-06-21 Thread Gerald Pfeifer
Hi Gaius, On Tue, 21 Jun 2022, Gaius Mulley wrote: > here is a proposed entry describing a new branch m2link containing the > new scaffold development for modula-2. As the description says it is > expected that this branch be short lived - terminating once significant > regression tests pass,

Re: [PATCH RFA] ubsan: default to trap on unreachable at -O0 and -Og [PR104642]

2022-06-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 20, 2022 at 04:30:51PM -0400, Jason Merrill wrote: I'd still prefer to see a separate -funreachable-traps. The thing is that -fsanitize{,-recover,-trap}= are global options, not per function (and only tweaked by no_sanitize attribute), while something that needs to depend on the

[PATCH][wwwdocs] gcc-13: m2link branch

2022-06-21 Thread Gaius Mulley via Gcc-patches
Hi, here is a proposed entry describing a new branch m2link containing the new scaffold development for modula-2. As the description says it is expected that this branch be short lived - terminating once significant regression tests pass, regards, Gaius diff --git a/htdocs/git.html

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Xionghu Luo via Gcc-patches
. It means Thunderbird can't deal with the email format and I can't see any attachment in the email. It was sent by outlook, seems not work well with thunderbird... Martin The patch is an attachment: https://gcc.gnu.org/pipermail/gcc-patches/attachments/20220621/dbb112d2/attachment-0001.obj

Re: [PATCH] aarch64: testsuite: symbol-range compile only

2022-06-21 Thread Richard Sandiford via Gcc-patches
Alexandre Oliva writes: > On some of our embedded aarch64 targets, RAM size is too small for > this test to fit. It doesn't look like this test requires linking, > and if it does, the -tiny version may presumably get most of the > coverage without going overboard in target system requirements.

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Xionghu Luo via Gcc-patches
On 2022/6/21 15:33, Richard Biener via Gcc-patches wrote: On Tue, Jun 21, 2022 at 5:06 AM xionghuluo(罗雄虎) via Gcc-patches wrote: Bootstrap and regression tested pass on x86_64-linux-gnu, OK for master? OK if you add a comment that an empty conditions_in_bbs indicates we are processing

Re: [PATCH] ifcvt: Don't introduce trapping or faulting reads in noce_try_sign_mask [PR106032]

2022-06-21 Thread Richard Biener via Gcc-patches
On Tue, 21 Jun 2022, Jakub Jelinek wrote: > Hi! > > noce_try_sign_mask as documented will optimize > if (c < 0) > x = t; > else > x = 0; > into x = (c >> bitsm1) & t; > The optimization is done if either t is unconditional > (e.g. for > x = t; > if (c >= 0) > x = 0; > ) or if

Re: [PATCH] expand: Fix up expand_cond_expr_using_cmove [PR106030]

2022-06-21 Thread Richard Biener via Gcc-patches
On Tue, 21 Jun 2022, Jakub Jelinek wrote: > Hi! > > If expand_cond_expr_using_cmove can't find a cmove optab for a particular > mode, it tries to promote the mode and perform the cmove in the promoted > mode. > > The testcase in the patch ICEs on arm because in that case we pass temp which >

Re: [PATCH 2/3] lto-plugin: make claim_file_handler thread-safe

2022-06-21 Thread Martin Liška
On 6/21/22 09:56, Richard Biener wrote: > On Mon, Jun 20, 2022 at 12:20 PM Martin Liška wrote: >> >> On 6/20/22 11:32, Richard Biener wrote: >>> On Thu, Jun 16, 2022 at 9:01 AM Martin Liška wrote: lto-plugin/ChangeLog: * lto-plugin.c (plugin_lock): New lock.

[PATCH] ifcvt: Don't introduce trapping or faulting reads in noce_try_sign_mask [PR106032]

2022-06-21 Thread Jakub Jelinek via Gcc-patches
Hi! noce_try_sign_mask as documented will optimize if (c < 0) x = t; else x = 0; into x = (c >> bitsm1) & t; The optimization is done if either t is unconditional (e.g. for x = t; if (c >= 0) x = 0; ) or if it is cheap. We already check that t doesn't have side-effects, but

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-21 Thread Fangrui Song via Gcc-patches
On 2022-06-21, Richard Biener wrote: On Tue, Jun 21, 2022 at 9:53 AM Fangrui Song wrote: On Tue, Jun 21, 2022 at 1:43 AM Richard Biener via Gcc-patches wrote: > > On Tue, Jun 21, 2022 at 7:56 AM Alexandre Oliva via Gcc-patches > wrote: > > > > > > Using g++ to link without libstdc++, as in

[PATCH] expand: Fix up expand_cond_expr_using_cmove [PR106030]

2022-06-21 Thread Jakub Jelinek via Gcc-patches
Hi! If expand_cond_expr_using_cmove can't find a cmove optab for a particular mode, it tries to promote the mode and perform the cmove in the promoted mode. The testcase in the patch ICEs on arm because in that case we pass temp which has the promoted mode (SImode) as target to expand_operands

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-21 Thread Richard Biener via Gcc-patches
On Tue, Jun 21, 2022 at 9:53 AM Fangrui Song wrote: > > On Tue, Jun 21, 2022 at 1:43 AM Richard Biener via Gcc-patches > wrote: > > > > On Tue, Jun 21, 2022 at 7:56 AM Alexandre Oliva via Gcc-patches > > wrote: > > > > > > > > > Using g++ to link without libstdc++, as in

Re: [PATCH v4] tree-optimization/94899: Remove "+ 0x80000000" in int comparisons

2022-06-21 Thread Richard Biener via Gcc-patches
On Mon, Jun 20, 2022 at 4:23 PM Arjun Shankar wrote: > > Expressions of the form "X + CST < Y + CST" where: > > * CST is an unsigned integer constant with only the MSB set, and > * X and Y's types have integer conversion ranks <= CST's > > can be simplified to "(signed) X < (signed) Y". > > This

Re: [PATCH 2/3] lto-plugin: make claim_file_handler thread-safe

2022-06-21 Thread Richard Biener via Gcc-patches
On Mon, Jun 20, 2022 at 12:20 PM Martin Liška wrote: > > On 6/20/22 11:32, Richard Biener wrote: > > On Thu, Jun 16, 2022 at 9:01 AM Martin Liška wrote: > >> > >> lto-plugin/ChangeLog: > >> > >> * lto-plugin.c (plugin_lock): New lock. > >> (claim_file_handler): Use mutex for

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-21 Thread Fangrui Song via Gcc-patches
On Tue, Jun 21, 2022 at 1:43 AM Richard Biener via Gcc-patches wrote: > > On Tue, Jun 21, 2022 at 7:56 AM Alexandre Oliva via Gcc-patches > wrote: > > > > > > Using g++ to link without libstdc++, as in g++.dg/abi/pure-virtual1.C, > > is error prone, because there's no way to tell g++ to drop

Re: [PATCH 1/2]middle-end: Simplify subtract where both arguments are being bitwise inverted.

2022-06-21 Thread Richard Biener via Gcc-patches
On Mon, Jun 20, 2022 at 10:49 AM Tamar Christina wrote: > > > -Original Message- > > From: Richard Sandiford > > Sent: Monday, June 20, 2022 9:19 AM > > To: Richard Biener via Gcc-patches > > Cc: Tamar Christina ; Richard Biener > > ; Richard Guenther ; > > nd > > Subject: Re: [PATCH

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Martin Liška
s Thunderbird can't deal with the email format and I can't see any attachment in the email. Martin > > The patch is an attachment: > > https://gcc.gnu.org/pipermail/gcc-patches/attachments/20220621/dbb112d2/attachment-0001.obj >

Re: [PATCH v3] tree-optimization/94899: Remove "+ 0x80000000" in int comparisons

2022-06-21 Thread Richard Biener via Gcc-patches
On Mon, Jun 20, 2022 at 10:38 AM Jakub Jelinek wrote: > > On Mon, Jun 20, 2022 at 09:36:28AM +0200, Richard Biener wrote: > > > --- a/gcc/match.pd > > > +++ b/gcc/match.pd > > > @@ -2080,6 +2080,19 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > > >(if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0)) > > >

RE: [PATCH] i386: Add syscall to enable AMX for latest kernels

2022-06-21 Thread Jiang, Haochen via Gcc-patches
> -Original Message- > From: Uros Bizjak > Sent: Tuesday, June 21, 2022 3:06 PM > To: Jiang, Haochen > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao > Subject: Re: [PATCH] i386: Add syscall to enable AMX for latest kernels > > On Tue, Jun 21, 2022 at 4:23 AM Jiang, Haochen > wrote: > > >

Re: [PATCH] libstdc++: eh_globals: gthreads: reset _S_init before deleting key

2022-06-21 Thread Jonathan Wakely via Gcc-patches
On Tue, 21 Jun 2022 at 07:04, Alexandre Oliva via Libstdc++ wrote: > > > Clear __eh_globals_init's _S_init in the dtor before deleting the > gthread key. > > This ensures that, in case any code involved in deleting the key > interacts with eh_globals, the key that is being deleted won't be >

Re: [PATCH] libstdc++: testsuite: call sched_yield for nonpreemptive targets

2022-06-21 Thread Jonathan Wakely via Gcc-patches
On Tue, 21 Jun 2022 at 06:54, Alexandre Oliva via Libstdc++ wrote: > > > As in the gcc testsuite, systems without preemptive multi-threading > require sched_yield calls to be placed at points in which a context > switch might be needed to enable the test to complete. I'll try to remember that,

Re: [PATCH] Introduce -nolibstdc++ option

2022-06-21 Thread Richard Biener via Gcc-patches
On Tue, Jun 21, 2022 at 7:56 AM Alexandre Oliva via Gcc-patches wrote: > > > Using g++ to link without libstdc++, as in g++.dg/abi/pure-virtual1.C, > is error prone, because there's no way to tell g++ to drop libstdc++ > without also dropping libc and any other libraries that the target >

Re: [PATCH] libstdc++: testsuite: require cmath for nexttowardl

2022-06-21 Thread Jonathan Wakely via Gcc-patches
On Tue, 21 Jun 2022 at 06:36, Alexandre Oliva via Libstdc++ wrote: > > > nexttowardl is only expected to be available with C99 math, but > 20_util/to_chars/long_double.cc uses it unconditionally. > > State the cmath requirement in the test. > > Regstrapped on x86_64-linux-gnu, also tested with a

Re: [PATCH v1.1] tree-optimization/105736: Don't let error_mark_node escape for ADDR_EXPR

2022-06-21 Thread Siddhesh Poyarekar
On 20/06/2022 15:20, Jakub Jelinek wrote: On Tue, Jun 14, 2022 at 09:01:54PM +0530, Siddhesh Poyarekar wrote: The addr_expr computation does not check for error_mark_node before returning the size expression. This used to work in the constant case because the conversion to uhwi would end up

Re: [PATCH] libstdc++: testsuite: work around bitset namespace pollution

2022-06-21 Thread Jonathan Wakely via Gcc-patches
On Tue, 21 Jun 2022 at 06:32, Alexandre Oliva via Libstdc++ wrote: > > > rtems6 declares a global struct bitset in a header file included > indirectly by sys/types.h, that ambiguates the unqualified references > to bitset after "using namespace std" in the testsuite. > > Work around the namespace

Re: [PATCH] testsuite: outputs.exp: cleanup before running tests (was: Re: [PATCH] testsuite: outputs.exp: test for skip_atsave more thoroughly)

2022-06-21 Thread Richard Biener via Gcc-patches
On Tue, Jun 21, 2022 at 7:47 AM Alexandre Oliva via Gcc-patches wrote: > > On Jun 21, 2022, Alexandre Oliva wrote: > > > * gcc.misc-tests/outputs.exp (outest): Introduce quiet mode, > > Use the just-added dry-run infrastructure to clean up files that may > have been left over by

Re: [rs6000 PATCH] PR target/105991: Recognize PLUS and XOR forms of rldimi.

2022-06-21 Thread Segher Boessenkool
On Tue, Jun 21, 2022 at 10:03:18AM +0800, Kewen.Lin wrote: > This case also needs effective-target keyword lp64, > that is /* { dg-require-effective-target lp64 } */ Good point. Yes. It would be nice to have just has_arch_ppc64 really. > since with -m32, it gets: > mr 3,4 > > with -m32

Re: [PATCH] testsuite: outputs.exp: test for skip_atsave more thoroughly

2022-06-21 Thread Richard Biener via Gcc-patches
On Tue, Jun 21, 2022 at 7:45 AM Alexandre Oliva via Gcc-patches wrote: > > > The presence of -I or -L flags in link command lines changes the > driver's, and thus the linker's behavior, WRT naming files with > command-line options. With such flags, the driver creates .args.0 and > .args.1 files,

Re: [PATCH] libgo: Recognize off64_t / loff_t type definition of musl libc

2022-06-21 Thread Sören Tempel via Gcc-patches
Hi, The problem is: glibc defines loff_t in sys/types.h, not fcntl.h (where musl defines it). I falsely assumed that the newly committed AC_CHECK_TYPES invocation would include fcntl.h *in addition to* AC_INCLUDES_DEFAULT. However, as it turns out specifying includes for AC_CHECK_TYPES overwrites

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Xi Ruoyao via Gcc-patches
On Tue, 2022-06-21 at 09:28 +0200, Martin Liška wrote: > Sorry, but I don't see to which email this replies to? > Can't find a patch. https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596913.html The patch is an attachment: https://gcc.gnu.org/pipermail/gcc-patches/attachments/20

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Richard Biener via Gcc-patches
On Tue, Jun 21, 2022 at 5:06 AM xionghuluo(罗雄虎) via Gcc-patches wrote: > > Current GCC generates: > > > test2: > .LFB0: > .cfi_startproc > xorl %edx, %edx > cmpl $3, (%rdi) > jle .L1 > movl 16(%rdi), %eax > cmpl $1, %eax > je .L4 > subl $2, %eax > cmpl

Re: [PATCH] if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740]

2022-06-21 Thread Martin Liška
On 6/21/22 05:44, Xionghu Luo via Gcc-patches wrote: > Correct the format... > >  test2: > .LFB0: >         .cfi_startproc >         xorl    %edx, %edx >         cmpl    $3, (%rdi) >         jle     .L1 >         movl    16(%rdi), %eax >         cmpl    $1, %eax >         je      .L4 >        

RE: [PATCH 2/2]middle-end: Support recognition of three-way max/min.

2022-06-21 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Andrew Pinski > Sent: Tuesday, June 21, 2022 12:16 AM > To: Tamar Christina > Cc: GCC Patches ; Jakub Jelinek > ; nd ; Richard Guenther > > Subject: Re: [PATCH 2/2]middle-end: Support recognition of three-way > max/min. > > On Thu, Jun 16, 2022 at 4:11 AM

Re: [PATCH] i386: Add syscall to enable AMX for latest kernels

2022-06-21 Thread Uros Bizjak via Gcc-patches
On Tue, Jun 21, 2022 at 4:23 AM Jiang, Haochen wrote: > > > -Original Message- > > From: Uros Bizjak > > Sent: Monday, June 20, 2022 10:54 PM > > To: Jiang, Haochen > > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao > > Subject: Re: [PATCH] i386: Add syscall to enable AMX for latest kernels

Re: [PATCH] c++: testsuite: require lto_incremental in pr90990_0.C

2022-06-21 Thread Richard Biener via Gcc-patches
On Tue, 21 Jun 2022, Alexandre Oliva wrote: > > Other LTO tests that use -r require the lto_incremental effective > target. I suppose pr90990_0.C is missing it due to an oversight. > This patch arranges for this test to also be skipped on > non-lto_incremental targets. > > Regstrapped on

Re: [PATCH 2/2]middle-end: Support recognition of three-way max/min.

2022-06-21 Thread Richard Biener via Gcc-patches
On Mon, 20 Jun 2022, Andrew Pinski wrote: > On Thu, Jun 16, 2022 at 4:11 AM Tamar Christina via Gcc-patches > wrote: > > > > Hi All, > > > > This patch adds support for three-way min/max recognition in phi-opts. > > > > Concretely for e.g. > > > > #include > > > > uint8_t three_min (uint8_t xc,

[PATCH] libstdc++: eh_globals: gthreads: reset _S_init before deleting key

2022-06-21 Thread Alexandre Oliva via Gcc-patches
Clear __eh_globals_init's _S_init in the dtor before deleting the gthread key. This ensures that, in case any code involved in deleting the key interacts with eh_globals, the key that is being deleted won't be used, and the non-thread-specific eh_globals fallback will. Regstrapped on