gcc.git
5 hours agoRevert "isel: Check bounds before converting VIEW_CONVERT to VEC_SET." releases/gcc-13
Avinash Jayakar [Mon, 1 Dec 2025 05:30:21 +0000 (11:00 +0530)]
Revert "isel: Check bounds before converting VIEW_CONVERT to VEC_SET."

This reverts commit d02cd309ad2f4b79f74f477bc3f271b884c916b5.

10 hours agoDaily bump.
GCC Administrator [Mon, 1 Dec 2025 00:17:50 +0000 (00:17 +0000)]
Daily bump.

34 hours agoDaily bump.
GCC Administrator [Sun, 30 Nov 2025 00:17:40 +0000 (00:17 +0000)]
Daily bump.

2 days agoDaily bump.
GCC Administrator [Sat, 29 Nov 2025 00:17:33 +0000 (00:17 +0000)]
Daily bump.

3 days agoisel: Check bounds before converting VIEW_CONVERT to VEC_SET.
Avinash Jayakar [Sat, 8 Nov 2025 04:27:59 +0000 (09:57 +0530)]
isel: Check bounds before converting VIEW_CONVERT to VEC_SET.

The function gimple_expand_vec_set_expr in the isel pass, converted
VIEW_CONVERT_EXPR to VEC_SET_EXPR without checking the bounds on the index,
which cause ICE on targets that supported VEC_SET_EXPR like x86 and powerpc.
This patch adds a bound check on the index operand and rejects the conversion
if index is out of bound.

2025-11-08  Avinash Jayakar  <avinashd@linux.ibm.com>

gcc/ChangeLog:
PR tree-optimization/122126
* gimple-isel.cc (gimple_expand_vec_set_extract_expr): Add bound check.

gcc/testsuite/ChangeLog:
PR tree-optimization/122126
* gcc.dg/pr122126_vextr.c: New test.
* gcc.dg/pr122126_vset.c: New test.

3 days agoDaily bump.
GCC Administrator [Fri, 28 Nov 2025 00:24:14 +0000 (00:24 +0000)]
Daily bump.

3 days agoAVR: Add new devices AVR16LA14/20/28/32 and AVR32LA14/20/28/32.
Georg-Johann Lay [Thu, 27 Nov 2025 14:25:05 +0000 (15:25 +0100)]
AVR: Add new devices AVR16LA14/20/28/32 and AVR32LA14/20/28/32.

gcc/
* config/avr/avr-mcus.def (AVR_MCUS): Add avr16la14, avr16la20,
avr16la28, avr16la32, avr32la14, avr32la20, avr32la28, avr32la32.
* doc/avr-mmcu.texi: Rebuild.

(cherry picked from commit ae65633676fba0eadf3516fd8d7b9bb21788f9f5)

3 days agoarm: handle long-range CBZ/CBNZ patterns [PR122867]
Richard Earnshaw [Tue, 25 Nov 2025 15:47:05 +0000 (15:47 +0000)]
arm: handle long-range CBZ/CBNZ patterns [PR122867]

The CBN?Z instructions have a very small range (just 128 bytes
forwards).  The compiler knows how to handle cases where we
exceed that, but only if the range remains within that which
a condition branch can support.  When compiling some machine
generated code it is not too difficult to exceed this limit,
so arrange to fall back to a conditional branch over an
unconditional one in this extreme case.

gcc/ChangeLog:
PR target/122867
* config/arm/arm.cc (arm_print_operand): Use %- to
emit LOCAL_LABEL_PREFIX.
(arm_print_operand_punct_valid_p): Allow %- for punct
and make %_ valid for all compilation variants.
* config/arm/thumb2.md (*thumb2_cbz): Handle very
large branch ranges that exceed the limit of b<cond>.
(*thumb2_cbnz): Likewise.

gcc/testsuite/ChangeLog:
PR target/122867
* gcc.target/arm/cbz-range.c: New test.

(cherry picked from commit e97550a7d0e1a8b31a76b0877c0e90a0163da7ee)

4 days agoDaily bump.
GCC Administrator [Thu, 27 Nov 2025 00:22:16 +0000 (00:22 +0000)]
Daily bump.

5 days agoDaily bump.
GCC Administrator [Wed, 26 Nov 2025 00:23:11 +0000 (00:23 +0000)]
Daily bump.

6 days agoDaily bump.
GCC Administrator [Tue, 25 Nov 2025 00:22:08 +0000 (00:22 +0000)]
Daily bump.

