Commit Graph

195235 Commits

Author SHA1 Message Date
GCC Administrator
958c386ac9 Daily bump. 2024-07-20 00:19:45 +00:00
LIU Hao
2c5f48a43f Do not use caller-saved registers for COMDAT functions
A reference to a COMDAT function may be resolved to another definition
outside the current translation unit, so it's not eligible for `-fipa-ra`.

In `decl_binds_to_current_def_p()` there is already a check for weak
symbols. This commit checks for COMDAT functions that are not implemented
as weak symbols, for example, on *-*-mingw32.

gcc/ChangeLog:

	PR rtl-optimization/115049
	* varasm.cc (decl_binds_to_current_def_p): Add a check for COMDAT
	declarations too, like weak ones.

(cherry picked from commit 5080840d8f)
2024-07-19 09:50:29 +00:00
GCC Administrator
b1ec101ee3 Daily bump. 2024-07-19 00:21:11 +00:00
Uros Bizjak
c5a26fc24b alpha: Fix duplicate !tlsgd!62 assemble error [PR115526]
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_osf_<tls>): Ditto.

gcc/testsuite/ChangeLog:

	* gcc.target/alpha/pr115526.c: New test.

(cherry picked from commit 0841fd4c42)
2024-07-18 16:38:35 +02:00
GCC Administrator
a98dc99196 Daily bump. 2024-07-18 00:21:44 +00:00
GCC Administrator
3666b142d1 Daily bump. 2024-07-17 00:21:57 +00:00
Stefan Schulze Frielinghaus
9e00ae3e23 s390: Fix output template for movv1qi
Although for instructions MVI and MVIY it does not make a difference
whether the immediate is interpreted as signed or unsigned, GAS expects
unsigned immediates for instruction format SI_URD.

gcc/ChangeLog:

	* config/s390/vector.md (mov<mode>): Fix output template for
	movv1qi.

(cherry picked from commit e6680d3f39)
2024-07-16 14:01:58 +02:00
Stefan Schulze Frielinghaus
06d8257194 s390: Align *cjump_64 and *icjump_64
During machine reorg we optimize backward jumps and transform insns as
e.g.

(jump_insn 118 117 119 (set (pc)
        (if_then_else (ne (reg:CCRAW 33 %cc)
                (const_int 8 [0x8]))
            (label_ref 134)
            (pc))) "dec_math_1.f90":204:8 discrim 1 2161 {*cjump_64}
     (expr_list:REG_DEAD (reg:CCRAW 33 %cc)
        (int_list:REG_BR_PROB 719407028 (nil)))
 -> 134)

into

(jump_insn 118 117 432 (set (pc)
        (if_then_else (ne (reg:CCRAW 33 %cc)
                (const_int 8 [0x8]))
            (pc)
            (label_ref 433))) "dec_math_1.f90":204:8 discrim 1 -1
     (expr_list:REG_DEAD (reg:CCRAW 33 %cc)
        (int_list:REG_BR_PROB 719407028 (nil)))
 -> 433)

The latter is not recognized anymore since *icjump_64 only matches
CC_REGNUM against zero.  Fixed by aligning *cjump_64 and *icjump_64.

gcc/ChangeLog:

	* config/s390/s390.md (*icjump_64): Allow raw CC comparisons,
	i.e., any constant integer between 0 and 15 for CC comparisons.

(cherry picked from commit 56de68aba6)
2024-07-16 14:01:50 +02:00
GCC Administrator
fbc5751faf Daily bump. 2024-07-16 00:23:24 +00:00
liuhongt
e1427b39d2 Fix SSA_NAME leak due to def_stmt is removed before use_stmt.
-  _5 = __atomic_fetch_or_8 (&set_work_pending_p, 1, 0);
-  # DEBUG old => (long int) _5
+  _6 = .ATOMIC_BIT_TEST_AND_SET (&set_work_pending_p, 0, 1, 0, __atomic_fetch_or_8);
+  # DEBUG old => NULL
   # DEBUG BEGIN_STMT
-  # DEBUG D#2 => _5 & 1
+  # DEBUG D#2 => NULL
...
-  _10 = ~_5;
-  _8 = (_Bool) _10;
-  # DEBUG ret => _8
+  _8 = _6 == 0;
+  # DEBUG ret => (_Bool) _10

confirmed.  convert_atomic_bit_not does this, it checks for single_use
and removes the def, failing to release the name (which would fix this up
IIRC).

