[PATCH] sibcall: Adjust BLKmode argument size for alignment padding

2024-10-12 Thread H.J. Lu
Adjust BLKmode argument size for parameter alignment for sibcall check. gcc/ PR middle-end/117098 * calls.cc (store_one_arg): Adjust BLKmode argument size for alignment padding for sibcall check. gcc/testsuite/ PR middle-end/117098 * gcc.dg/sibcall-12.c: New test. OK for master? H.J. From 8b

[PATCH] DSE: add remove_unused_locals to the todos [PR117096]

2024-10-12 Thread Andrew Pinski
This is a better patch to fix PR 117096 (phiopt vs clobbers). The only time we remove clobbers of local variables is during remove_unused_locals. Since DSE might remove all of the stores to a local variable, it makes sense to also try to remove unused local variables afterwards. This shows up more

Re: [Patch] Fortran: Dead-function removal in error.cc (shrinking by 40%)

2024-10-12 Thread rep . dot . nop
On 11 October 2024 16:42:44 CEST, David Malcolm wrote: >On Fri, 2024-10-11 at 15:34 +0100, Paul Richard Thomas wrote: >> Hi Tobias, >> >> Good catch! It looks 'obvious' to me too :-) yeah, thanks for the explicit cleanup >> > * I want to move support range-based locations, which is also a >>

[Patch] Fortran: Fix translatability of diagnostic strings

2024-10-12 Thread Tobias Burnus
I noticed that several diagnostic strings were not tagged as translatable. I fixed them by adding _ or G_ as prefix ( →gcc/ABOUT-GCC-NLS) and moved a single-use string to the message to make it more readable. One error message did not quit fit the pattern, hence, I modified it slightly, and a fe

Greeting-- Professional Men's Undie Supplier

2024-10-12 Thread anne kong
Dear friend,   This is Anne, Office Manager of Wellsucceed Embroidery from Dongguan, China,  sorry to occupy you a few seconds. We are a professional underwear manufacturer with more than 10 years experience in this field. Many big brands are our clients. All kinds of styles can be branded here wit

Re: [PATCH] warning option for traps (-Wtrap)