6 days agoZen5 tuning part 3: fix typo in previous patch
Jan Hubicka [Tue, 3 Sep 2024 15:25:05 +0000 (17:25 +0200)]
Zen5 tuning part 3: fix typo in previous patch

gcc/ChangeLog:

* config/i386/x86-tune-sched.cc (ix86_fuse_mov_alu_p): Fix
typo.

(cherry picked from commit 910e1769a0653ac32bd8c1d6aabb39c797d5d773)

7 days agoDaily bump.
GCC Administrator [Mon, 24 Nov 2025 00:22:43 +0000 (00:22 +0000)]
Daily bump.

8 days agoDaily bump.
GCC Administrator [Sun, 23 Nov 2025 00:22:23 +0000 (00:22 +0000)]
Daily bump.

9 days agoDaily bump.
GCC Administrator [Sat, 22 Nov 2025 00:21:59 +0000 (00:21 +0000)]
Daily bump.

10 days agoDaily bump.
GCC Administrator [Fri, 21 Nov 2025 00:21:50 +0000 (00:21 +0000)]
Daily bump.

11 days agoDaily bump.
GCC Administrator [Thu, 20 Nov 2025 00:23:21 +0000 (00:23 +0000)]
Daily bump.

12 days agoDaily bump.
GCC Administrator [Wed, 19 Nov 2025 00:23:37 +0000 (00:23 +0000)]
Daily bump.

12 days agolibstdc++: Fix error reporting for filesystem::rename on Windows [PR122726]
Jonathan Wakely [Mon, 17 Nov 2025 21:01:33 +0000 (21:01 +0000)]
libstdc++: Fix error reporting for filesystem::rename on Windows [PR122726]

Use the __last_system_error() function and the system_category to
convert the Windows error to a generic one.

libstdc++-v3/ChangeLog:

PR libstdc++/122726
* src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
(rename): Use __last_system_error to set errno accurately.
* testsuite/27_io/filesystem/operations/rename.cc: Test
error_code matches errc::no_such_file_or_directory.

(cherry picked from commit 77278e0292cd23f0d1ddbb5e6e18064e119bdd6f)

12 days agomiddle-end: fix missing converts in vec_cond_expr simplification [PR122724]
Richard Biener [Fri, 14 Nov 2025 12:08:32 +0000 (12:08 +0000)]
middle-end: fix missing converts in vec_cond_expr simplification [PR122724]

The following avoids type inconsistencies in .COND_op generated by
simplifications of VEC_COND_EXPRs.

This is a backport of r14-5317-g20aa06490ab57da7729a24bae7c4ec2f5918ec91
but with a testcase that triggered an ICE on the 13 branch (with the
same root cause as the original PR).  It isn't an exact cherry-pick
because some of the patterns that were patched in the original fix don't
exist in GCC 13.

gcc/ChangeLog:

PR tree-optimization/112469
PR tree-optimization/122724
* match.pd (cond ? op a : b -> .COND_op (cond, a, b)): Add
missing view_converts.

gcc/testsuite/ChangeLog:

PR tree-optimization/112469
PR tree-optimization/122724
* gcc.target/aarch64/sve/pr122724.c: New test.

Co-Authored-By: Alex Coplan <alex.coplan@arm.com>
13 days agoDaily bump.
GCC Administrator [Tue, 18 Nov 2025 00:24:36 +0000 (00:24 +0000)]
Daily bump.

2 weeks agoDaily bump.
GCC Administrator [Mon, 17 Nov 2025 00:22:19 +0000 (00:22 +0000)]
Daily bump.

2 weeks agoDaily bump.
GCC Administrator [Sun, 16 Nov 2025 00:21:58 +0000 (00:21 +0000)]
Daily bump.

2 weeks agoDaily bump.
GCC Administrator [Sat, 15 Nov 2025 00:25:27 +0000 (00:25 +0000)]
Daily bump.

2 weeks agolibstdc++: Fix std::forward_list::assign assignable check [PR122661]
Jonathan Wakely [Thu, 13 Nov 2025 09:45:12 +0000 (09:45 +0000)]
libstdc++: Fix std::forward_list::assign assignable check [PR122661]

The std::is_assignable check should test for assignment to an lvalue,
not an rvalue.

libstdc++-v3/ChangeLog:

PR libstdc++/122661
* include/bits/forward_list.h (forward_list::assign(I, I)): Fix
value category in is_assignable check.
* testsuite/23_containers/forward_list/modifiers/122661.cc:
New test.