Note the function removes stmts in "wrong" order (before uses of LHS
are removed), so it requires larger surgery.  And it leaks SSA names.

gcc/ChangeLog:

	PR target/115872
	* tree-ssa-ccp.cc (convert_atomic_bit_not): Remove use_stmt after use_nop_stmt is removed.
	(optimize_atomic_bit_test_and): Ditto.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/pr115872.c: New test.

(cherry picked from commit a8209237dc46dc4db7d9d8e3807e6c93734c64b5)
2024-07-15 12:51:59 +08:00
GCC Administrator
b23efee77a Daily bump. 2024-07-15 00:21:15 +00:00
GCC Administrator
541ef1b454 Daily bump. 2024-07-14 00:21:49 +00:00
GCC Administrator
419bbd5a41 Daily bump. 2024-07-13 00:21:22 +00:00
GCC Administrator
d6f5415023 Daily bump. 2024-07-12 00:23:08 +00:00
Andre Vieira
a655c8d209 mve: Fix vsetq_lane for 64-bit elements with lane 1 [PR 115611]
This patch fixes the backend pattern that was printing the wrong input
scalar register pair when inserting into lane 1.

Added a new test to force float-abi=hard so we can use scan-assembler to check
correct codegen.

gcc/ChangeLog:

	PR target/115611
	* config/arm/mve.md (mve_vec_setv2di_internal): Fix printing of input
	scalar register pair when lane = 1.

gcc/testsuite/ChangeLog:

	* gcc.target/arm/mve/intrinsics/vsetq_lane_su64.c: New test.

(cherry picked from commit 7c11fdd2cc)
2024-07-11 17:45:53 +01:00
GCC Administrator
8476fb6214 Daily bump. 2024-07-11 00:20:20 +00:00
Uros Bizjak
10904e051f middle-end: Fix stalled swapped condition code value [PR115836]
emit_store_flag_1 calculates scode (swapped condition code) at the
beginning of the function from the value of code variable.  However,
code variable may change before scode usage site, resulting in
invalid stalled scode value.

Move calculation of scode value just before its only usage site to
avoid stalled scode value.

	PR middle-end/115836

gcc/ChangeLog:

	* expmed.cc (emit_store_flag_1): Move calculation of
	scode just before its only usage site.

(cherry picked from commit 44933fdeb3)
2024-07-10 15:16:23 +02:00
GCC Administrator
a6283abe36 Daily bump. 2024-07-10 00:21:12 +00:00
Jonathan Wakely
987e70f429 libstdc++: Fix _Atomic(T) macro in <stdatomic.h> [PR115807]
The definition of the _Atomic(T) macro needs to refer to ::std::atomic,
not some other std::atomic relative to the current namespace.

libstdc++-v3/ChangeLog:

	PR libstdc++/115807
	* include/c_compatibility/stdatomic.h (_Atomic): Ensure it
	refers to std::atomic in the global namespace.
	* testsuite/29_atomics/headers/stdatomic.h/115807.cc: New test.

(cherry picked from commit 40d234dd64)
2024-07-09 21:56:45 +01:00
GCC Administrator
fe82e2ae16 Daily bump. 2024-07-09 00:20:40 +00:00
GCC Administrator
69520d77fa Daily bump. 2024-07-08 00:20:02 +00:00
GCC Administrator
1855da033f Daily bump. 2024-07-07 00:19:56 +00:00
GCC Administrator
d85d7ce0ad Daily bump. 2024-07-06 00:20:30 +00:00
Wilco Dijkstra
b9d16d8361 AArch64: Fix strict-align cpymem/setmem [PR103100]
The cpymemdi/setmemdi implementation doesn't fully support strict alignment.
Block the expansion if the alignment is less than 16 with STRICT_ALIGNMENT.
Clean up the condition when to use MOPS.

gcc/ChangeLog/
	PR target/103100
	* config/aarch64/aarch64.md (cpymemdi): Remove pattern condition.
	(setmemdi): Likewise.
	* config/aarch64/aarch64.cc (aarch64_expand_cpymem): Support
	strict-align.  Cleanup condition for using MOPS.
	(aarch64_expand_setmem): Likewise.

