[PATCH] Prefer scalar_int_mode if the size - 1 is equal to UNITS_PER_WORD.

2024-12-29 Thread Tsung Chun Lin
0001-Prefer-scalar_int_mode-if-the-size-1-is-equal-to-UNI.patch Description: Binary data

Re: [PATCH] LoongArch: Optimize for conditional move operations

2024-12-29 Thread Guo Jie
Thanks for your suggestion! Indeed, there are still some scenarios that can be optimized and improved next. 在 2024/12/30 下午12:06, Xi Ruoyao 写道: On Mon, 2024-12-30 at 10:39 +0800, Guo Jie wrote: +   /* Make sure that imm is a positive integer power of 2.  */ Maybe we should also co

[PATCH v2] LoongArch: Add standard patterns uabd and sabd

2024-12-29 Thread Guo Jie
gcc/ChangeLog: * config/loongarch/lasx.md (lasx_xvabsd_s_): Remove. (abd3): New insn pattern. (lasx_xvabsd_u_): Remove. * config/loongarch/loongarch-builtins.cc (CODE_FOR_lsx_vabsd_b): Rename. (CODE_FOR_lsx_vabsd_h): Ditto. (CODE_FOR_lsx_vabs

Re: [PATCH] LoongArch: Add standard patterns uabd and sabd

2024-12-29 Thread Guo Jie
Thank you. I will fix it in patch v2. 在 2024/12/30 上午11:55, Xi Ruoyao 写道: On Mon, 2024-12-30 at 10:38 +0800, Guo Jie wrote: diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md index 7a110ca9de6..d4287012b3c 100644 --- a/gcc/config/loongarch/loongarch.md +++ b/gcc/

Re: [PATCH] LoongArch: Optimize for conditional move operations

2024-12-29 Thread Xi Ruoyao
On Mon, 2024-12-30 at 10:39 +0800, Guo Jie wrote: > +   /* Make sure that imm is a positive integer power of > 2.  */ Maybe we should also consider the case $imm = 2^k + 1$ as they can be implemented with sl[te] and bstrins.[wd]. But it can be done in another patch anyway. > +  

[pushed] wwwdocs: gcc-14: Fix grammar around avrxmega2_flmap

2024-12-29 Thread Gerald Pfeifer
Just singular vs plural. Pushed. Gerald --- htdocs/gcc-14/changes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 3cc915ff..ba4780ca 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@

Re: [patch 1/2] Add new target hook to assemble a variable

2024-12-29 Thread Hans-Peter Nilsson
On Thu, 19 Dec 2024, Georg-Johann Lay wrote: > This patch adds a new target hook that allows the backend to asm output > a variable definition in its own way. This hook is needed because > varasm.cc imposes a very restrictive layout for all variable definitions > which will be basically ELF style

Re: [PATCH] LoongArch: Add standard patterns uabd and sabd

2024-12-29 Thread Xi Ruoyao
On Mon, 2024-12-30 at 10:38 +0800, Guo Jie wrote: > diff --git a/gcc/config/loongarch/loongarch.md > b/gcc/config/loongarch/loongarch.md > index 7a110ca9de6..d4287012b3c 100644 > --- a/gcc/config/loongarch/loongarch.md > +++ b/gcc/config/loongarch/loongarch.md > @@ -527,13 +527,15 @@ (define_code_a

[to-be-committed][RISC-V][PR target/118122] Fix modes in recently added risc-v pattern

2024-12-29 Thread Jeff Law
The new pattern to optimize certain code sequences on RISC-V played things a bit fast and loose with modes -- some operands were using the ALLI iterator while the scratch used X and the split codegen used X. Naturally under the "right" circumstances this would trigger an ICE due to mismatched

[COMMITTED] MMIX: Correct handling of C23 (...) functions, PR117618

2024-12-29 Thread Hans-Peter Nilsson
This commit fixes a MMIX C23 (...)-handling bug; failing gcc.dg/c23-stdarg-[46789].c execution tests. But, this isn't about a missing "|| arg.type != NULL_TREE" in the PORT_setup_incoming_varargs function like most other PR114175 port bugs exposed by the gcc.dg/c23-stdarg-6.c .. -9.c tests; the M

[PATCH] LoongArch: Optimize for conditional move operations

2024-12-29 Thread Guo Jie
The optimization example is as follows. From: if (condition) dest += 1 << 16; To: dest += (condition ? 1 : 0) << 16; It does not use maskeqz and masknez, thus reducing the number of instructions. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_expand_conditiona

[PATCH] LoongArch: Adjust insn patterns for better combine

2024-12-29 Thread Guo Jie
For some instruction patterns with commutative operands, the order of operands needs to be adjusted to match the rules. gcc/ChangeLog: * config/loongarch/loongarch.md (bytepick_d__rev): New combiner. (bstrpick_alsl_paired): Reorder input operands. gcc/testsuite/ChangeLog:

[PATCH] LoongArch: Add some vector pack/unpack patterns

2024-12-29 Thread Guo Jie
gcc/ChangeLog: * config/loongarch/lasx.md (vec_unpacks_lo_): Redefine. (vec_unpacku_lo_): Ditto. (lasx_vext2xv_h_b): Replaced by vec_unpack_lo_v32qi. (vec_unpack_lo_v32qi): New insn. (lasx_vext2xv_w_h): Replaced by vec_unpack_lo_v16hi. (vec_unpack_lo

[PATCH] LoongArch: Add standard patterns uabd and sabd

2024-12-29 Thread Guo Jie
gcc/ChangeLog: * config/loongarch/lasx.md (lasx_xvabsd_s_): Remove. (abd3): New insn pattern. (lasx_xvabsd_u_): Remove. * config/loongarch/loongarch-builtins.cc (CODE_FOR_lsx_vabsd_b): Rename. (CODE_FOR_lsx_vabsd_h): Ditto. (CODE_FOR_lsx_vabs

[PATCH] libstdc++: Use string::push_back instead of string::operator+=

2024-12-29 Thread Aditya K
>From db5036e40ed7ac43b66ca74c44ec8d0bdc934b07 Mon Sep 17 00:00:00 2001 From: AdityaK <1108430...@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:14:29 -0800 Subject: [PATCH] libstdc++: Use string::push_back instead of string::operator+= operator+= returns string& which is ignored anyways. ---

[PATCH] LoongArch: Fix selector error in lasx_xvexth_h/w/d* patterns

2024-12-29 Thread Guo Jie
The xvexth related instructions operate SEPARATELY according to the high and low 128 bits, and sign/zero extend the upper half of every 128 bits in src to the corresponding 128 bits in dest. For xvexth.d.w, the rule for the first element of dest should be: dest.D[0] = sign_extend (src.W[2] ,64

[PATCH] LoongArch: Fix bugs in insn patterns lasx_xvrepl128vei_b/h/w/d_internal

2024-12-29 Thread Guo Jie
There are two aspects that affect the matching of instruction templates: 1. vec_duplicate is redundant in the following operations. set (match_operand:V4DI ...) (vec_duplicate:V4DI (vec_select:V4DI ...)) 2. The range of values for testing predicate const_8_to_15_operand and const_16_t

[PATCH] LoongArch: Remove useless UNSPECs and define_mode_attrs

2024-12-29 Thread Guo Jie
gcc/ChangeLog: * config/loongarch/lasx.md: Remove useless code. * config/loongarch/lsx.md: Ditto. --- gcc/config/loongarch/lasx.md | 66 gcc/config/loongarch/lsx.md | 35 --- 2 files changed, 101 deletions(-) diff --git a/gcc

[PATCH] fortran: fix -MT/-MQ adding additional target [PR47485]

2024-12-29 Thread Vincent Vanlaer
The -MT and -MQ options should replace the default target in the generated dependency file. deps_add_target needs to be called before cpp_read_main_file, otherwise the original object name is added. gcc/fortran/ PR fortran/47485 * cpp.cc: fix -MT/-MQ adding additional target instea

Re: [Fortran, Patch, PR117643] Implement F_C_STRING()

2024-12-29 Thread Jerry D
Attached is the revised patch incorporating handling of optional arguments of a calling procedure and simplified checking for C interoperability. See the PR for much discussion. Regression tested on x86_64_linux_gnu. Two test cases. OK for trunk? Author: Steven G. Kargl Date: Sun Dec 29

Re: [PATCH] Add support to provide libiberty mkstemps in gcc

2024-12-29 Thread Jeff Law
On 12/28/24 11:31 AM, John David Anglin wrote: Tested on hppa64-hp-hpux11.11. Okay for trunk? Dave --- Add support to provide libiberty mkstemps in gcc 2024-12-28 John David Anglin gcc/ChangeLog: PR target/118121 * configure.ac: Check for mkstemps declaration.

Re: [PATCH] tree-optimization: Fix ICE in tree-parloops.cc reduction_phi() [PR118205]

2024-12-29 Thread Richard Biener
On Fri, Dec 27, 2024 at 2:27 AM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118205 > > The PR shows that on some code involving indexing into a zero-length array > in a loop, we try to look up in reduction_phi() a statement that is not a > PHI. Since r15-6001, th

[PATCH] Alpha: Always respect -mbwx, -mcix, -mfix, -mmax, and their inverse

2024-12-29 Thread Maciej W. Rozycki
Contrary to user documentation the `-mbwx', `-mcix', `-mfix', `-mmax' feature options and their inverse forms are ignored whenever `-mcpu=' option is in effect, either by having been given explicitly or where configured as the default such as with the `alphaev56-linux-gnu' target. In the latte

Re: [PATCH] Add new hardreg PRE pass

2024-12-29 Thread Jeff Law
On 12/5/24 8:45 AM, Andrew Carlotti wrote: So at a 30k foot level, one thing to be very leery of is extending the lifetime of any hard register. It's probably not a big deal on aarch, but it can cause all kinds of headaches on other targets. Essentially you probably need to avoid PRE on a h

Re: [PATCH] avoid-store-forwarding: Fix base register initialization when eliminating loads [PR117835]

2024-12-29 Thread Jeff Law
On 12/17/24 4:51 AM, Konstantinos Eleftheriou wrote: From: kelefth During the initialization of the base register for the zero-offset store, in the case that we are eliminating the load, we used a paradoxical subreg assuming that we don't care about the higher bits of the register. This led

Re: [PATCH] expand: drop stack adjustments after barrier [PR118006]

2024-12-29 Thread Jeff Law
On 12/18/24 7:39 PM, Alexandre Oliva wrote: A gimple block with __builtin_unreachable () can't have code after it, and gimple optimizers ensure there isn't any, even without optimization. But if the block requires stack adjustments, e.g. because of a call that passes arguments on the stack,

[to-be-committed] [RISC-V] [V2] [PR target/116715] Remove bogus bitmanip pattern

2024-12-29 Thread Jeff Law
So for this bug we have what appears to me to just be a bogus pattern. Essentially the pattern tries to detect cases where we have an SI mode value and we can use the Zbs instructions to manipulate a bit. Conceptually that's great. The problem is the pattern assumes that SI objects are sign

Re: [pushed] libstdc++: Delete leftover from Profile Mode removal

2024-12-29 Thread Jonathan Wakely
On Sun, 29 Dec 2024, 13:55 Gerald Pfeifer wrote: > I pushed the following for now, though Thanks! something tells me this is not the > full extent of this issue. Something to dig into when I find more time. > What's your concern? I think the explanation for this is simple, and not likely to b

[pushed] wwwdocs: mirrors: Remove robotlab.itk.ppke.hu

2024-12-29 Thread Gerald Pfeifer
This mirror has not been reachable for at least half a year from various IP addresses I have tested (in Europe, the US, and Asia). Thanks for serving as a mirror in the past! Gerald --- htdocs/mirrors.html | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/mirrors.html b/htdocs/mirrors.ht

[pushed] wwwdocs: gcc-4.6: Fix link to fedora-devel@ archive

2024-12-29 Thread Gerald Pfeifer
lists.fedoraproject.org archive links broke as well, not just listman.redhat.com. Let's hope the new archive remains stable... Gerald --- htdocs/gcc-4.6/porting_to.html | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/gcc-4.6/porting_to.html b/htdocs/gcc-4.6/porti

[pushed] libstdc++: Delete leftover from Profile Mode removal

2024-12-29 Thread Gerald Pfeifer
I pushed the following for now, though something tells me this is not the full extent of this issue. Something to dig into when I find more time. Gerald Commit 544be2beb1fa in 2019 remove Profile Mode and associated docs including the XML version of profile_mode_diagnostics.html. Somehow the la

[pushed] wwwdocs: gcc-4.4: Fix link to fedora-devel@ archive

2024-12-29 Thread Gerald Pfeifer
Would have been nice not to disable (or disallowing access to) the original mailing list archives, but let's give it another try. If this goes away as well, leave it with the textual description. Gerald --- htdocs/gcc-4.4/porting_to.html | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-

Re: [PATCH] c++/modules: Fallback to ftruncate if posix_fallocate fails [PR115008]

2024-12-29 Thread Gerald Pfeifer
On Sat, 28 Dec 2024, Jason Merrill wrote: > On 12/22/24 5:38 AM, Nathaniel Shead wrote: >> Bootstrapped and regtested on x86_64-pc-linux-gnu, and also on >> x86_64-unknown-freebsd13.3 by Gerald ([1], see also the discussion on >> the PR); OK for trunk? > OK. Can this also go on the GCC 14 branch w

[pushed] wwwdocs: news: Drop link re c4x at www.elec.canterbury.ac.nz

2024-12-29 Thread Gerald Pfeifer
That site has been non-responsive for over half a year. On the way, fix highlighting around punctuation. --- htdocs/news.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/news.html b/htdocs/news.html index cef5ee80..609d9757 100644 --- a/htdocs/news.html +++ b/htdo

[pushed] wwwdocs: readings: Tweak M16C link

2024-12-29 Thread Gerald Pfeifer
Some webmasters struggle keeping things stable... Pushed. Gerald --- htdocs/readings.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/readings.html b/htdocs/readings.html index 66f5ce0b..56398317 100644 --- a/htdocs/readings.html +++ b/htdocs/readings.html @@ -164

Re: [PATCH] recog: Handle some mode-changing hardreg propagations

2024-12-29 Thread Keith Packard
> insn_propagation would previously only replace (reg:M H) with X > for some hard register H if the uses of H were also in mode M. > This patch extends it to handle simple mode punning too. (this is from GCC commit 9d20529d94b23275885f380d155fe8671ab5353a) Looks like this breaks m68k floating po