Re: [PATCH v3] testsuite: Add dg-do run to more tests

2024-07-17 Thread Richard Biener
On Thu, Jul 18, 2024 at 4:09 AM Sam James wrote: > > All of these are for wrong-code bugs. Confirmed to be used before but > with no execution. > > Tested on x86_64-pc-linux-gnu and checked test logs before/after. OK for both. > 2024-07-18 Sam James > > PR c++/53288 > PR c++/5

Re: [PATCH] Implement a -ftrapping-math/-fsignaling-nans TODO in match.pd.

2024-07-17 Thread Richard Biener
On Thu, Jul 18, 2024 at 12:54 AM Roger Sayle wrote: > > I've been investigating some (float)i == CST optimizations for match.pd, > and noticed there's already a TODO comment in match.pd that's relatively > easy to implement. When CST is a NaN, we only need to worry about > exceptions with flag_tr

Re: [PATCH v2] i386: Fix testcases generating invalid asm

2024-07-17 Thread Uros Bizjak
On Thu, Jul 18, 2024 at 8:52 AM Haochen Jiang wrote: > > Hi all, > > I revised the patch according to the comment. > > Ok for trunk? > > Thx, > Haochen > > --- > > Changes in v2: Add suffix for mov to make the test more robust. > > --- > > For compile test, we should generate valid asm except for

[PATCH v2] i386: Fix testcases generating invalid asm

2024-07-17 Thread Haochen Jiang
Hi all, I revised the patch according to the comment. Ok for trunk? Thx, Haochen --- Changes in v2: Add suffix for mov to make the test more robust. --- For compile test, we should generate valid asm except for special purposes. Fix the compile test that generates invalid asm. gcc/testsuite

[PATCH][aarch64] Document rewriting of -march=native to -mcpu=native

2024-07-17 Thread Kyrylo Tkachov
Hi all, Commit dd9e5f4db2debf1429feab7f785962ccef6e0dbd changed -march=native to treat it as -mcpu=native if no other mcpu or mtune option was given. It would make sense to document this, especially if we try to persuade compilers like LLVM to take the same approach. This patch documents that beha

Re: [Patch, fortran] PR108889 -[12/13/14/15 Regression] (Re)Allocate in assignment shows used uninitialized memory warning with -Wall if LHS is unallocated

2024-07-17 Thread Andre Vehreschild
Hi Paul, isn't the ref you are computing here: + /* Mark so that rhs "used unallocated" warnings can be issued. Component +references do not generate the warnings. */ + for (ref = expr1->ref; ref; ref = ref->next) + if (ref->type == REF_COMPONENT) + break; not

Re: [PATCH v2] [x86][avx512] Optimize maskstore when mask is 0 or -1 in UNSPEC_MASKMOV