(cherry picked from commit 318f5232cf)
2024-07-05 13:36:32 +01:00
Georg-Johann Lay
5f4a60c43d AVR: target/87376 - Use nop_general_operand for DImode inputs.
The avr-dimode.md expanders have code like  emit_move_insn(acc_a, operands[1])
where acc_a is a hard register and operands[1] might be a non-generic
address-space memory reference.  Such loads may clobber hard regs since
some of them are implemented as libgcc calls /and/ 64-moves are
expanded as eight byte-moves, so that acc_a or acc_b might be clobbered
by such a load.

This patch simply denies non-generic address-space references by using
nop_general_operand for all avr-dimode.md input predicates.
With the patch, all memory loads that require library calls are issued
before the expander codes from avr-dimode.md are run.

	PR target/87376
gcc/
	* config/avr/avr-dimode.md: Use "nop_general_operand" instead
	of "general_operand" as predicate for all input operands.

gcc/testsuite/
	* gcc.target/avr/torture/pr87376.c: New test.

(cherry picked from commit 23a0935262)
2024-07-05 13:48:19 +02:00
GCC Administrator
92a6ff14c4 Daily bump. 2024-07-05 00:20:24 +00:00
Kyrylo Tkachov
cdeb7ce83f aarch64: PR target/115475 Implement missing __ARM_FEATURE_SVE_BF16 macro
The ACLE requires __ARM_FEATURE_SVE_BF16 to be enabled when SVE and BF16
and the associated intrinsics are available.
GCC does support the required intrinsics for TARGET_SVE_BF16 so define
this macro too.

Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/

	PR target/115475
	* config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins):
	Define __ARM_FEATURE_SVE_BF16 for TARGET_SVE_BF16.

gcc/testsuite/

	PR target/115475
	* gcc.target/aarch64/acle/bf16_sve_feature.c: New test.

Signed-off-by: Kyrylo Tkachov <ktkachov@nvidia.com>
(cherry picked from commit 6492c7130d)
2024-07-04 13:08:54 +05:30
Kyrylo Tkachov
ebf561429e aarch64: PR target/115457 Implement missing __ARM_FEATURE_BF16 macro
The ACLE asks the user to test for __ARM_FEATURE_BF16 before using the
<arm_bf16.h> header but GCC doesn't set this up.
LLVM does, so this is an inconsistency between the compilers.

This patch enables that macro for TARGET_BF16_FP.
Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/

	PR target/115457
	* config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins):
	Define __ARM_FEATURE_BF16 for TARGET_BF16_FP.

gcc/testsuite/

	PR target/115457
	* gcc.target/aarch64/acle/bf16_feature.c: New test.

Signed-off-by: Kyrylo Tkachov <ktkachov@nvidia.com>
(cherry picked from commit c10942134f)
2024-07-04 13:08:48 +05:30
GCC Administrator
843eba6f38 Daily bump. 2024-07-04 00:21:22 +00:00
John David Anglin
0c98d9479c hppa: Fix ICE caused by mismatched predicate and constraint in xmpyu patterns
2024-06-30  John David Anglin  <danglin@gcc.gnu.org>

gcc/ChangeLog:

	PR target/115691
	* config/pa/pa.md: Remove incorrect xmpyu patterns.
2024-07-03 14:31:31 -04:00
Georg-Johann Lay
5f699cb08e AVR: target/98762 - Handle partial clobber in movqi output.
PR target/98762
gcc/
	* config/avr/avr.cc (avr_out_movqi_r_mr_reg_disp_tiny): Properly
	restore the base register when it is partially clobbered.
gcc/testsuite/
	* gcc.target/avr/torture/pr98762.c: New test.

(cherry picked from commit e9fb6efa1c)
2024-07-03 10:46:59 +02:00
Kewen Lin
ca6eea0eb3 rs6000: Fix wrong RTL patterns for vector merge high/low short on LE
Commit r12-4496 changes some define_expands and define_insns
for vector merge high/low short, which are altivec_vmrg[hl]h.
These defines are mainly for built-in function vec_merge{h,l}
and some internal gen function needs.  These functions should
consider endianness, taking vec_mergeh as example, as PVIPR
defines, vec_mergeh "Merges the first halves (in element order)
of two vectors", it does note it's in element order.  So it's
mapped into vmrghh on BE while vmrglh on LE respectively.
Although the mapped insns are different, as the discussion in
PR106069, the RTL pattern should be still the same, it is
conformed before commit r12-4496, but gets changed into
different patterns on BE and LE starting from commit r12-4496.
Similar to 32-bit element case in commit log of r15-1504, this
16-bit element pattern on LE doesn't actually match what the
underlying insn is intended to represent, once some optimization
like combine does some changes basing on it, it would cause
the unexpected consequence.  The newly constructed test case
pr106069-2.c is a typical example for this issue on element type
short.

