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

2025-01-01 Thread Robin Dapp
> Add an extra test case that we do not create a vector store but a scalar > store. LGTM. I haven't seen the patch in the patchworks list or the CI. Would you mind sending the same version again CC'ing patchworks...@rivosinc.com so we're sure? Or did you do that already at some point and I mis

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

2025-01-01 Thread Tsung Chun Lin
Add an extra test case that we do not create a vector store but a scalar store. Thanks, Jim Robin Dapp 於 2024年12月31日 週二 下午6:22寫道: > > > Thanks, the expr.cc change looks good to me. I'd like sign-off from a > > RISC-V maintainer on the testsuite changes before pushing to trunk though. > > The te

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

2025-01-01 Thread Lulu Cheng
Pushed to r15-6493. 在 2024/12/30 上午10:39, 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

[pushed] libstdc++: Delete further Profile Mode leftovers

2025-01-01 Thread Gerald Pfeifer
There were six more generated HTML pages left over from the removal of Profile Mode. This takes care of them. Pushed. Gerald Commit 544be2beb1fa in 2019 remove Profile Mode and associated docs. Now also remove generated HTML files. libstdc++-v3: * doc/html/manual/profile_mode.html: D

[RFA] [PR rtl-optimization/107455] Eliminate unnecessary constant load

2025-01-01 Thread Jeff Law
This resurrects a patch from a bit over 2 years ago that I never wrapped up. IIRC, I ended up up catching covid, then in the hospital for an unrelated issue and it just got dropped on the floor in the insanity. The basic idea here is to help postreload-cse eliminate more const/copies by recor

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

2025-01-01 Thread Lulu Cheng
Pushed to r15-6491. 在 2024/12/30 上午10:38, 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)

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