(cherry picked from commit 9332dfd4523ddb100668a7c11a144a2bd676da7e)

2 weeks agoDaily bump.
GCC Administrator [Fri, 14 Nov 2025 00:24:47 +0000 (00:24 +0000)]
Daily bump.

2 weeks agoi386: Support C++ template parameters in AMX intrinsics [PR122446]
Hu, Lin1 [Tue, 28 Oct 2025 08:11:47 +0000 (16:11 +0800)]
i386: Support C++ template parameters in AMX intrinsics [PR122446]

The AMX intrinsics previously used string concatenation with the '#'
operator to construct register names, which prevented their use with
C++ template non-type parameters. This patch converts all AMX intrinsics
to use inline assembly constraints with the %c format specifier.

And Intel style registers also have % prefix, update Intel syntax to use plain
register names without % preifx.

gcc/ChangeLog:

PR target/122446
* config/i386/amxbf16intrin.h (_tile_dpbf16ps_internal):
Input register name by inline asm %c[...], and remove %% before tmm
from intel side.
* config/i386/amxcomplexintrin.h (_tile_cmmimfp16ps_internal): Ditto
(_tile_cmmrlfp16ps_internal): Ditto
(_tile_cmmimfp16ps): Ditto
(_tile_cmmrlfp16ps): Ditto
* config/i386/amxfp16intrin.h (_tile_dpfp16ps_internal): Ditto
(_tile_dpfp16ps): Ditto
* config/i386/amxint8intrin.h (_tile_int8_dp_internal): Ditto
* config/i386/amxtileintrin.h (_tile_loadd): Ditto
(_tile_loadd_internal): Ditto
(_tile_stream_loadd): Ditto
(_tile_stream_loadd_internal): Ditto
(_tile_stored): Ditto
(_tile_stored_internal): Ditto
(_tile_zero): Ditto
(_tile_zero_internal): Ditto

gcc/testsuite/ChangeLog:

PR target/122446
* gcc.target/i386/amxbf16-asmintel-1.c: Modify dg-final to check intel
form.
* gcc.target/i386/amxcomplex-asmintel-1.c: Ditto.
* gcc.target/i386/amxfp16-asmintel-1.c: Ditto.
* gcc.target/i386/amxint8-asmintel-1.c: Ditto.
* gcc.target/i386/amxtile-asmintel-1.c: Ditto.
* g++.target/i386/pr122446-1.C: New test.
* g++.target/i386/pr122446-amxbf16.C: Ditto.
* g++.target/i386/pr122446-amxcomplex.C: Ditto.
* g++.target/i386/pr122446-amxfp16.C: Ditto.
* g++.target/i386/pr122446-amxint8.C: Ditto.
* g++.target/i386/pr122446-amxtile.C: Ditto.

(cherry picked from commit 47fe2348131d3450d8970599490bf77eef4ff34c)

2 weeks agoDaily bump.
GCC Administrator [Thu, 13 Nov 2025 00:23:39 +0000 (00:23 +0000)]
Daily bump.

2 weeks agoDaily bump.
GCC Administrator [Wed, 12 Nov 2025 00:25:17 +0000 (00:25 +0000)]
Daily bump.

2 weeks agoDaily bump.
GCC Administrator [Tue, 11 Nov 2025 00:24:28 +0000 (00:24 +0000)]
Daily bump.

3 weeks agoDaily bump.
GCC Administrator [Mon, 10 Nov 2025 00:21:45 +0000 (00:21 +0000)]
Daily bump.

3 weeks agoDaily bump.
GCC Administrator [Sun, 9 Nov 2025 00:23:10 +0000 (00:23 +0000)]
Daily bump.

3 weeks agoDaily bump.
GCC Administrator [Sat, 8 Nov 2025 00:23:29 +0000 (00:23 +0000)]
Daily bump.

3 weeks agoarm: [MVE] Fix operands order in vbicq_f [PR122223]
Christophe Lyon [Thu, 9 Oct 2025 14:09:26 +0000 (14:09 +0000)]
arm: [MVE] Fix operands order in vbicq_f [PR122223]

The operands of the floating-point version of vbicq were swapped, this
patch fixes this.

For this backport the testcase needs an adjustment: the code is less
optimized than with gcc-15, so we still generate the 0.0f constant and
a vbic instruction.  We actually check that the 0.0f constant is in
the right vbic parameter.

gcc/ChangeLog:
PR target/122223
* config/arm/mve.md (@mve_vbicq_f<mode>): Fix operands order.