So this patch is to fix the wrong RTL pattern, ensure the
associated RTL patterns become the same as before which can
have the same semantic as their mapped insns.  With the
proposed patch, the expanders like altivec_vmrghh expands
into altivec_vmrghh_direct_be or altivec_vmrglh_direct_le
depending on endianness, "direct" can easily show which
insn would be generated, _be and _le are mainly for the
different RTL patterns as endianness.

Co-authored-by: Xionghu Luo <xionghuluo@tencent.com>

	PR target/106069
	PR target/115355

gcc/ChangeLog:

	* config/rs6000/altivec.md (altivec_vmrghh_direct): Rename to ...
	(altivec_vmrghh_direct_be): ... this.  Add condition BYTES_BIG_ENDIAN.
	(altivec_vmrghh_direct_le): New define_insn.
	(altivec_vmrglh_direct): Rename to ...
	(altivec_vmrglh_direct_be): ... this.  Add condition BYTES_BIG_ENDIAN.
	(altivec_vmrglh_direct_le): New define_insn.
	(altivec_vmrghh): Adjust by calling gen_altivec_vmrghh_direct_be
	for BE and gen_altivec_vmrglh_direct_le for LE.
	(altivec_vmrglh): Adjust by calling gen_altivec_vmrglh_direct_be
	for BE and gen_altivec_vmrghh_direct_le for LE.
	(vec_widen_umult_hi_v16qi): Adjust the call to
	gen_altivec_vmrghh_direct by gen_altivec_vmrghh for BE
	and by gen_altivec_vmrglh for LE.
	(vec_widen_smult_hi_v16qi): Likewise.
	(vec_widen_umult_lo_v16qi): Adjust the call to
	gen_altivec_vmrglh_direct by gen_altivec_vmrglh for BE
	and by gen_altivec_vmrghh for LE.
	(vec_widen_smult_lo_v16qi): Likewise.
	* config/rs6000/rs6000.cc (altivec_expand_vec_perm_const): Replace
	CODE_FOR_altivec_vmrghh_direct by
	CODE_FOR_altivec_vmrghh_direct_be for BE and
	CODE_FOR_altivec_vmrghh_direct_le for LE.  And replace
	CODE_FOR_altivec_vmrglh_direct by
	CODE_FOR_altivec_vmrglh_direct_be for BE and
	CODE_FOR_altivec_vmrglh_direct_le for LE.

gcc/testsuite/ChangeLog:

	* gcc.target/powerpc/pr106069-2.c: New test.

(cherry picked from commit 812c70bf49)
2024-07-02 21:01:22 -05:00
Kewen Lin
13f0528c78 rs6000: Fix wrong RTL patterns for vector merge high/low char on LE
Commit r12-4496 changes some define_expands and define_insns
for vector merge high/low char, which are altivec_vmrg[hl]b.
These defines are mainly for built-in function vec_merge{h,l}
and some internal gen function needs.  These functions should
consider endianness, taking vec_mergeh as example, as PVIPR
defines, vec_mergeh "Merges the first halves (in element order)
of two vectors", it does note it's in element order.  So it's
mapped into vmrghb on BE while vmrglb on LE respectively.
Although the mapped insns are different, as the discussion in
PR106069, the RTL pattern should be still the same, it is
conformed before commit r12-4496, but gets changed into
different patterns on BE and LE starting from commit r12-4496.
Similar to 32-bit element case in commit log of r15-1504, this
8-bit element pattern on LE doesn't actually match what the
underlying insn is intended to represent, once some optimization
like combine does some changes basing on it, it would cause
the unexpected consequence.  The newly constructed test case
pr106069-1.c is a typical example for this issue.

So this patch is to fix the wrong RTL pattern, ensure the
associated RTL patterns become the same as before which can
have the same semantic as their mapped insns.  With the
proposed patch, the expanders like altivec_vmrghb expands
into altivec_vmrghb_direct_be or altivec_vmrglb_direct_le
depending on endianness, "direct" can easily show which
insn would be generated, _be and _le are mainly for the
different RTL patterns as endianness.

Co-authored-by: Xionghu Luo <xionghuluo@tencent.com>

	PR target/106069
	PR target/115355