2025-01-01 Thread Lulu Cheng
Pushed to r15-6492. 在 2024/12/30 下午3:12, 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. (

Re:[pushed] [PATCH] LoongArch: Adjust insn patterns for better combine

2025-01-01 Thread Lulu Cheng
Pushed to r15-6490. 在 2024/12/30 上午10:38, 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_p

Re: [PATCH] config-ml.in: Fix multi-os-dir search

2025-01-01 Thread YunQiang Su
Matthias Klose 于2025年1月1日周三 22:37写道: > > in https://gcc.gnu.org/pipermail/gcc-patches/2024-January/641619.html > > there are two typos in the patch, compared to the local Debian patch, > Oh, sorry it is not duplicated. > - the subst macro has an additional parameter > - the multilib subdirs

Re: [PATCH] config-ml.in: Fix multi-os-dir search

2025-01-01 Thread YunQiang Su
Matthias Klose 于2025年1月1日周三 22:37写道: > > in https://gcc.gnu.org/pipermail/gcc-patches/2024-January/641619.html > > there are two typos in the patch, compared to the local Debian patch, > > - the subst macro has an additional parameter > - the multilib subdirs are not subdirs in lib, but have >

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

2025-01-01 Thread Lulu Cheng
Pushed to r15-6489. 在 2024/12/30 上午10:37, 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

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

2025-01-01 Thread Lulu Cheng
Pushed to r15-6488. 在 2024/12/30 上午10:37, 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

Re: [pushed][PATCH] LoongArch: Remove useless UNSPECs and define_mode_attrs

2025-01-01 Thread Lulu Cheng
Pushed to r15-6487. 在 2024/12/30 上午10:34, 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 -

[PATCH 0/2] Add picolibc support

2025-01-01 Thread Keith Packard
The first patch in this series selects picolibc as the default C library when the target is *-picolibc-*. This configures the default compiler specs for picolibc usage, including the addition of three picolic-specific options. The section patch in this series allows the default C library to be exp

[PATCH 1/2] Support picolibc targets

2025-01-01 Thread Keith Packard
Match *-picolibc-* and select picolibc as the default C library, plus continuing to use the newlib-based logic for other configuration items. Add custom spec file fragments for use with picolibc: * '--oslib='. Allows targets to insert an OS library after the C library in the LIB_PATH spec fil

[PATCH 2/2] Allow default libc to be specified to configure

2025-01-01 Thread Keith Packard
The default C library is normally computed based on the target triplet. However, for embedded systems, it can be useful to leave the triplet alone while changing which C library is used by default. Other C libraries may still be available on the system so the compiler and can be used by specifying

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

2025-01-01 Thread Jason Merrill
On 12/29/24 4:39 AM, Gerald Pfeifer wrote: 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

Re: [PATCH] libgcc/m68k: More fixes for soft float

2025-01-01 Thread Keith Packard
I thought I had sent all of my m68k soft float fixes along last year, but it looks like I managed to leave some out. I had been building my toolchain from a private repo (oops), which masked my mistake. We're fixing that by automatically building toolchains from upstream source with a list of patc

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

2025-01-01 Thread Keith Packard
From: Richard Sandiford Date: Mon, 30 Dec 2024 12:18:40 + > ...that could be handled by adding: > > && GET_MODE_INNER (from) != GET_MODE_INNER (to) I'll let those of you who understand this code far better than I do figure out whether that's the right plan. I figured that copying how it w

Re: [PATCH] testsuite: Simplify target test and dg-options for AMO tests

2025-01-01 Thread Segher Boessenkool
Happy new year! Sorry it took so long. On Tue, Oct 15, 2024 at 12:49:49PM +0530, jeevitha wrote: > Hi All, > options by removing -mpower9-misc and -mvsx, which are enabled by default with > -mdejagnu-cpu=power9. The has_arch_pwr9 check is also true with > -mdejagnu-cpu=power9, so it has been remo

Re: [PATCH] doc: cpp: fix version test example syntax

2025-01-01 Thread Sam James
Andrew Pinski writes: > On Wed, Jan 1, 2025, 9:38 AM Sam James wrote: > > gcc/ChangeLog: > > * doc/cpp.texi (Common Predefined Macros): Fix syntax. > > This looks obvious correct to me. Agreed, I'll push it now. > > Thanks, > Andrew > > --- > gcc/doc/cpp.texi | 2 +- > 1 file cha

Re: [PATCH] doc: cpp: fix version test example syntax

2025-01-01 Thread Andrew Pinski
On Wed, Jan 1, 2025, 9:38 AM Sam James wrote: > gcc/ChangeLog: > > * doc/cpp.texi (Common Predefined Macros): Fix syntax. > This looks obvious correct to me. Thanks, Andrew --- > gcc/doc/cpp.texi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/doc/cpp.texi

[PATCH] doc: cpp: fix version test example syntax

2025-01-01 Thread Sam James
gcc/ChangeLog: * doc/cpp.texi (Common Predefined Macros): Fix syntax. --- gcc/doc/cpp.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index 970c0a393971..4b0f2d9bb857 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -1974

Re: [PATCH] sh: libgcc: Implement fenv rouding and exceptions for soft-fp [PR118257]

2025-01-01 Thread Jiaxun Yang
在2025年1月1日一月 下午2:57,Oleg Endo写道: > On Wed, 2025-01-01 at 14:43 +, Jiaxun Yang wrote: >> >> +#ifdef __SH_FPU_ANY__ >> +#define _FPU_GETCW(fpscr) __asm__ volatile ("sts fpscr,%0" : "=r" (fpscr)) >> +#define _FPU_SETCW(fpscr) __asm__ volatile ("lds %0,fpscr" : : "r" (fpscr)) >> > > There's a

[PATCH v2] sh: libgcc: Implement fenv rouding and exceptions for soft-fp [PR118257]

2025-01-01 Thread Jiaxun Yang
TIONS): Likewise. (FP_HANDLE_EXCEPTIONS): Implement with _FPU_SETCW. Signed-off-by: Jiaxun Yang --- Changes in v2: - Use builtins tp implement _FPU_GETCW/_FPU_SETCW. - Link to v1: https://inbox.sourceware.org/20250101-sh4-fenv-exception-v1-1-9bafef83a...@flygoat.com --- libgcc/config/s