gcc/testsuite/ChangeLog:
PR target/122223
* gcc.target/arm/mve/intrinsics/pr122223.c: New test.

(cherry picked from commits
81e226440381cc3e033df7e58cc7793c9b4b4e25 and
a52888dc71924afb6cd187b0e5f18d2be4c68a07)

3 weeks agoDaily bump.
GCC Administrator [Fri, 7 Nov 2025 00:24:02 +0000 (00:24 +0000)]
Daily bump.

3 weeks agoAVR: target/122516: Make attribute "retain" work.
Georg-Johann Lay [Thu, 6 Nov 2025 19:20:49 +0000 (20:20 +0100)]
AVR: target/122516: Make attribute "retain" work.

Due to some quirks in crtstuff.c, attribute "retain" requires
some features that avr doesn't implement -- even though it
doesnt't even use crtstuff.  This patch works around that.

PR target/122516
gcc/
* config/avr/elf.h (SUPPORTS_SHF_GNU_RETAIN): Define if
HAVE_GAS_SHF_GNU_RETAIN.

(cherry picked from commit d5ede6fff1ff19738d60350856ab852522809068)

3 weeks agoDaily bump.
GCC Administrator [Thu, 6 Nov 2025 00:26:05 +0000 (00:26 +0000)]
Daily bump.

3 weeks agoDaily bump.
GCC Administrator [Wed, 5 Nov 2025 00:23:33 +0000 (00:23 +0000)]
Daily bump.

3 weeks agoDaily bump.
GCC Administrator [Tue, 4 Nov 2025 00:23:23 +0000 (00:23 +0000)]
Daily bump.

4 weeks agoDaily bump.
GCC Administrator [Mon, 3 Nov 2025 00:23:01 +0000 (00:23 +0000)]
Daily bump.

4 weeks agoDaily bump.
GCC Administrator [Sun, 2 Nov 2025 00:23:47 +0000 (00:23 +0000)]
Daily bump.

4 weeks agoDaily bump.
GCC Administrator [Sat, 1 Nov 2025 00:22:15 +0000 (00:22 +0000)]
Daily bump.

4 weeks agoDeal with prior EH/abormal cleanup when fixing up noreturn calls
Richard Biener [Wed, 10 Sep 2025 15:14:07 +0000 (17:14 +0200)]
Deal with prior EH/abormal cleanup when fixing up noreturn calls

When a dead EH or abnormal edge makes a call queued for noreturn fixup
unreachable, just skip processing it.

PR tree-optimization/121870
* tree-ssa-propagate.cc
(substitute_and_fold_engine::substitute_and_fold): Skip
removed stmts from noreturn fixup.

* g++.dg/torture/pr121870.C: New testcase.

(cherry picked from commit 5c4f1313e753aeb6920a48c62c7c99ad36e1adae)

4 weeks agotree-optimization/121256 - properly support SLP in vectorizable recurrence
Richard Biener [Sun, 27 Jul 2025 16:42:25 +0000 (18:42 +0200)]
tree-optimization/121256 - properly support SLP in vectorizable recurrence

We failed to build the correct initialization vector.  For VLA
vectors and a non-uniform initialization vector this rejects
vectorization for now.

PR tree-optimization/121256
* tree-vect-loop.cc (vectorizable_recurr): Build a correct
initialization vector for SLP_TREE_LANES > 1.

* gcc.dg/vect/vect-recurr-pr121256.c: New testcase.
* gcc.dg/vect/vect-recurr-pr121256-2.c: Likewise.

(cherry picked from commit 97ec33fed5caa8b64ae054b5bb8b122acb390124)

4 weeks agotree-optimization/121059 - fixup loop mask query
Richard Biener [Mon, 14 Jul 2025 12:09:28 +0000 (14:09 +0200)]
tree-optimization/121059 - fixup loop mask query

When we opportunistically mask an operand of a AND with an already
available loop mask we need to query that set with the correct number
of masks we expect.

PR tree-optimization/121059
* tree-vect-stmts.cc (vectorizable_operation): Query
scalar_cond_masked_set with the correct number of masks.

* gcc.dg/vect/pr121059.c: New testcase.

Co-Authored-By: Richard Sandiford <richard.sandiford@arm.com>
(cherry picked from commit 234f122a9be5cc2a30d2a9e94c2fc9cde1d5a64d)

4 weeks agotree-optimization/120944 - bogus VN with volatile copies
Richard Biener [Fri, 4 Jul 2025 07:08:19 +0000 (09:08 +0200)]
tree-optimization/120944 - bogus VN with volatile copies