gcc/ChangeLog:

	* config/rs6000/altivec.md (altivec_vmrghb_direct): Rename to ...
	(altivec_vmrghb_direct_be): ... this.  Add condition BYTES_BIG_ENDIAN.
	(altivec_vmrghb_direct_le): New define_insn.
	(altivec_vmrglb_direct): Rename to ...
	(altivec_vmrglb_direct_be): ... this.  Add condition BYTES_BIG_ENDIAN.
	(altivec_vmrglb_direct_le): New define_insn.
	(altivec_vmrghb): Adjust by calling gen_altivec_vmrghb_direct_be
	for BE and gen_altivec_vmrglb_direct_le for LE.
	(altivec_vmrglb): Adjust by calling gen_altivec_vmrglb_direct_be
	for BE and gen_altivec_vmrghb_direct_le for LE.
	* config/rs6000/rs6000.cc (altivec_expand_vec_perm_const): Replace
	CODE_FOR_altivec_vmrghb_direct by
	CODE_FOR_altivec_vmrghb_direct_be for BE and
	CODE_FOR_altivec_vmrghb_direct_le for LE.  And replace
	CODE_FOR_altivec_vmrglb_direct by
	CODE_FOR_altivec_vmrglb_direct_be for BE and
	CODE_FOR_altivec_vmrglb_direct_le for LE.

gcc/testsuite/ChangeLog:

	* gcc.target/powerpc/pr106069-1.c: New test.

(cherry picked from commit 62520e4e9f)
2024-07-02 21:01:08 -05:00
GCC Administrator
c99573f7c9 Daily bump. 2024-07-03 00:21:39 +00:00
GCC Administrator
4351caffa7 Daily bump. 2024-07-02 00:20:50 +00:00
Georg-Johann Lay
53305588cf AVR: target/88236, target/115726 - Fix __memx code generation.
PR target/88236
	PR target/115726
gcc/
	* config/avr/avr.md (mov<mode>) [avr_mem_memx_p]: Expand in such a
	way that the destination does not overlap with any hard register
	clobbered / used by xload8qi_A resp. xload<mode>_A.
	* config/avr/avr.cc (avr_out_xload): Avoid early-clobber
	situation for Z by executing just one load when the output register
	overlaps with Z.
gcc/testsuite/
	* gcc.target/avr/torture/pr88236-pr115726.c: New test.

(cherry picked from commit 3d23abd3dd)
2024-07-01 13:47:49 +02:00
GCC Administrator
1d6c409fdf Daily bump. 2024-07-01 00:21:04 +00:00
GCC Administrator
1a837bc65b Daily bump. 2024-06-30 00:20:30 +00:00
GCC Administrator
ae5bf1a308 Daily bump. 2024-06-29 00:20:32 +00:00
Kewen Lin
96ef336706 rs6000: Fix wrong RTL patterns for vector merge high/low word on LE
Commit r12-4496 changes some define_expands and define_insns
for vector merge high/low word, which are altivec_vmrg[hl]w,
vsx_xxmrg[hl]w_<VSX_W:mode>.  These defines are mainly for
built-in function vec_merge{h,l}, __builtin_vsx_xxmrghw,
__builtin_vsx_xxmrghw_4si and some internal gen function
needs.  These functions should consider endianness, taking
vec_mergeh as example, as PVIPR defines, vec_mergeh "Merges
the first halves (in element order) of two vectors", it does
note it's in element order.  So it's mapped into vmrghw on
BE while vmrglw on LE respectively.  Although the mapped
insns are different, as the discussion in PR106069, the RTL
pattern should be still the same, it is conformed before
commit r12-4496, define_expand altivec_vmrghw got expanded
into:

  (vec_select:VSX_W
     (vec_concat:<VS_double>
        (match_operand:VSX_W 1 "register_operand" "wa,v")
        (match_operand:VSX_W 2 "register_operand" "wa,v"))
        (parallel [(const_int 0) (const_int 4)
                   (const_int 1) (const_int 5)])))]

on both BE and LE then.  But commit r12-4496 changed it to
expand into:

  (vec_select:VSX_W
     (vec_concat:<VS_double>
        (match_operand:VSX_W 1 "register_operand" "wa,v")
        (match_operand:VSX_W 2 "register_operand" "wa,v"))
        (parallel [(const_int 0) (const_int 4)
                   (const_int 1) (const_int 5)])))]