[PATCH] tree-optimization/118171 - GENERIC folding in PRE results in invalid GIMPLE

2025-01-01 Thread Richard Biener
PRE applies GENERIC folding to some component ref components which might result in invalid GIMPLE, like a VIEW_CONVERT_EXPR wrapping a REALPART_EXPR as in the PR. The following removes all GENERIC folding in the code re-constructing a GENERIC component-ref from the PRE VN IL. Bootstrap and regtes

Re: [WIP 3/8] algol68: front-end misc files

2025-01-01 Thread Jose E. Marchesi
Hi Sam. >> +#ifdef HAVE_LD_STATIC_DYNAMIC >> + /* Remove -static-libphobos from the command only if target >> supports > > pasto Fixed. Thanks!

Re: [PATCH] sh: libgcc: Implement fenv rouding and exceptions for soft-fp [PR118257]

2025-01-01 Thread Oleg Endo
On Wed, 2025-01-01 at 14:43 +, Jiaxun Yang wrote: > > +#ifdef __SH_FPU_ANY__ > +#define _FPU_GETCW(fpscr) __asm__ volatile ("sts fpscr,%0" : "=r" (fpscr)) > +#define _FPU_SETCW(fpscr) __asm__ volatile ("lds %0,fpscr" : : "r" (fpscr)) > There's already: __builtin_sh_get_fpscr __builtin

[PATCH] sh: libgcc: Implement fenv rouding and exceptions for soft-fp [PR118257]

2025-01-01 Thread Jiaxun Yang
+#define FP_EX_INEXACT (1 << 0) +#endif +#endif + #define _FP_TININESS_AFTER_ROUNDING 1 #define __LITTLE_ENDIAN 1234 --- base-commit: 48ab66eed5843ea542a77bf882b732afa187fa8b change-id: 20250101-sh4-fenv-exception-a3d2197f0bc9 prerequisite-change-id: 20241231-sh-nan-b777b3af0342:v3 Best regards, -- Jiaxun Yang

[PATCH] gcc: Add tree walk case to reach A pack from B in ...B>. [PR118265]

2025-01-01 Thread A J Ryan Solutions Ltd
Hi and happy new year, this patch is to fix a compiler seg-fault as encountered in the following example: template struct Class1{}; template class Class2; template...Un> class Class2 { public: void apply(){} }; Class1 class1_bool; Class1 class1_char; int main() { Class2 class2; cla

Re: [PATCH] config-ml.in: Fix multi-os-dir search

2025-01-01 Thread Matthias Klose
in https://gcc.gnu.org/pipermail/gcc-patches/2024-January/641619.html there are two typos in the patch, compared to the local Debian patch, - the subst macro has an additional parameter - the multilib subdirs are not subdirs in lib, but have their multilib suffix attached to lib. ok for th

[PATCH v2] sh: Correct NaN signalling bit and propagation rules [PR111814]

2025-01-01 Thread Jiaxun Yang
As per architecture, SuperH has a reversed NaN signalling bit vs IEEE754-2008, it also has a NaN propgation rule similar to MIPS style. Use mips style float format and mode for all float types, and correct sfp-machine header accordingly. PR target/111814 gcc/ChangeLog: * config/

Re: [WIP 3/8] algol68: front-end misc files

2025-01-01 Thread Sam James
"Jose E. Marchesi" writes: > [...] > diff --git a/gcc/algol68/a68spec.cc b/gcc/algol68/a68spec.cc > new file mode 100644 > index 000..75766dd8c08 > --- /dev/null > +++ b/gcc/algol68/a68spec.cc > @@ -0,0 +1,212 @@ > +/* a68spec.c -- Specific flags and argument handling of the Algol 68 front

Re: [WIP 1/8] algol68: top-level, include/ and config/ changes

2025-01-01 Thread Sam James
"Jose E. Marchesi" writes: > This patch contains the changes to files in the GCC top-level > directory to introduce the Algol 68 front-end. > --- > MAINTAINERS |2 + > Makefile.def |3 + > Makefile.in | 1341 +- > Makefile.tpl