2024-10-12 Thread Martin Uecker
Am Samstag, dem 12.10.2024 um 18:44 +0200 schrieb Richard Biener: > > > Am 12.10.2024 um 16:43 schrieb Martin Uecker : > > > >  > > There is code which should not fail at run-time. For this, > > it is helpful to get a warning when a compiler inserts traps > > (e.g. sanitizers, hardbools, __buil

Re: [patch, Fortran] Unsigned constants for ISO_FORTRAN_ENV and ISO_C_BINDING

2024-10-12 Thread Thomas Koenig
Hi Jerry, the attached patch implements the constants for UNSIGNED for ISO_FORTRAN_ENV and ISO_C_BINDING.  With this, the implementation of UNSIGNED for gfortran should be complete, modulo bugs, of course. OK for trunk? Looks good to go Thomas. Committed, thanks for the review! Actually, t

Re: [PATCH] warning option for traps (-Wtrap)

2024-10-12 Thread Richard Biener
> Am 12.10.2024 um 16:43 schrieb Martin Uecker : > >  > There is code which should not fail at run-time. For this, > it is helpful to get a warning when a compiler inserts traps > (e.g. sanitizers, hardbools, __builtin_trap(), etc.). > > Having a warning for this also has many other use case

Re: [patch, Fortran] Unsigned constants for ISO_FORTRAN_ENV and ISO_C_BINDING

2024-10-12 Thread Jerry D
On 10/12/24 9:04 AM, Thomas Koenig wrote: Hello world, the attached patch implements the constants for UNSIGNED for ISO_FORTRAN_ENV and ISO_C_BINDING.  With this, the implementation of UNSIGNED for gfortran should be complete, modulo bugs, of course. OK for trunk? Looks good to go Thomas. Th

Re: [Patch] Fortran: Use OpenACC's acc_on_device builtin, fix OpenMP' __builtin_is_initial_device (was: [Patch]

2024-10-12 Thread Tobias Burnus
Anyone feeling like reviewing this patch? (Mainly the Fortran side?!?) — Or should I declare it as OpenMP/(OpenACC) patch and just commit it? → https://gcc.gnu.org/pipermail/gcc-patches/2024-October/664985.html Tobias Tobias Burnus write: I forgot to update the subject line. To make it easier

[patch, Fortran] Unsigned constants for ISO_FORTRAN_ENV and ISO_C_BINDING

2024-10-12 Thread Thomas Koenig
Hello world, the attached patch implements the constants for UNSIGNED for ISO_FORTRAN_ENV and ISO_C_BINDING. With this, the implementation of UNSIGNED for gfortran should be complete, modulo bugs, of course. OK for trunk? Best regards Thomas gcc/fortran/ChangeLog: * dump-par

Re: [PATCH] vect: Fix inconsistency in fully-masked lane-reducing op generation [PR116985]

2024-10-12 Thread Feng Xue OS
Added. Thanks, Feng From: Richard Biener Sent: Saturday, October 12, 2024 8:12 PM To: Feng Xue OS Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] vect: Fix inconsistency in fully-masked lane-reducing op generation [PR116985] On Sat, Oct 12, 2024 at 9:1

[to-be-committed][RISC-V] Avoid unnecessary extensions when value is already extended

2024-10-12 Thread Jeff Law
This is a minor patch from Jivan from roughly a year ago. The basic idea here is similar to what we do when extending values for the sake of comparisons. Specifically if the value is already known to be properly extended, then an extension is just a copy. The original idea was to use a simil

[PATCH] tree-optimization/117104 - add missed guards to max(a,b) != a simplification

2024-10-12 Thread Richard Biener
For vector types we have to make sure the comparison result is a vector type and the resulting compare operation is supported. As the resulting compare is never an equality compare I didn't bother to check for the cbranch case. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed

[PATCH] warning option for traps (-Wtrap)

2024-10-12 Thread Martin Uecker
There is code which should not fail at run-time. For this, it is helpful to get a warning when a compiler inserts traps (e.g. sanitizers, hardbools, __builtin_trap(), etc.). Having a warning for this also has many other use cases, e.g. one can use it with some sanitizer to rule out that some pi

Re: [PATCH] RISC-V: Enable builtin __riscv_mul with Zmmul extension.

2024-10-12 Thread Jeff Law
On 10/10/24 7:59 PM, Tsung Chun Lin wrote: Hi Jeff, Thanks for reviewing and sorry for the testsuite without any update in my patch to cause regression failures.. I will re-submit the patches with the updated testsuite. No worries, it happens to all of us at some time or another. I should

Re: [Patch] Fortran/OpenMP: Warn when mapping polymorphic variables

2024-10-12 Thread Tobias Burnus
Now committed as r15-4291-g34b77d1b9ac53c – see attachment. Except that I have excluded the diagnostic-location changes; here, using ranges makes more sense. (I have patch, that works, but I need to check that it won't cause corner-case issues.) Fortran-part of the ChangeLog (see attachment for

Re: [PATCH 1/2] PR 117048: simplify-rtx: Extend (x << C1) | (X >> C2) --> ROTATE transformation to vector operands

2024-10-12 Thread Jeff Law
On 10/11/24 4:28 AM, Richard Sandiford wrote: Kyrylo Tkachov writes: Hi all, In the testcase from patch [2/2] we want to match a vector rotate operation from an IOR of left and right shifts by immediate. simplify-rtx has code for just that but it looks like it's prepared to do handle only

Re: [PATCH] vect: Fix inconsistency in fully-masked lane-reducing op generation [PR116985]

2024-10-12 Thread Richard Biener
On Sat, Oct 12, 2024 at 9:12 AM Feng Xue OS wrote: > > To align vectorized def/use when lane-reducing op is present in loop > reduction, > we may need to insert extra trivial pass-through copies, which would cause > mismatch between lane-reducing vector copy and loop mask index. This could be > f

Re: [PATCH 2/4] Match: Support form 3 for vector signed integer SAT_SUB

2024-10-12 Thread Richard Biener
On Sat, Oct 12, 2024 at 6:27 AM wrote: > > From: Pan Li > > This patch would like to support the form 3 of the vector signed > integer SAT_SUB. Aka below example: > > Form 3: > #define DEF_VEC_SAT_S_SUB_FMT_3(T, UT, MIN, MAX) \ > void __attribute__((noinline))

Re: [PATCH] phiopt: Clobbers can sometimes get in the way of phiopt [PR117096]

2024-10-12 Thread Richard Biener
On Sat, Oct 12, 2024 at 3:42 AM Andrew Pinski wrote: > > Clobbers in a condition don't cause any improvements and are getting > in the way of doing match and simplify with phiopt. Need to ignore/skip > over them in when seeing if there is only one statement that can moved. > Also since clobbers ha

Re: [PATCH v2] middle-end: [PR middle-end/116926] Allow widening optabs for vec-mode -> scalar-mode

2024-10-12 Thread Richard Biener
On Fri, Oct 11, 2024 at 8:37 PM Victor Do Nascimento wrote: > > The recent refactoring of the dot_prod optab to convert-type exposed a > limitation in how `find_widening_optab_handler_and_mode' is currently > implemented, owing to the fact that, while the function expects the > > GET_MODE_CLASS

Re: [PATCH] Add 'cobol' to Makefile.def

2024-10-12 Thread Arsen Arsenović
Hi, "James K. Lowden" writes: > Hello, > > I just joined the list to begin contributing patches for the COBOL > front end we've been touting for the last 4 years. It's my first > attempt. Please tell me if you'd like to see something different. > > What follows mimics to some degree the out

Re: [PATCH] bootstrap: Fix genmatch build where system gcc defaults to -fPIE -pie

2024-10-12 Thread Richard Biener
> Am 12.10.2024 um 12:00 schrieb Jakub Jelinek : > > Hi! > > Seems our buildbot is unhappy about my latest commit to link genmatch with > libcommon.a in order to support gcc_diag diagnostics in libcpp. > > We have in gcc/configure.ac: > if test x$enable_host_shared = xyes; then > PICFLAG=-f

[PATCH] bootstrap: Fix genmatch build where system gcc defaults to -fPIE -pie

2024-10-12 Thread Jakub Jelinek
Hi! Seems our buildbot is unhappy about my latest commit to link genmatch with libcommon.a in order to support gcc_diag diagnostics in libcpp. We have in gcc/configure.ac: if test x$enable_host_shared = xyes; then PICFLAG=-fPIC elif test x$enable_host_pie = xyes; then PICFLAG=-fPIE elif test

Re: [PATCH] gcc.target/i386/pr53533-[13].c: Adjust assembly scan

2024-10-12 Thread Uros Bizjak
On Sat, Oct 12, 2024 at 12:21 AM H.J. Lu wrote: > > Before > > 1089d083117 Simplify (B * v + C) * D -> BD* v + CD when B,C,D are all > INTEGER_CS > T. > > the loop was > > .L2: > movl (%rdi,%rdx), %eax > addl $12345, %eax > imull $-1564285888, %eax, %eax > leal -333519936(%rax), %eax > movl %eax,

Re: [PATCH] gcc.target/i386/pr115749.c: Use word_mode integer

2024-10-12 Thread Uros Bizjak
On Sat, Oct 12, 2024 at 12:23 AM H.J. Lu wrote: > > Use word_mode integer with func so that 64-bit integer is used with > x32. > > * gcc.target/i386/pr115749.c (uword): New. > (func): Replace unsigned long with uword. OK. Thanks, Uros.

Re: [PATCH] gcc.target/i386/pr55583.c: Use long long for 64-bit integer

2024-10-12 Thread Uros Bizjak
On Sat, Oct 12, 2024 at 12:22 AM H.J. Lu wrote: > > Since long is 32-bit for x32, use long long for 64-bit integer. > > * gcc.target/i386/pr55583.c: Use long long for 64-bit integer. OK. Thanks, Uros.

Re: [PATCH] gcc.target/i386/invariant-ternlog-1.c: Also scan (%edx)

2024-10-12 Thread Uros Bizjak
On Sat, Oct 12, 2024 at 12:19 AM H.J. Lu wrote: > > Since x32 uses (%edx), instead of (%rdx), also scan (%edx). > > * gcc.target/i386/invariant-ternlog-1.c: Also scan (%edx). OK. Thanks, Uros.

[committed] testsuite/i386: Add vector sat_sub testcases [PR112600]

2024-10-12 Thread Uros Bizjak
PR middle-end/112600 gcc/testsuite/ChangeLog: * gcc.target/i386/pr112600-4a.c: New test. * gcc.target/i386/pr112600-4b.c: New test. Tested on x86_64-linux-gnu {,-m32}. Uros. diff --git a/gcc/testsuite/gcc.target/i386/pr112600-4a.c b/gcc/testsuite/gcc.target/i386/pr112600-4a.c new f

Re: [Patch] Fortran: Unify gfc_get_location handling; fix expr->ts bug

2024-10-12 Thread Thomas Koenig
Hi Tobias, This unifies the two locus to location_t conversion functions, preparing for some changes I want to do later. In principle, I had the patch this morning; however, the assert is now exercised more often than before - and it triggered rather unexpected when running the testsuite.

[PATCH] vect: Fix inconsistency in fully-masked lane-reducing op generation [PR116985]

2024-10-12 Thread Feng Xue OS
To align vectorized def/use when lane-reducing op is present in loop reduction, we may need to insert extra trivial pass-through copies, which would cause mismatch between lane-reducing vector copy and loop mask index. This could be fixed by computing the right index around a new counter on effecti