[PATCH] libstdc++-v3: check for openat

2022-06-21 Thread Alexandre Oliva via Gcc-patches
rtems6.0 has fdopendir, and fcntl.h defines AT_FDCWD and declares openat, but there's no openat in libc. Adjust dir-common.h to not assume ::openat just because of AT_FDCWD. Regstrapped on x86_64-linux-gnu (detects and still uses openat), also tested with a cross to aarch64-rtems6 (detects open

[PATCH] libstdc++: fs: rtems subdir renaming

2022-06-21 Thread Alexandre Oliva via Gcc-patches
RTEMS's implementation of rename(), at least on a temporary RAM filesystem, allows a subdir to be moved into itself, but prevents a dir from being renamed (in?)to an existing directory. Adjust the expectations of filesystem rename tests. Regstrapped on x86_64-linux-gnu, also tested with a cross

Re: [PATCH] libstdc++: testsuite: fs rename to self may fail

2022-06-21 Thread Sebastian Huber
On 22/06/2022 08:24, Alexandre Oliva via Libstdc++ wrote: rtems6's rename() implementation errors with EEXIST when the rename-to filename exists, even when renaming a file to itself or when renaming a nonexisting file. Adjust expectations. Regstrapped on x86_64-linux-gnu, also tested with a cro

[PATCH] libstdc++: testsuite: skip fs last_write_time tests if not available

2022-06-21 Thread Alexandre Oliva via Gcc-patches
The last_write_time functions are defined in ways that are useful, or that fail immediately, depending on various macros. When they fail immediately, the filesystem last_write_time.cc tests fail noisily, but the fail is entirely expected. Define HAVE_LWT in the last_write_time.cc tests, accordi

[PATCH] libstdc++: testsuite: skip fs space tests if not available

2022-06-21 Thread Alexandre Oliva via Gcc-patches
The do_space function is defined in ways that are useful, or that fail immediately, depending on various macros. When it fails immediately, the filesystem space.cc tests fail noisily, but the fail is entirely expected. Define HAVE_SPACE in the space.cc tests, according to the macros that select

[PATCH] libstdc++: testsuite: fs rename to self may fail

2022-06-21 Thread Alexandre Oliva via Gcc-patches
rtems6's rename() implementation errors with EEXIST when the rename-to filename exists, even when renaming a file to itself or when renaming a nonexisting file. Adjust expectations. Regstrapped on x86_64-linux-gnu, also tested with a cross to aarch64-rtems6. Ok to install? PS: https://devel.r

Re: [PATCH] libstdc++: 60241.cc: tolerate slightly shorter aggregate sleep

2022-06-21 Thread Sebastian Huber
On 22/06/2022 08:01, Alexandre Oliva via Gcc-patches wrote: On rtems under qemu, the frequently-interrupted nanosleep ends up sleeping shorter than expected, by a margin of less than 0,3%. I figured failing the library test over a system (emulator?) bug is undesirable, so I put in some toleranc

[PATCH] libstdc++: retry removal of dir entries if dir removal fails

2022-06-21 Thread Alexandre Oliva via Gcc-patches
On some target systems (e.g. rtems6.0), removing directory components while iterating over directory entries may cause some of the directory entries to be skipped, which prevents the removal of the parent directory from succeeding. Advancing the iterator before removing a member proved not to be

Re: [PATCH v5, rs6000] Implemented f[min/max]_optab by xs[min/max]dp [PR103605]

2022-06-21 Thread HAO CHEN GUI via Gcc-patches
Hi, On 21/6/2022 上午 7:08, Segher Boessenkool wrote: > && !flag_trapping_math > > and/or whatever else is needed as well here. > I have a question here. fmin/max are folded to MIN/MAX_EXPR when flag_finite_math_only is set. Seems no-trapping-math is no need to fmin/max? Also xs[min|max]dp do rais

[PATCH] libstdc++: testsuite: test symlnks ifdef _GLIBCXX_HAVE_SYMLINK

2022-06-21 Thread Alexandre Oliva via Gcc-patches
Several filesystem tests expect to be able to create symlinks even when !defined (_GLIBCXX_HAVE_SYMLINK), and fail predictably, reducing the amount of testing of other filesystem features. They are already skipped for mingw targets. I've extended the skipping to other targets in which _GLIBCXX_

[PATCH] libstdc++: testsuite: avoid predictable mkstemp

2022-06-21 Thread Alexandre Oliva via Gcc-patches
This patch was originally meant to reduce the likelihood that nonexistent_path() returns the same pathname for from and to. It was prompted by a target system with a non-random implementation of mkstemp, that returns a predictable sequence of filenames and selects the first one that isn't alread

[PATCH] libstdc++: async: tolerate slightly shorter sleep

2022-06-21 Thread Alexandre Oliva via Gcc-patches
Even without frequent signals interrupting nanosleep, sleep_for on rtems on qemu wakes up too early by a predictable margin of less than 0,3%, which some async tests complain about the too-short wait times. Allow the tests to tolerate a little sleep deprivation. Regstrapped on x86_64-linux-gnu,

[PATCH] libstdc++: 60241.cc: tolerate slightly shorter aggregate sleep

2022-06-21 Thread Alexandre Oliva via Gcc-patches
On rtems under qemu, the frequently-interrupted nanosleep ends up sleeping shorter than expected, by a margin of less than 0,3%. I figured failing the library test over a system (emulator?) bug is undesirable, so I put in some tolerance for the drift. Regstrapped on x86_64-linux-gnu, also teste

[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 target

[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 e

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; I

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 some

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 fi

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 that

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 someone

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- > > Fr

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 enable

[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 tem

[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(). --- gcc/

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 PR9582

[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. bo

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 > subd

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 a

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: >> >> - Tw

[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 insi

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 dif

[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 doesn'

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 _lof

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 register

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 signifi

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 i

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 me

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, th

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 per-fun

[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 b/htdocs/

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
nteresting. 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. L

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 th

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 > has

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 if

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 g

[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 wh

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 g++.dg/abi/pure-virtual1

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 i

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 criti

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 libs

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 1/

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
g. It means 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 > used,

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, bu

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 > implicit

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 c

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 cau

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 interrupted

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 -mpow

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/atta

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

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 >         sub

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 Ta

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