on BE, and

  (vec_select:VSX_W
     (vec_concat:<VS_double>
        (match_operand:VSX_W 1 "register_operand" "wa,v")
        (match_operand:VSX_W 2 "register_operand" "wa,v"))
        (parallel [(const_int 2) (const_int 6)
                   (const_int 3) (const_int 7)])))]

on LE, although the mapped insn are still vmrghw on BE and
vmrglw on LE, the associated RTL pattern is completely
wrong and inconsistent with the mapped insn.  If optimization
passes leave this pattern alone, even if its pattern doesn't
represent its mapped insn, it's still fine, that's why simple
testing on bif doesn't expose this issue.  But once some
optimization pass such as combine does some changes basing
on this wrong pattern, because the pattern doesn't match the
semantics that the expanded insn is intended to represent,
it would cause the unexpected result.

So this patch is to fix the wrong RTL pattern, ensure the
associated RTL patterns become the same as before which can
have the same semantic as their mapped insns.  With the
proposed patch, the expanders like altivec_vmrghw expands
into altivec_vmrghb_direct_be or altivec_vmrglb_direct_le
depending on endianness, "direct" can easily show which
insn would be generated, _be and _le are mainly for the
different RTL patterns as endianness.

Co-authored-by: Xionghu Luo <xionghuluo@tencent.com>

	PR target/106069
	PR target/115355

gcc/ChangeLog:

	* config/rs6000/altivec.md (altivec_vmrghw_direct_<VSX_W:mode>): Rename
	to ...
	(altivec_vmrghw_direct_<VSX_W:mode>_be): ... this.  Add the condition
	BYTES_BIG_ENDIAN.
	(altivec_vmrghw_direct_<VSX_W:mode>_le): New define_insn.
	(altivec_vmrglw_direct_<VSX_W:mode>): Rename to ...
	(altivec_vmrglw_direct_<VSX_W:mode>_be): ... this.  Add the condition
	BYTES_BIG_ENDIAN.
	(altivec_vmrglw_direct_<VSX_W:mode>_le): New define_insn.
	(altivec_vmrghw): Adjust by calling gen_altivec_vmrghw_direct_v4si_be
	for BE and gen_altivec_vmrglw_direct_v4si_le for LE.
	(altivec_vmrglw): Adjust by calling gen_altivec_vmrglw_direct_v4si_be
	for BE and gen_altivec_vmrghw_direct_v4si_le for LE.
	(vec_widen_umult_hi_v8hi): Adjust the call to
	gen_altivec_vmrghw_direct_v4si by gen_altivec_vmrghw for BE
	and by gen_altivec_vmrglw for LE.
	(vec_widen_smult_hi_v8hi): Likewise.
	(vec_widen_umult_lo_v8hi): Adjust the call to
	gen_altivec_vmrglw_direct_v4si by gen_altivec_vmrglw for BE
	and by gen_altivec_vmrghw for LE
	(vec_widen_smult_lo_v8hi): Likewise.
	* config/rs6000/rs6000.cc (altivec_expand_vec_perm_const): Replace
	CODE_FOR_altivec_vmrghw_direct_v4si by
	CODE_FOR_altivec_vmrghw_direct_v4si_be for BE and
	CODE_FOR_altivec_vmrghw_direct_v4si_le for LE.  And replace
	CODE_FOR_altivec_vmrglw_direct_v4si by
	CODE_FOR_altivec_vmrglw_direct_v4si_be for BE and
	CODE_FOR_altivec_vmrglw_direct_v4si_le for LE.
	* config/rs6000/vsx.md (vsx_xxmrghw_<VSX_W:mode>): Adjust by calling
	gen_altivec_vmrghw_direct_v4si_be for BE and
	gen_altivec_vmrglw_direct_v4si_le for LE.
	(vsx_xxmrglw_<VSX_W:mode>): Adjust by calling
	gen_altivec_vmrglw_direct_v4si_be for BE and
	gen_altivec_vmrghw_direct_v4si_le for LE.

gcc/testsuite/ChangeLog:

	* g++.target/powerpc/pr106069.C: New test.
	* gcc.target/powerpc/pr115355.c: New test.