The following avoids translating expressions through volatile
copies.

PR tree-optimization/120944
* tree-ssa-sccvn.cc (vn_reference_lookup_3): Gate optimizations
invalid when volatile is involved.

* gcc.dg/torture/pr120944.c: New testcase.

(cherry picked from commit 6ed1e2ae1a742d859c2dd74c9e7cebdd3618e8b1)

4 weeks agotestsuite: add sve hw check to testcase [PR120817]
Tamar Christina [Mon, 7 Jul 2025 16:05:01 +0000 (17:05 +0100)]
testsuite: add sve hw check to testcase [PR120817]

Drop down from SVE2 to SVE1 as that's the minimum
required for the test, and since it's a mid-end test
add the aarch64_sve_hw check.

gcc/testsuite/ChangeLog:

PR tree-optimization/120817
* gcc.dg/vect/pr120817.c: Add SVE HW check.

(cherry picked from commit 4b9f760c511a4ef3a390dd6cfab80bada57c2535)

4 weeks agotree-optimization/120817 - bogus DSE of .MASK_STORE
Richard Biener [Mon, 7 Jul 2025 07:56:50 +0000 (09:56 +0200)]
tree-optimization/120817 - bogus DSE of .MASK_STORE

DSE used ao_ref_init_from_ptr_and_size for .MASK_STORE but
alias-analysis will use the specified size to disambiguate
against smaller objects.  For .MASK_STORE we instead have to
make the access size unspecified but we can still constrain
the access extent based on the maximum size possible.

PR tree-optimization/120817
* tree-ssa-dse.cc (initialize_ao_ref_for_dse): Use
ao_ref_init_from_ptr_and_range with unknown size for
.MASK_STORE and .MASK_LEN_STORE.

* gcc.dg/vect/pr120817.c: New testcase.

(cherry picked from commit 439b14e222571da76da2bfec04b9035fb9f1862d)

4 weeks agoDaily bump.
GCC Administrator [Fri, 31 Oct 2025 00:24:40 +0000 (00:24 +0000)]
Daily bump.

4 weeks agoDaily bump.
GCC Administrator [Thu, 30 Oct 2025 00:22:47 +0000 (00:22 +0000)]
Daily bump.

4 weeks agoDaily bump.
GCC Administrator [Wed, 29 Oct 2025 00:21:31 +0000 (00:21 +0000)]
Daily bump.

4 weeks agoDaily bump.
GCC Administrator [Tue, 28 Oct 2025 00:27:13 +0000 (00:27 +0000)]
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Mon, 27 Oct 2025 00:21:51 +0000 (00:21 +0000)]
Daily bump.

5 weeks agox86-64: Use `movsxd` to perform SI-to-DI extension in Intel syntax
LIU Hao [Sat, 25 Oct 2025 09:19:34 +0000 (17:19 +0800)]
x86-64: Use `movsxd` to perform SI-to-DI extension in Intel syntax

Although there's no possibility of ambiguity, Intel manual says the mnemonic
for DWORD-to-QWORD sign-extension operation should be MOVSXD. Some assemblers
(GNU AS, NASM) also overload MOVSX, but some others don't accept MOVSX (LLVM,
MASM, YASM in NASM mode) and require MOVSXD.

This mnemonic was introduced in r0-34259-g123bf9e3f4056d in 2001, and has not
been updated ever since.

gcc/ChangeLog:

PR target/119079
* config/i386/i386.md: Use `movsxd` to perform SI-to-DI extension in Intel
syntax.

Signed-off-by: LIU Hao <lh_mouse@126.com>
(cherry picked from commit 66b38349273525dfb86f0f74d6c928abdbf7154f)

5 weeks agoDaily bump.
GCC Administrator [Sun, 26 Oct 2025 00:22:02 +0000 (00:22 +0000)]
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Sat, 25 Oct 2025 00:21:56 +0000 (00:21 +0000)]
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Fri, 24 Oct 2025 00:22:57 +0000 (00:22 +0000)]
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Thu, 23 Oct 2025 00:22:03 +0000 (00:22 +0000)]
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Wed, 22 Oct 2025 00:22:40 +0000 (00:22 +0000)]
Daily bump.

5 weeks agoDaily bump.
GCC Administrator [Tue, 21 Oct 2025 00:22:35 +0000 (00:22 +0000)]
Daily bump.