2024-07-17 Thread Uros Bizjak
On Thu, Jul 18, 2024 at 3:35 AM liuhongt wrote: > > > Also, in case the insn is deleted, do: > > > > emit_note (NOTE_INSN_DELETED); > > > > DONE; > > > > instead of leaving (const_int 0) in the stream. > > > > So, the above insn preparation statements should read: > > > > --cut here-- > > if (cons

[PATCH] Update SLP reductions process.

2024-07-17 Thread Jiawei
This patch improves SLP reduction handling by ensuring proper processing even for a single reduction statement.Vectorization instances are now built only when there are multiple scalar statements to combine into an SLP reduction. An example see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110632

[Patch, fortran] PR108889 -[12/13/14/15 Regression] (Re)Allocate in assignment shows used uninitialized memory warning with -Wall if LHS is unallocated

2024-07-17 Thread Paul Richard Thomas
Hi All, This patch is simple and well described by the ChangeLogs and the comments. Regtests OK. OK for mainline and backporting? Cheers Paul Change.Logs Description: Binary data diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index ed1213a41cb..c1fb896f587 100644 --- a/gcc/fortr

Re: [PATCH] i386: Fix testcases generating invalid asm

2024-07-17 Thread Uros Bizjak
On Thu, Jul 18, 2024 at 3:46 AM Haochen Jiang wrote: > > Hi all, > > For compile test, we should generate valid asm except for special purposes. > Fix the compile test that generates invalid asm. > > Regtested on x86-64-pc-linux-gnu. Ok for trunk? > > Thx, > Haochen > > gcc/testsuite/ChangeLog: >

Re: [PATCH v1] Match: Bugfix .SAT_TRUNC honor types has no mode precision [PR115961]

2024-07-17 Thread Richard Biener
> Am 17.07.2024 um 23:13 schrieb Richard Sandiford : > > Andrew Pinski writes: >>> On Wed, Jul 17, 2024 at 1:03 PM Tamar Christina >>> wrote: >>> -Original Message- From: Richard Sandiford Sent: Wednesday, July 17, 2024 8:55 PM To: Richard Biener Cc: pan2

[PATCH 2/2] PR target/113652, Adjust tests to skip float128 unless the compiler enables them by default

2024-07-17 Thread Michael Meissner
Currently, we add -mvsx when building the float128 support in libgcc. This allows us to build the float128 support on a big endian system where the default cpu is power4. While the libgcc support can be built, given there is no glibc support for float128 available. However, adding -mvsx and buil

[PATCH v2] Doc: Add Standard-Names ustrunc and sstrunc for integer modes

2024-07-17 Thread pan2 . li
From: Pan Li This patch would like to add the doc for the Standard-Names ustrunc and sstrunc, include both the scalar and vector integer modes. gcc/ChangeLog: * doc/md.texi: Add Standard-Names ustrunc and sstrunc. Signed-off-by: Pan Li --- gcc/doc/md.texi | 12 1 file c

[PATCH 1/2] PR target/113652, Fix failed bootstrap on ppc unrecognized opcode: `lfiwzx' with -mcpu=7450

2024-07-17 Thread Michael Meissner
Currently, we add -mvsx when building the float128 support in libgcc. This allows us to build the float128 support on a big endian system where the default cpu is power4. While the libgcc support can be built, given there is no glibc support for float128 available. However, adding -mvsx and buil

Re: [PATCH v1] Doc: Add Standard-Names ustrunc and sstrunc for integer modes

2024-07-17 Thread Andrew Pinski
On Wed, Jul 17, 2024 at 9:20 PM wrote: > > From: Pan Li > > This patch would like to add the doc for the Standard-Names > ustrunc and sstrunc, include both the scalar and vector integer > modes. Thanks for doing this and this looks mostly good to me (can't approve it). > > gcc/ChangeLog: > >

[PATCH 0/2] PR target/113652, Fix failed bootstrap on ppc unrecognized opcode: `lfiwzx' with -mcpu=7450

2024-07-17 Thread Michael Meissner
Currently, we add -mvsx when building the float128 support in libgcc. This allows us to build the float128 support on a big endian system where the default cpu is power4. While the libgcc support can be built, given there is no glibc support for float128 available. However, adding -mvsx and buil

Re: [PATCH] rs6000: Relax some FLOAT128 expander condition for FLOAT128_IEEE_P [PR105359]

2024-07-17 Thread Kewen.Lin
Hi Peter, on 2024/7/17 21:00, Peter Bergner wrote: > On 7/17/24 4:09 AM, Kewen.Lin wrote: >> * config/rs6000/rs6000.md (@extenddf2): Remove condition >> TARGET_LONG_DOUBLE_128 for FLOAT128_IEEE_P modes. > > This all LGTM, except this ChangeLog fragment doesn't match the code changes > b

[PATCH v10 3/3] Add tests for C/C++ musttail attributes

2024-07-17 Thread Andi Kleen
Some adopted from the existing C musttail plugin tests. Also extends the ability to query the sibcall capabilities of the target. gcc/testsuite/ChangeLog: * testsuite/lib/target-supports.exp (check_effective_target_struct_tail_call): New function. * c-c++-common/musttail1.

[PATCH v10 2/3] C: Implement musttail attribute for returns

2024-07-17 Thread Andi Kleen
Implement a C23 clang compatible musttail attribute similar to the earlier C++ implementation in the C parser. gcc/c/ChangeLog: PR c/83324 * c-parser.cc (struct attr_state): Define with musttail_p. (c_parser_statement_after_labels): Handle [[musttail]]. (c_parser_s

[PATCH v10 1/3] C++: Support clang compatible [[musttail]] (PR83324)

2024-07-17 Thread Andi Kleen
This patch implements a clang compatible [[musttail]] attribute for returns. musttail is useful as an alternative to computed goto for interpreters. With computed goto the interpreter function usually ends up very big which causes problems with register allocation and other per function optimizati

Remaining frontend patches for musttail

2024-07-17 Thread Andi Kleen
This patchkit contains the remaining C/C++ frontend patches for the [[musttail]] extension that still need approval for trunk. I already committed the tree-ssa and RTL pieces. C: I addressed Marek's feedback, but need final ack. Marek can you please take a look? C++: Fixed support for AGGR_VIEW

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-07-17 Thread Nathaniel Shead
On Wed, Jul 17, 2024 at 11:36:26PM -0400, Jason Merrill wrote: > On 7/17/24 11:04 PM, Nathaniel Shead wrote: > > On Wed, Jul 17, 2024 at 01:12:34PM -0400, Jason Merrill wrote: > > > On 5/1/24 11:27 AM, Jason Merrill wrote: > > > > On 5/1/24 07:11, Patrick Palka wrote: > > > > > On Wed, 1 May 2024,

[PATCH v1] Doc: Add Standard-Names ustrunc and sstrunc for integer modes

2024-07-17 Thread pan2 . li
From: Pan Li This patch would like to add the doc for the Standard-Names ustrunc and sstrunc, include both the scalar and vector integer modes. gcc/ChangeLog: * doc/md.texi: Add Standard-Names ustrunc and sstrunc. Signed-off-by: Pan Li --- gcc/doc/md.texi | 12 1 file c

Re: [PATCH] Improve optimizer to avoid stack spill across pure function call

2024-07-17 Thread user202729
Sent with Proton Mail secure email. On Wednesday, July 17th, 2024 at 11:20 PM, Jeff Law wrote: > > On 7/15/24 7:53 AM, Vladimir Makarov wrote: > > > On 6/14/24 07:10, user202...@protonmail.com wrote: > > > > > This patch was inspired from PR 110137. It reduces the amount of stack > > >

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-07-17 Thread Jason Merrill
On 7/17/24 11:04 PM, Nathaniel Shead wrote: On Wed, Jul 17, 2024 at 01:12:34PM -0400, Jason Merrill wrote: On 5/1/24 11:27 AM, Jason Merrill wrote: On 5/1/24 07:11, Patrick Palka wrote: On Wed, 1 May 2024, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk

RE: [PATCH] i386: Remove report error for -mapxf/-muintr with -m32

2024-07-17 Thread Kong, Lingling
On Thu, Jul 18, 2024, 10:00 AM kong lingling mailto:lingling.ko...@gmail.com>> wrote: Also add some comment for list cpuid are not supported in 32 bit. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready push to trunk. gcc/ChangeLog: * config/i386/i386-options.cc (ix86_opt

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-07-17 Thread Nathaniel Shead
On Wed, Jul 17, 2024 at 01:12:34PM -0400, Jason Merrill wrote: > On 5/1/24 11:27 AM, Jason Merrill wrote: > > On 5/1/24 07:11, Patrick Palka wrote: > > > On Wed, 1 May 2024, Nathaniel Shead wrote: > > > > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > > > > > > > -- >8

Re: [PATCH] c++/modules: Conditionally start timer during lazy load [PR115165]

2024-07-17 Thread Jason Merrill
On 7/17/24 10:36 PM, Nathaniel Shead wrote: On Wed, Jul 17, 2024 at 04:31:21PM -0400, Jason Merrill wrote: On 7/7/24 9:29 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? Or should I include a testcase? I haven't reduced one from using the full conte

Re: [PATCH] c++/modules: Conditionally start timer during lazy load [PR115165]

2024-07-17 Thread Nathaniel Shead
On Wed, Jul 17, 2024 at 04:31:21PM -0400, Jason Merrill wrote: > On 7/7/24 9:29 AM, Nathaniel Shead wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > > > Or should I include a testcase? I haven't reduced one from using the > > full contents of C++23 yet but I can do

[PATCH v3] testsuite: Add dg-do run to more tests

2024-07-17 Thread Sam James
All of these are for wrong-code bugs. Confirmed to be used before but with no execution. Tested on x86_64-pc-linux-gnu and checked test logs before/after. 2024-07-18 Sam James PR c++/53288 PR c++/57437 PR c/65345 PR libstdc++/88101 PR tree-optimization/

Re: [PATCH] i386: Remove report error for -mapxf/-muintr with -m32

2024-07-17 Thread H.J. Lu
On Thu, Jul 18, 2024, 10:00 AM kong lingling wrote: > Also add some comment for list cpuid are not supported in 32 bit. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > > Ready push to trunk. > > gcc/ChangeLog: > > * config/i386/i386-options.cc (ix86_option_override_interna

[PATCH] i386: Remove report error for -mapxf/-muintr with -m32

2024-07-17 Thread kong lingling
Also add some comment for list cpuid are not supported in 32 bit. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready push to trunk. gcc/ChangeLog: * config/i386/i386-options.cc (ix86_option_override_internal): Remove compiler report error for -mapxf or -muintr with

[PATCH] i386: Fix testcases generating invalid asm

2024-07-17 Thread Haochen Jiang
Hi all, For compile test, we should generate valid asm except for special purposes. Fix the compile test that generates invalid asm. Regtested on x86-64-pc-linux-gnu. Ok for trunk? Thx, Haochen gcc/testsuite/ChangeLog: * gcc.target/i386/apx-egprs-names.c: Use ax for short and a

[PATCH-3v5, rs6000] Implement optab_isnormal for SFDF and IEEE128

2024-07-17 Thread HAO CHEN GUI
Hi, This patch implemented optab_isnormal for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main change is to merge the patterns of SFDF and IEEE128 into one. https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655781.html Bootstrapped and tested on p

[PATCH-2v5, rs6000] Implement optab_isfinite for SFDF and IEEE128

2024-07-17 Thread HAO CHEN GUI
Hi, This patch implemented optab_isfinite for SFDF and IEEE128 by test data class instructions. Compared with previous version, the main change is to merge the patterns of SFDF and IEEE128 into one. https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655780.html Bootstrapped and tested on p

[PATCH] i386: Use BLKmode for {ld,st}tilecfg

2024-07-17 Thread Haochen Jiang
Hi all, For AMX instructions related with memory, we will treat the memory size as not specified since there won't be different size causing confusion for memory. This will change the output under Intel mode, which is broken for now when using with assembler and aligns to current binutils behavio

[PATCH v2] [x86][avx512] Optimize maskstore when mask is 0 or -1 in UNSPEC_MASKMOV

2024-07-17 Thread liuhongt
> Also, in case the insn is deleted, do: > > emit_note (NOTE_INSN_DELETED); > > DONE; > > instead of leaving (const_int 0) in the stream. > > So, the above insn preparation statements should read: > > --cut here-- > if (constm1_operand (operands[2], mode)) > emit_move_insn (operands[0], operands[

RE: [PATCH v1] Match: Bugfix .SAT_TRUNC honor types has no mode precision [PR115961]

2024-07-17 Thread Li, Pan2
Thanks all, will have a try in v2. Pan -Original Message- From: Richard Sandiford Sent: Thursday, July 18, 2024 5:14 AM To: Andrew Pinski Cc: Tamar Christina ; Richard Biener ; Li, Pan2 ; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; rda

RE: [PATCH v1] Internal-fn: Support new IFN SAT_TRUNC for unsigned scalar int

2024-07-17 Thread Li, Pan2
> I just noticed you added ustrunc/sstrunc optabs but didn't add > documentation for them in md.texi like the other optabs that are > defined. > See https://gcc.gnu.org/onlinedocs/gccint/Standard-Names.html for the > generated file of md.texi there. > Can you please update md.texi to add them? Th

Re: libbacktrace patch committed: Better backtrace_print if no debug info

2024-07-17 Thread Ian Lance Taylor
On Wed, Jul 17, 2024 at 5:40 PM Ian Lance Taylor wrote: > > This libbacktrace patch improves backtrace_print when there is no > debug info. It falls back to calling backtrace_syminfo, and uses that > to print an offset from a symbol if it can. This is a partial fix for > https://github.com/ianla

libbacktrace patch committed: Better backtrace_print if no debug info

2024-07-17 Thread Ian Lance Taylor
This libbacktrace patch improves backtrace_print when there is no debug info. It falls back to calling backtrace_syminfo, and uses that to print an offset from a symbol if it can. This is a partial fix for https://github.com/ianlancetaylor/libbacktrace/issues/59. Bootstrapped and ran libbacktrace

libbacktrace patch committed: Mention dl_iterate_phdr in README

2024-07-17 Thread Ian Lance Taylor
This patch adds some notes about dl_iterate_phdr to the libbacktrace README file. In general dl_iterate_phdr is not async-signal-safe and does call malloc, so programs that want to use libbacktrace functions from a signal handler or within malloc must make an initiali libbacktrace call in order to

Re: [PATCH] htdocs: correct spelling and use https in examples

2024-07-17 Thread Jonny Grant
[resent updating Joseph email address] On 10/06/2024 15:44, Gerald Pfeifer wrote: > On Wed, 6 Dec 2023, Jonny Grant wrote: >> ChangeLog: >> >> htdocs: correct spelling and use https in examples. > > I noticed this hasn't been applied yet, so went ahead and pushed (nearly all > of) it. > > Just th

Re: [PATCH] htdocs: correct spelling and use https in examples

2024-07-17 Thread Jonny Grant
On 10/06/2024 15:44, Gerald Pfeifer wrote: > On Wed, 6 Dec 2023, Jonny Grant wrote: >> ChangeLog: >> >> htdocs: correct spelling and use https in examples. > > I noticed this hasn't been applied yet, so went ahead and pushed (nearly > all of) it. > > Just the "use https in examples" part

Re: [PATCH v1] Internal-fn: Support new IFN SAT_TRUNC for unsigned scalar int

2024-07-17 Thread Andrew Pinski
On Tue, Jun 25, 2024 at 6:46 PM wrote: > > From: Pan Li > > This patch would like to add the middle-end presentation for the > saturation truncation. Aka set the result of truncated value to > the max value when overflow. It will take the pattern similar > as below. > > Form 1: > #define DEF_

[PATCH] Implement a -ftrapping-math/-fsignaling-nans TODO in match.pd.

2024-07-17 Thread Roger Sayle
I've been investigating some (float)i == CST optimizations for match.pd, and noticed there's already a TODO comment in match.pd that's relatively easy to implement. When CST is a NaN, we only need to worry about exceptions with flag_trapping_math, and equality/inequality tests for sNaN only behave

[PATCH] c++: Implement C++26 P2558R2 - Add @, $, and ` to the basic character set [PR110343]

2024-07-17 Thread Jakub Jelinek
Hi! The following patch implements the easy parts of the paper. When @$` are added to the basic character set, it means that R"@$`()@$`" should now be valid (here I've noticed most of the raw string tests were tested solely with -std=c++11 or -std=gnu++11 and I've tried to change that), and on the

[committed] testsuite: Fix up pr111150* tests on i686-linux [PR111150]

2024-07-17 Thread Jakub Jelinek
On Wed, Jul 17, 2024 at 10:00:24AM -0700, Andrew Pinski wrote: > > > * gcc.dg/tree-ssa/pr50.c: New test. > > > * gcc.dg/tree-ssa/pr50-1.c: New test. > > > * g++.dg/tree-ssa/pr50.C: New test. The tests FAIL on i686-linux due to unexpected -Wpsabi diagnostics. Fix

Re: [PATCH v2] eh: ICE with std::initializer_list and ASan [PR115865]

2024-07-17 Thread Jakub Jelinek
On Wed, Jul 17, 2024 at 05:45:48PM -0400, Marek Polacek wrote: > On Wed, Jul 17, 2024 at 01:37:23PM +0200, Jakub Jelinek wrote: > > On Thu, Jul 11, 2024 at 04:08:20PM -0400, Marek Polacek wrote: > > > and we ICE on the empty finally in lower_try_finally_onedest while > > > getting get_eh_else. > >

[PATCH v2] eh: ICE with std::initializer_list and ASan [PR115865]

2024-07-17 Thread Marek Polacek
On Wed, Jul 17, 2024 at 01:37:23PM +0200, Jakub Jelinek wrote: > On Thu, Jul 11, 2024 at 04:08:20PM -0400, Marek Polacek wrote: > > and we ICE on the empty finally in lower_try_finally_onedest while > > getting get_eh_else. > > > > Rather than checking everywhere that a GIMPLE_TRY_FINALLY is not e

Re: [PATCH] Use foreach, not lmap, for tcl <= 8.5 compat

2024-07-17 Thread Jørgen Kvalsvik
Pushed. Thanks, Jørgen On 7/16/24 09:49, Roger Sayle wrote: Hi Jørgen, Awesome. Very many thanks for the speedy fix. Roger -- -Original Message- From: Jørgen Kvalsvik Sent: 14 July 2024 20:46 To: gcc-patches@gcc.gnu.org Cc: jeffreya...@gmail.com; ro...@nextmovesoftware.com; Jørgen

[PATCH] c++: array new with value-initialization, again [PR115645]

2024-07-17 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Unfortunately, my r15-1946 fix broke the attached testcase. In it, we no longer go into the /* P1009: Array size deduction in new-expressions. */ block, and instead generate an operator new [] call along with a loop in build

Re: [PATCH v1] Match: Bugfix .SAT_TRUNC honor types has no mode precision [PR115961]

2024-07-17 Thread Richard Sandiford
Andrew Pinski writes: > On Wed, Jul 17, 2024 at 1:03 PM Tamar Christina > wrote: >> >> > -Original Message- >> > From: Richard Sandiford >> > Sent: Wednesday, July 17, 2024 8:55 PM >> > To: Richard Biener >> > Cc: pan2...@intel.com; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; >> > k

Re: [PATCH v1] Match: Bugfix .SAT_TRUNC honor types has no mode precision [PR115961]

2024-07-17 Thread Andrew Pinski
On Wed, Jul 17, 2024 at 1:03 PM Tamar Christina wrote: > > > -Original Message- > > From: Richard Sandiford > > Sent: Wednesday, July 17, 2024 8:55 PM > > To: Richard Biener > > Cc: pan2...@intel.com; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; > > kito.ch...@gmail.com; Tamar Christin

Re: [PATCH] c++/modules: Conditionally start timer during lazy load [PR115165]

2024-07-17 Thread Jason Merrill
On 7/7/24 9:29 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? Or should I include a testcase? I haven't reduced one from using the full contents of C++23 yet but I can do so if you prefer. Would adding -ftime-report to the pr99166 test reproduce t

Re: [PATCH] c++: prev declared hidden tmpl friend inst [PR112288]

2024-07-17 Thread Jason Merrill
On 7/8/24 8:28 PM, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/14? OK. Interesting technique in that first test... -- >8 -- When instantiating a previously declared hidden template friend declared at class template scope such as slot_a

RE: [PATCH v1] Match: Bugfix .SAT_TRUNC honor types has no mode precision [PR115961]

2024-07-17 Thread Tamar Christina
> -Original Message- > From: Richard Sandiford > Sent: Wednesday, July 17, 2024 8:55 PM > To: Richard Biener > Cc: pan2...@intel.com; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; > kito.ch...@gmail.com; Tamar Christina ; > jeffreya...@gmail.com; rdapp@gmail.com; hongtao@intel.co

Re: [PATCH v1] Match: Bugfix .SAT_TRUNC honor types has no mode precision [PR115961]

2024-07-17 Thread Richard Sandiford
Richard Biener writes: > On Wed, Jul 17, 2024 at 11:48 AM wrote: >> >> From: Pan Li >> >> The .SAT_TRUNC matching doesn't check the type has mode precision. Thus >> when bitfield like below will be recog as .SAT_TRUNC. >> >> struct e >> { >> unsigned pre : 12; >> unsigned a : 4; >> }; >> >>

Re: [RFC] c++: Eagerly substitute auto constraint args in tsubst [PR115030]

2024-07-17 Thread Patrick Palka
On Sat, 13 Jul 2024, Seyed Sajad Kahani wrote: > On Fri, 12 Jul 2024 at 21:31, Patrick Palka wrote: > > > > Interesting, thanks for the detailed write-up! > > Thank you very much. > > > FWIW it should be much easier to obtain the partially specialised > > tmpl/args of a class/variable specializ

Re: [Patch, rs6000, middle-end] v6: Add implementation for different targets for pair mem fusion

2024-07-17 Thread Richard Sandiford
Ajit Agarwal writes: > Hello All: > > This version of patch relaxes store fusion for more use cases. > > Common infrastructure using generic code for pair mem fusion of different > targets. > > rs6000 target specific code implement virtual functions defined by generic > code. > > Target specific

Re: [RFC 1/2] libbacktrace: add FDPIC support

2024-07-17 Thread Gerald Pfeifer
On Mon, 15 Jul 2024, Ian Lance Taylor wrote: > Thanks for testing. Committed to mainline with this ChangeLog entry: > > * internal.h: If FDPIC, #include and/or . > (libbacktrace_using_fdpic): Define. > (struct libbacktrace_base_address): Define. > (libbacktrace_add_base): Define. > (backtrace_dw

Re: [PATCH] c++: missing -Wunused-value for ! [PR114104]

2024-07-17 Thread Jason Merrill
On 7/17/24 3:20 PM, Patrick Palka wrote: On Tue, 16 Jul 2024, Jason Merrill wrote: On 7/16/24 10:31 AM, Eric Gallager wrote: On Mon, Jul 15, 2024 at 10:37 PM Patrick Palka wrote: Bootstrapped andrregtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Here we're neglecting

Re: [PATCH] c-family: Introduce the -Winvalid-noreturn flag from clang with extra tuneability

2024-07-17 Thread Jason Merrill
On 7/9/24 6:46 AM, Julian Waters wrote: Hi Jason, Sorry for the long period of radio silence, but I'm finally done with all my university coursework. The main issue I see here is how to process the Winvalid-noreturn= entry. Can I define it in c.opt and then process it in c_common_handle_option a

Re: [PATCH] c++: Fix ICE on valid involving variadic constructor [PR111592]

2024-07-17 Thread Jason Merrill
On 7/9/24 12:13 PM, Simon Martin wrote: We currently ICE upon the following valid code, due to the fix made through commit 9efe5fbde1e8 OK. === cut here === struct ignore { ignore(...) {} }; template void InternalCompilerError(Args... args) { ignore{ ignore(args) ... }; } int main() { Interna

Re: [PATCH] c++: missing -Wunused-value for ! [PR114104]

2024-07-17 Thread Patrick Palka
On Tue, 16 Jul 2024, Jason Merrill wrote: > On 7/16/24 10:31 AM, Eric Gallager wrote: > > On Mon, Jul 15, 2024 at 10:37 PM Patrick Palka wrote: > > > > > > Bootstrapped andrregtested on x86_64-pc-linux-gnu, does this look > > > OK for trunk? > > > > > > -- >8 -- > > > > > > Here we're neglecti

Re: [PATCH] c++: diagnose failed qualified lookup into current inst

2024-07-17 Thread Jason Merrill
On 7/17/24 1:54 PM, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK. -- >8 -- When the scope of a qualified name is the current instantiation, and qualified lookup finds nothing at template definition time, then we know it'll find nothi

Re: [PATCH v2] gimple-fold: consistent dump of builtin call simplifications

2024-07-17 Thread Rubin Gerritsen
Sorry for the inconvenience, here the patch is attached as an attachment. Rubin From: Richard Biener Sent: 17 July 2024 1:01 PM To: rubin.gerritsen Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH v2] gimple-fold: consistent dump of builtin call simplifications

[pushed] genattrtab: Drop enum tags, consolidate type names

2024-07-17 Thread Richard Sandiford
genattrtab printed an "enum" tag before references to attribute enums, but that's redundant in C++. Removing it means that each attribute type becomes a single token and can be easily stored in the attr_desc structure. Tested on aarch64-linux-gnu and using contrib/config-list.mk (to make sure tha

Re: [PING][patch, avr] Implement PR90616: Improve adding symbols that are 256-byte aligned

2024-07-17 Thread Georg-Johann Lay
Am 17.07.24 um 19:51 schrieb Jeff Law: On 7/17/24 11:13 AM, Georg-Johann Lay wrote: Am 17.07.24 um 17:55 schrieb Jeff Law: On 7/17/24 9:26 AM, Georg-Johann Lay wrote: It looks fine for the trunk.  Out of curiosity, does the avr port implement linker relaxing for this case?  That would seem to

[PATCH v2] testsuite: Add dg-do run to more tests

2024-07-17 Thread Sam James
All of these are for wrong-code bugs. Confirmed to be used before but with no execution. Tested on x86_64-pc-linux-gnu and checked test logs before/after. 2024-07-17 Sam James PR/96369 PR/102124 PR/108692 * c-c++-common/pr96369.c: Add dg-do run directive.

Re: [PATCH v1] Match: Bugfix .SAT_TRUNC honor types has no mode precision [PR115961]

2024-07-17 Thread Andrew Pinski
On Wed, Jul 17, 2024 at 4:13 AM Richard Biener wrote: > > On Wed, Jul 17, 2024 at 11:48 AM wrote: > > > > From: Pan Li > > > > The .SAT_TRUNC matching doesn't check the type has mode precision. Thus > > when bitfield like below will be recog as .SAT_TRUNC. > > > > struct e > > { > > unsigned

[PATCH] c++: diagnose failed qualified lookup into current inst

2024-07-17 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- When the scope of a qualified name is the current instantiation, and qualified lookup finds nothing at template definition time, then we know it'll find nothing at instantiation time (unless the current insta

Re: [PATCH] RISC-V: Support __mulbc3 and __divbc3 in libgcc for __bf16

2024-07-17 Thread Jeff Law
On 7/17/24 2:01 AM, Xiao Zeng wrote: libgcc/ChangeLog: * Makefile.in: Support __divbc3 and __mulbc3. * libgcc2.c (if): Support BC mode for __bf16. (defined): Ditto. (MTYPE): Ditto. (CTYPE): Ditto. (AMTYPE): Ditto. (MODE): Ditto.

Re: [PING][patch, avr] Implement PR90616: Improve adding symbols that are 256-byte aligned

2024-07-17 Thread Jeff Law
On 7/17/24 11:13 AM, Georg-Johann Lay wrote: Am 17.07.24 um 17:55 schrieb Jeff Law: On 7/17/24 9:26 AM, Georg-Johann Lay wrote: It looks fine for the trunk.  Out of curiosity, does the avr port implement linker relaxing for this case?  That would seem to be No. avr-ld performs relaxing, b

Re: [PATCH v2] c++: Hash placeholder constraint in ctp_hasher

2024-07-17 Thread Jason Merrill
On 7/17/24 8:32 AM, Seyed Sajad Kahani wrote: This patch addresses a difference between the hash function and the equality function for canonical types of template parameters (ctp_hasher). The equality function uses comptypes (typeck.cc) (with COMPARE_STRUCTURAL) and checks constraint equality fo

Re: [PATCH] c++: wrong error initializing empty class [PR115900]

2024-07-17 Thread Jason Merrill
On 7/17/24 12:00 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/14? OK. -- >8 -- In r14-409, we started handling empty bases first in cxx_fold_indirect_ref_1 so that we don't need to recurse and waste time. This caused a bogus "modifying a const object"

Re: [Committed] RISC-V: Fix testcase missing arch attribute

2024-07-17 Thread Edwin Lu
Committed! Thanks! Edwin On 7/17/2024 1:14 AM, Kito Cheng wrote: LGTM :) On Wed, Jul 17, 2024 at 9:15 AM Edwin Lu wrote: The C + F extentions implies the zcf extension on rv32. Add missing zcf extension for the rv32 target. gcc/testsuite/ChangeLog: * gcc.target/riscv/target-attr-1

Re: [PATCH v2 1/8] Fix warnings for tree formats in gfc_error

2024-07-17 Thread Marek Polacek
On Fri, Jul 12, 2024 at 04:11:48PM +0200, Paul-Antoine Arras wrote: > This enables proper warnings for formats like %qD. Ok. The new lines are the same as in gcc_cdiag_char_table and gcc_tdiag_char_table. > gcc/c-family/ChangeLog: > > * c-format.cc (gcc_gfc_char_table): Add formats for t

Re: [PING][patch, avr] Implement PR90616: Improve adding symbols that are 256-byte aligned

2024-07-17 Thread Georg-Johann Lay
Am 17.07.24 um 17:55 schrieb Jeff Law: On 7/17/24 9:26 AM, Georg-Johann Lay wrote: It looks fine for the trunk.  Out of curiosity, does the avr port implement linker relaxing for this case?  That would seem to be No. avr-ld performs relaxing, but only the two cases of - JMP/CALL to RJMP/RCAL

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2024-07-17 Thread Jason Merrill
On 5/1/24 11:27 AM, Jason Merrill wrote: On 5/1/24 07:11, Patrick Palka wrote: On Wed, 1 May 2024, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- When calling instantiate_pending_templates at end of parsing, any new functions that are instant

[PATCH] aarch64: Improve Advanced SIMD popcount expansion by using SVE [PR113860]

2024-07-17 Thread Pengxuan Zheng
This patch improves the Advanced SIMD popcount expansion by using SVE if available. For example, GCC currently generates the following code sequence for V2DI: cnt v31.16b, v31.16b uaddlp v31.8h, v31.16b uaddlp v31.4s, v31.8h uaddlp v31.2d, v31.4s However, by using SVE, we can gener

Re: [PATCH v2] MATCH: Simplify (a ? x : y) eq/ne (b ? x : y) [PR111150]

2024-07-17 Thread Andrew Pinski
On Wed, Jul 17, 2024 at 5:24 AM Richard Biener wrote: > > On Tue, Jul 16, 2024 at 3:36 PM Eikansh Gupta > wrote: > > > > This patch adds match pattern for `(a ? x : y) eq/ne (b ? x : y)`. > > In forwprop1 pass, depending on the type of `a` and `b`, GCC produces > > `vec_cond` or `cond_expr`. Bas

Re: [COMMITTED] Regenerate c.opt.urls

2024-07-17 Thread Alejandro Colomar
Hi Mark, On Wed, Jul 17, 2024 at 06:07:20PM GMT, Mark Wielaard wrote: > > diff --git a/gcc/c-family/c.opt.urls b/gcc/c-family/c.opt.urls > > index 1b60ae4847b..df5f58a1eee 100644 > > --- a/gcc/c-family/c.opt.urls > > +++ b/gcc/c-family/c.opt.urls > > @@ -870,6 +870,9 @@ > > UrlSuffix(gcc/Warning-

Re: [PATCH] Improve optimizer to avoid stack spill across pure function call

2024-07-17 Thread Jeff Law
On 7/15/24 7:53 AM, Vladimir Makarov wrote: On 6/14/24 07:10, user202...@protonmail.com wrote: This patch was inspired from PR 110137. It reduces the amount of stack spilling by ensuring that more values are constant across a pure function call. It does not add any new flag; rather, it ma

[committed] alpha: Fix duplicate !tlsgd!62 assemble error [PR115526]

2024-07-17 Thread Uros Bizjak
Add missing "cannot_copy" attribute to instructions that have to stay in 1-1 correspondence with another insn. PR target/115526 gcc/ChangeLog: * config/alpha/alpha.md (movdi_er_high_g): Add cannot_copy attribute. (movdi_er_tlsgd): Ditto. (movdi_er_tlsldm): Ditto. (call_value_

[PATCH ver 3] rs6000, update effective target for tests builtins-10*.c and, vec_perm-runnable-i128.c

2024-07-17 Thread Carl Love
GCC maintainers: Version 3, in version 2, the ChangeLog didn't get updated to remove the LP64 references.  Fixed that and updated the patch description per the feedback from Peter. Version 2, removed the lp64 from the target per discussion.  Tested and it is not needed.  The int128 qualifier

Re: [PATCH ver 2] rs6000, update effective target for tests builtins-10*.c and, vec_perm-runnable-i128.c

2024-07-17 Thread Carl Love
On 7/16/24 6:01 PM, Peter Bergner wrote: On 7/16/24 6:19 PM, Carl Love wrote: use __int128 types that are not supported on all platforms.  The __int128 type is only supported on 64-bit platforms.  Need to check that the platform is 64-bits and support the __int128 type.  Add the int128 and lp

[COMMITTED] Regenerate c.opt.urls

2024-07-17 Thread Mark Wielaard
Hi, On Wed, 2024-07-17 at 13:55 +0200, Mark Wielaard wrote: > On Sun, 2024-07-14 at 15:31 +0200, Alejandro Colomar wrote: > > On Sun, Jul 14, 2024 at 01:37:02PM GMT, Jonathan Wakely wrote: > > > On Sun, 14 Jul 2024, 12:30 Alejandro Colomar via Gcc-help, < > > > gcc-h...@gcc.gnu.org> wrote: > > > >

[PATCH] rs6000, Remove __builtin_vec_set_v1ti,, __builtin_vec_set_v2df, __builtin_vec_set_v2di

2024-07-17 Thread Carl Love
GCC maintainers: This patch removes the __builtin_vec_set_v1ti, __builtin_vec_set_v2df and __builtin_vec_set_v2di built-ins.  The users should just use normal C-code to update the various vector elements.  This change was originally intended to be part of the earlier series of cleanup patches

[PATCH] c++: wrong error initializing empty class [PR115900]

2024-07-17 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/14? -- >8 -- In r14-409, we started handling empty bases first in cxx_fold_indirect_ref_1 so that we don't need to recurse and waste time. This caused a bogus "modifying a const object" error. I'm appending my analysis from the PR, but

Re: [PING][patch, avr] Implement PR90616: Improve adding symbols that are 256-byte aligned

2024-07-17 Thread Jeff Law
On 7/17/24 9:26 AM, Georg-Johann Lay wrote: It looks fine for the trunk.  Out of curiosity, does the avr port implement linker relaxing for this case?  That would seem to be No. avr-ld performs relaxing, but only the two cases of - JMP/CALL to RJMP/RCALL provided the offset fits. - [R]C

Re: [Ping, Fortran, Patch, PR82904] Fix [11/12/13/14/15 Regression][Coarray] ICE in make_ssa_name_fn, at tree-ssanames.c:261

2024-07-17 Thread Paul Richard Thomas
Hi Andre, It looks good to me. I am happy to see that the principle of the patch has Richi's blessing too. OK for mainline. I leave it for you (and Richi?) to decide whether to backport in time for the 14.2 release. Regards Paul On Wed, 17 Jul 2024 at 14:08, Andre Vehreschild wrote: > Hi al

[PATCH] rs6000, remove __builtin_vsx_xvcmp* built-ins

2024-07-17 Thread Carl Love
GCC maintainers: The following patch removes the three __builtin_vsx_xvcmp[eq|ge|gt]sp  builtins as they similar to the overloaded vec_cmp[eq|ge|gt] built-ins.  The difference is the overloaded built-ins return a vector of boolean or a vector of long long booleans where as the removed built-in

Re: [PATCH]middle-end: fix 0 offset creation and folding [PR115936]

2024-07-17 Thread Andrew Pinski
On Tue, Jul 16, 2024 at 4:08 AM Tamar Christina wrote: > > Hi All, > > As shown in PR115936 SCEV and IVOPTS create an invalidate IV when the IV is > a pointer type: > > ivtmp.39_65 = ivtmp.39_59 + 0B; > > where the IVs are DI mode and the offset is a pointer. > This comes from this weird candidate

Re: [PING][patch, avr] Implement PR90616: Improve adding symbols that are 256-byte aligned

2024-07-17 Thread Georg-Johann Lay
Am 17.07.24 um 16:36 schrieb Jeff Law: On 7/17/24 3:45 AM, Georg-Johann Lay wrote: Ping #1 for https://gcc.gnu.org/pipermail/gcc-patches/2024-July/656332.html Address computation (usually add) with symbols that are aligned to 256 bytes does not require to add the lo8() part as it is zero. Th

Re: [PATCH] varasm: Shorten assembly of strings with larger zero regions

2024-07-17 Thread Richard Biener
> Am 17.07.2024 um 16:45 schrieb Jakub Jelinek : > > On Wed, Jul 17, 2024 at 04:15:16PM +0200, Richard Biener wrote: >> Ok. Is there a more general repeat byte op available? > > I think >.skipbytes, fill > but not sure what assemblers do support that, not sure it is that > common to

Re: [PATCH v9 08/10] Add tests for C/C++ musttail attributes

2024-07-17 Thread Andi Kleen
> Great. Does it also work in a non-template function? Sadly it did not because there needs to be more AGGR_VIEW_EXPR handling, as you predicted at some point. I fixed it now. Will send updated patches. -Andi

Re: [committed][PR rtl-optimization/115876][PR rtl-optimization/115916] Fix sign/carry bit handling in ext-dce

2024-07-17 Thread Jeff Law
On 7/17/24 12:46 AM, Andreas Schwab wrote: On Jul 15 2024, Jeff Law wrote: My change to fix a ubsan issue broke handling propagation of the carry/sign bit down through a right shift. What about the other ASHIFTs? They're on my list. Just didn't have the time to work through those cases m

Re: [PATCH] varasm: Shorten assembly of strings with larger zero regions

2024-07-17 Thread Jakub Jelinek
On Wed, Jul 17, 2024 at 04:15:16PM +0200, Richard Biener wrote: > Ok. Is there a more general repeat byte op available? I think .skip bytes, fill but not sure what assemblers do support that, not sure it is that common to have long sequences of non-zero identical bytes and for '\0's we

Re: [PATCH] RISC-V: More support of vx and vf for autovec comparison

2024-07-17 Thread Robin Dapp
Hi Demin, > + void add_integer_operand (rtx x) > + { > +create_integer_operand (&m_ops[m_opno++], INTVAL (x)); > +gcc_assert (m_opno <= MAX_OPERANDS); > + } Can that be folded into add_input_operand somehow? >void add_input_operand (rtx x, machine_mode mode) >{ > create_i

  1   2   >