(cherry picked from commit 52c112800d)
2024-06-27 20:12:33 -05:00
GCC Administrator
aba733582e Daily bump. 2024-06-28 00:20:48 +00:00
Alexandre Oliva
95ca5f4582 [libstdc++] [testsuite] defer to check_vect_support* [PR115454]
The newly-added testcase overrides the default dg-do action set by
check_vect_support_and_set_flags (in libstdc++-dg/conformance.exp), so
it attempts to run the test even if runtime vector support is not
available.

Remove the explicit dg-do directive, so that the default is honored,
and the test is run if vector support is found, and only compiled
otherwise.


for  libstdc++-v3/ChangeLog

	PR libstdc++/115454
	* testsuite/experimental/simd/pr115454_find_last_set.cc: Defer
	to check_vect_support_and_set_flags's default dg-do action.

(cherry picked from commit 95faa1bea7)
2024-06-27 08:44:54 -03:00
Kyrylo Tkachov
25cb13649b Add support for -mcpu=grace
This adds support for the NVIDIA Grace CPU to aarch64.
We reuse the tuning decisions for the Neoverse V2 core, but include a
number of architecture features that are not enabled by default in
-mcpu=neoverse-v2.

This allows Grace users to more simply target the CPU with -mcpu=grace
rather than remembering what extensions to tag on top of
-mcpu=neoverse-v2.

Bootstrapped and tested on aarch64-none-linux-gnu.
gcc/

	* config/aarch64/aarch64-cores.def (grace): New entry.
	* config/aarch64/aarch64-tune.md: Regenerate.
	* doc/invoke.texi (AArch64 Options): Document the above.

Signed-off-by: Kyrylo Tkachov <ktkachov@nvidia.com>
2024-06-27 10:26:52 +02:00
GCC Administrator
4f8dc81c17 Daily bump. 2024-06-27 00:20:21 +00:00
GCC Administrator
809d911415 Daily bump. 2024-06-26 00:20:42 +00:00
Jonathan Wakely
4b69afd72e libstdc++: Remove confusing text from status tables for release branch
When I tried to make the release branch versions of these docs refer to
the release branch instead of "mainline GCC", for some reason I left the
text "not any particular release" there. That's just confusing, because
the docs are for a particular release, the latest on that branch. Remove
that confusing text in several places.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2023.xml: Change reference from
	mainline GCC to the release branch.
	* doc/xml/manual/status_cxx1998.xml: Remove confusing "not in
	any particular release" text.
	* doc/xml/manual/status_cxx2011.xml: Likewise.
	* doc/xml/manual/status_cxx2014.xml: Likewise.
	* doc/xml/manual/status_cxx2017.xml: Likewise.
	* doc/xml/manual/status_cxx2020.xml: Likewise.
	* doc/xml/manual/status_cxxtr1.xml: Likewise.
	* doc/xml/manual/status_cxxtr24733.xml: Likewise.
	* doc/html/manual/status.html: Regenerate.
2024-06-25 23:29:12 +01:00
GCC Administrator
814b8cce9f Daily bump. 2024-06-25 00:20:57 +00:00
Kewen Lin
0fd6ae9b20 rs6000: Don't clobber return value when eh_return called [PR114846]
As the associated test case in PR114846 shows, currently
with eh_return involved some register restoring for EH
RETURN DATA in epilogue can clobber the one which holding
the return value.  Referring to the existing handlings in
some other targets, this patch makes eh_return expander
call one new define_insn_and_split eh_return_internal which
directly calls rs6000_emit_epilogue with epilogue_type
EPILOGUE_TYPE_EH_RETURN instead of the previous treating
normal return with crtl->calls_eh_return specially.

	PR target/114846

gcc/ChangeLog:

	* config/rs6000/rs6000-logue.cc (rs6000_emit_epilogue): As
	EPILOGUE_TYPE_EH_RETURN would be passed as epilogue_type directly
	now, adjust the relevant handlings on it.
	* config/rs6000/rs6000.md (eh_return expander): Append by calling
	gen_eh_return_internal and emit_barrier.
	(eh_return_internal): New define_insn_and_split, call function
	rs6000_emit_epilogue with epilogue type EPILOGUE_TYPE_EH_RETURN.

gcc/testsuite/ChangeLog:

	* gcc.target/powerpc/pr114846.c: New test.

(cherry picked from commit e5fc5d42d2)
2024-06-23 20:45:45 -05:00
GCC Administrator
f4affb9073 Daily bump. 2024-06-24 00:21:23 +00:00
GCC Administrator
723716cba0 Daily bump. 2024-06-23 00:20:18 +00:00