5 weeks agohurd: Add OPTION_GLIBC_P and OPTION_GLIBC
Svante Signell [Sun, 6 Feb 2022 11:43:23 +0000 (11:43 +0000)]
hurd: Add OPTION_GLIBC_P and OPTION_GLIBC

GNU/Hurd uses glibc just like GNU/Linux.

This is needed for gcc to notice that glibc supports split stack in
finish_options.

PR go/104290
gcc/ChangeLog:
* config/gnu.h (OPTION_GLIBC_P, OPTION_GLIBC): Define.

(cherry picked from commit 29eacf043b6e8560c5c42d67f7f9b11e4e2cb156)

6 weeks agoAda: Fix spurious warning for renaming of component of VFA record
Eric Botcazou [Mon, 20 Oct 2025 09:21:21 +0000 (11:21 +0200)]
Ada: Fix spurious warning for renaming of component of VFA record

This is a regression present on the mainline and all active branches: the
compiler gives a spurious "is not referenced" warning for the renaming of
a component of a Volatile_Full_Access record.

gcc/ada/
PR ada/107536
* exp_ch2.adb (Expand_Renaming): Mark the entity as referenced.

gcc/testsuite/
* gnat.dg/renaming18.adb: New test.

6 weeks agoDaily bump.
GCC Administrator [Mon, 20 Oct 2025 00:20:44 +0000 (00:20 +0000)]
Daily bump.

6 weeks agoDaily bump.
GCC Administrator [Sun, 19 Oct 2025 00:20:06 +0000 (00:20 +0000)]
Daily bump.

6 weeks agoDaily bump.
GCC Administrator [Sat, 18 Oct 2025 00:21:13 +0000 (00:21 +0000)]
Daily bump.

6 weeks agoDaily bump.
GCC Administrator [Fri, 17 Oct 2025 00:20:41 +0000 (00:20 +0000)]
Daily bump.

6 weeks agomatch.pd: Add missing type check to reduc(ctor) pattern [PR121772]
Alex Coplan [Tue, 9 Sep 2025 11:57:14 +0000 (12:57 +0100)]
match.pd: Add missing type check to reduc(ctor) pattern [PR121772]

This is a cherry-pick of a7a9b7badc0ba95b510c7e61da6439fca78e31d3
together with a follow-up fix to the test
(0c670d38455c788ac0447e3b86ba621521d44bce) squashed into it.

In this PR we have a reduction of a vector constructor, where the
type of the constructor is int16x8_t and the elements are int16x4_t;
i.e. it is representing a concatenation of two vectors.

This triggers a match.pd pattern which looks like it was written to
handle reductions of vector constructors where the elements of the ctor
are scalars, not vectors.  There is no type check to enforce this
property, which leads to the pattern replacing a reduction to scalar
with an int16x4_t vector in this case, which of course is a type error,
leading to an invalid GIMPLE ICE.

This patch adds a type check to the pattern, only going ahead with the
transformation if the element type of the ctor matches that of the
reduction.

gcc/ChangeLog:

PR tree-optimization/121772
* match.pd: Add type check to reduc(ctor) pattern.

gcc/testsuite/ChangeLog:

PR tree-optimization/121772
* gcc.target/aarch64/torture/pr121772.c: New test.

(cherry picked from commit a7a9b7badc0ba95b510c7e61da6439fca78e31d3)

6 weeks agoError out stack-protector unavailability on AIX
Ayappan Perumal [Mon, 1 Sep 2025 13:27:52 +0000 (08:27 -0500)]
Error out stack-protector unavailability on AIX

stack-protector is not supported in GCC on AIX. This patch is to fail the
compilation if -fstack-protector option is passed.

gcc/ChangeLog:

* config/rs6000/aix.h (SUBTARGET_DRIVER_SELF_SPECS):
Error out when stack-protector option is used in AIX
as it is not supported on AIX

Approved By: Segher Boessenkool <segher@kernel.crashing.org>

(cherry picked from commit dfb7e97dd214f7d8ca0fa970d81ad5ba805aaa8d)

6 weeks agoDaily bump.
GCC Administrator [Thu, 16 Oct 2025 00:23:00 +0000 (00:23 +0000)]
Daily bump.

6 weeks agoDaily bump.
GCC Administrator [Wed, 15 Oct 2025 00:23:35 +0000 (00:23 +0000)]
Daily bump.

6 weeks agotree-optimization/120156 - ICE in ptr_derefs_may_alias_p
Richard Biener [Tue, 14 May 2024 09:13:51 +0000 (11:13 +0200)]
tree-optimization/120156 - ICE in ptr_derefs_may_alias_p

This picks the ptr_derefs_may_alias_p fix from the PR99954 fix
which said:  This makes us run into a latent issue in
ptr_deref_may_alias_decl_p when the pointer is something like &MEM[0].a
in which case we fail to handle non-SSA name pointers.  Add code
similar to what we have in ptr_derefs_may_alias_p.

PR tree-optimization/120156
* tree-ssa-alias.cc (ptr_deref_may_alias_decl_p): Verify
the pointer is an SSA name.

(cherry picked from commit 50d3f67c71cf77a4ec95152079d37adf9d0b0a35)

6 weeks agoDaily bump.
GCC Administrator [Tue, 14 Oct 2025 00:24:00 +0000 (00:24 +0000)]
Daily bump.

7 weeks agoDaily bump.
GCC Administrator [Mon, 13 Oct 2025 00:21:59 +0000 (00:21 +0000)]
Daily bump.

7 weeks agoDaily bump.
GCC Administrator [Sun, 12 Oct 2025 00:21:56 +0000 (00:21 +0000)]
Daily bump.

7 weeks agoDaily bump.
GCC Administrator [Sat, 11 Oct 2025 00:23:40 +0000 (00:23 +0000)]
Daily bump.

7 weeks agoDaily bump.
GCC Administrator [Fri, 10 Oct 2025 00:24:51 +0000 (00:24 +0000)]
Daily bump.

7 weeks agoDaily bump.
GCC Administrator [Thu, 9 Oct 2025 00:24:09 +0000 (00:24 +0000)]
Daily bump.

7 weeks agoDaily bump.
GCC Administrator [Wed, 8 Oct 2025 00:23:32 +0000 (00:23 +0000)]
Daily bump.

7 weeks agoDaily bump.
GCC Administrator [Tue, 7 Oct 2025 00:24:14 +0000 (00:24 +0000)]
Daily bump.

8 weeks agoDaily bump.
GCC Administrator [Mon, 6 Oct 2025 00:20:42 +0000 (00:20 +0000)]
Daily bump.

8 weeks agoFortran: fix TRANSFER with rank 1 unlimited polymorphic SOURCE [PR121263]
Harald Anlauf [Wed, 3 Sep 2025 18:41:20 +0000 (20:41 +0200)]
Fortran: fix TRANSFER with rank 1 unlimited polymorphic SOURCE [PR121263]

PR fortran/121263

gcc/fortran/ChangeLog:

* trans-intrinsic.cc (gfc_conv_intrinsic_transfer): For an
unlimited polymorphic SOURCE to TRANSFER use saved descriptor
if possible.

gcc/testsuite/ChangeLog:

* gfortran.dg/transfer_class_5.f90: New test.

(cherry picked from commit 692281a38773a70ae795b3b594f0c0f8fd83e5ef)

8 weeks agoDaily bump.
GCC Administrator [Sun, 5 Oct 2025 16:52:52 +0000 (16:52 +0000)]
Daily bump.

8 weeks ago[committed] [PR rtl-optimization/101188] Fix reload_cse_move2add ignoring clobbers
Jeff Law [Mon, 12 Jun 2023 18:52:10 +0000 (12:52 -0600)]
[committed] [PR rtl-optimization/101188] Fix reload_cse_move2add ignoring clobbers

So as Georg-Johann discusses in the BZ, reload_cse_move2add can generate
 incorrect code when optimizing code with clobbers.  Specifically in the
case where we try to optimize a sequence of 4 operations down to 3
operations we can reset INSN to the next instruction and continue the loop.

That skips the code to invalidate objects based on things like REG_INC
nodes, stack pushes and most importantly clobbers attached to the current
insn.

This patch factors all of the invalidation code used by reload_cse_move2add
into a new function and calls it at the appropriate time.

Georg-Johann has confirmed this patch fixes his avr bug and I've had it in
my tester over the weekend.  It's bootstrapped and regression tested on
aarch64, m68k, sh4, alpha and hppa.  It's also regression tested successfully
on a wide variety of other targets.

gcc/
PR rtl-optimization/101188
* postreload.cc (reload_cse_move2add_invalidate): New function,
extracted from...
(reload_cse_move2add): Call reload_cse_move2add_invalidate.

gcc/testsuite
PR rtl-optimization/101188
* gcc.c-torture/execute/pr101188.c: New test

(cherry picked from commit ae193f9008e02683e27f3c87f3b06f38e103b1d0)

8 weeks agoDaily bump.
GCC Administrator [Thu, 2 Oct 2025 00:23:04 +0000 (00:23 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Wed, 1 Oct 2025 00:24:12 +0000 (00:24 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Tue, 30 Sep 2025 00:23:48 +0000 (00:23 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Mon, 29 Sep 2025 00:21:22 +0000 (00:21 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Sun, 28 Sep 2025 00:21:52 +0000 (00:21 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Sat, 27 Sep 2025 00:21:26 +0000 (00:21 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Fri, 26 Sep 2025 00:21:41 +0000 (00:21 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Thu, 25 Sep 2025 00:22:40 +0000 (00:22 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Wed, 24 Sep 2025 00:23:11 +0000 (00:23 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Tue, 23 Sep 2025 00:23:01 +0000 (00:23 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Mon, 22 Sep 2025 00:21:31 +0000 (00:21 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Sun, 21 Sep 2025 00:21:25 +0000 (00:21 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Sat, 20 Sep 2025 00:21:59 +0000 (00:21 +0000)]
Daily bump.

2 months agoDaily bump.
GCC Administrator [Fri, 19 Sep 2025 00:21:51 +0000 (00:21 +0000)]
Daily bump.

2 months agoRemove SPR/GNR/DMR from avx512_{move,store}_by pieces tune.
hongtao.liu [Tue, 16 Sep 2025 01:23:45 +0000 (03:23 +0200)]
Remove SPR/GNR/DMR from avx512_{move,store}_by pieces tune.

Align move_max with prefer_vector_width for SPR/GNR/DMR similar as
below commit.

commit 6ea25c041964bf63014fcf7bb68fb1f5a0a4e123
Author: liuhongt <hongtao.liu@intel.com>
Date:   Thu Aug 15 12:54:07 2024 +0800

    Align ix86_{move_max,store_max} with vectorizer.

    When none of mprefer-vector-width, avx256_optimal/avx128_optimal,
    avx256_store_by_pieces/avx512_store_by_pieces is specified, GCC will
    set ix86_{move_max,store_max} as max available vector length except
    for AVX part.

                  if (TARGET_AVX512F_P (opts->x_ix86_isa_flags)
                      && TARGET_EVEX512_P (opts->x_ix86_isa_flags2))
                    opts->x_ix86_move_max = PVW_AVX512;
                  else
                    opts->x_ix86_move_max = PVW_AVX128;

    So for -mavx2, vectorizer will choose 256-bit for vectorization, but
    128-bit is used for struct copy, there could be a potential STLF issue
    due to this "misalign".

gcc/ChangeLog:

* config/i386/x86-tune.def (X86_TUNE_AVX512_MOVE_BY_PIECES):
Remove SPR/GNR/DMR.
(X86_TUNE_AVX512_STORE_BY_PIECES): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pieces-memcpy-18.c: Use -mtune=znver5
instead of -mtune=sapphirerapids.
* gcc.target/i386/pieces-memcpy-21.c: Ditto.
* gcc.target/i386/pieces-memset-46.c: Ditto.
* gcc.target/i386/pieces-memset-49.c: Ditto.

(cherry picked from commit dd713d0f3fc88778a9b3d4f8f1895a3cd6c145ca)

2 months agoDaily bump.
GCC Administrator [Thu, 18 Sep 2025 00:22:19 +0000 (00:22 +0000)]
Daily bump.

2 months agotree-sra: Avoid total SRA if there are incompat. aggregate accesses (PR119085)
Martin Jambor [Wed, 23 Jul 2025 09:22:33 +0000 (11:22 +0200)]
tree-sra: Avoid total SRA if there are incompat. aggregate accesses  (PR119085)

We currently use the types encountered in the function body and not in
type declaration to perform total scalarization.  Bug PR 119085
uncovered that we miss a check that when the same data is accessed
with aggregate types that those are actually compatible.  Without it,
we can base total scalarization on a type that does not "cover" all
live data in a different part of the function.  This patch adds the
check.

gcc/ChangeLog:

2025-07-21  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/119085
* tree-sra.cc (sort_and_splice_var_accesses): Prevent total
scalarization if two incompatible aggregates access the same place.

gcc/testsuite/ChangeLog:

2025-07-21  Martin Jambor  <mjambor@suse.cz>

PR tree-optimization/119085
* gcc.dg/tree-ssa/pr119085.c: New test.

(cherry picked from commit dabac057141c26a69325a410c81de0ff2157c6c9)

This page took 0.122187 seconds and 5 git commands to generate.