Commit graph

209121 commits

Author SHA1 Message Date
Jakub Jelinek
c3c44c01d2 expand: Add trivial folding for bit query builtins at expansion time [PR114044]
While it seems a lot of places in various optimization passes fold
bit query internal functions with INTEGER_CST arguments to INTEGER_CST
when there is a lhs, when lhs is missing, all the removals of such dead
stmts are guarded with -ftree-dce, so with -fno-tree-dce those unfolded
ifn calls remain in the IL until expansion.  If they have large/huge
BITINT_TYPE arguments, there is no BLKmode optab and so expansion ICEs,
and bitint lowering doesn't touch such calls because it doesn't know they
need touching, functions only containing those will not even be further
processed by the pass because there are no non-small BITINT_TYPE SSA_NAMEs
+ the 2 exceptions (stores of BITINT_TYPE INTEGER_CSTs and conversions
from BITINT_TYPE INTEGER_CSTs to floating point SSA_NAMEs) and when walking
there is no special case for calls with BITINT_TYPE INTEGER_CSTs either,
those are for normal calls normally handled at expansion time.

So, the following patch adjust the expansion of these 6 ifns, by doing
nothing if there is no lhs, and also just in case and user disabled all
possible passes that would fold this handles the case of setting lhs
to ifn call with INTEGER_CST argument.

2024-02-27  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/114044
	* internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY): Use
	DEF_INTERNAL_INT_EXT_FN macro rather than DEF_INTERNAL_INT_FN.
	* internal-fn.h (expand_CLRSB, expand_CLZ, expand_CTZ, expand_FFS,
	expand_PARITY): Declare.
	* internal-fn.cc (expand_bitquery, expand_CLRSB, expand_CLZ,
	expand_CTZ, expand_FFS, expand_PARITY): New functions.
	(expand_POPCOUNT): Use expand_bitquery.

	* gcc.dg/bitint-95.c: New test.
2024-02-27 09:52:07 +01:00
Richard Biener
8a5d940958 tree-optimization/114081 - dominator update for prologue peeling
The following implements manual update for multi-exit loop prologue
peeling during vectorization.

	PR tree-optimization/114081
	* tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg):
	Perform manual dominator update for prologue peeling.
	(vect_do_peeling): Properly update dominators after adding the
	prologue-around guard.

	* gcc.dg/vect/vect-early-break_121-pr114081.c: New testcase.
2024-02-27 09:11:36 +01:00
Rainer Orth
8e8eac3dea testsuite: Fix gcc.dg/attr-weakref-1.c on Solaris/x86 with as [PR70582]
gcc.dg/attr-weakref-1.c FAILs on 32 and 64-bit Solaris/x86 with the
native assembler:

FAIL: gcc.dg/attr-weakref-1.c (test for excess errors)
UNRESOLVED: gcc.dg/attr-weakref-1.c compilation failed to produce executable

Excess errors:
Assembler: attr-weakref-1.c
        "/var/tmp//ccUSaysF.s", line 171 : Multiply defined symbol: "Wv3a"

This is a bug in the native as, which isn't seeing fixes recently.

Since only a single subtest is affected, this patch omits that one.

Tested on i386-pc-solaris2.11 (as and gas) and x86_64-pc-linux-gnu.

2024-02-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:
	PR ipa/70582
	* gcc.dg/attr-weakref-1.c (dg-additional-options): Define
	SOLARIS_X86_AS as appropriate.
	(lv3, Wv3a, pv3a): Wrap in !SOLARIS_X86_AS.
	(main): Likewise for chk (pv3a).
2024-02-27 08:20:25 +01:00
GCC Administrator
1e2a3b278d Daily bump. 2024-02-27 00:17:46 +00:00
Georg-Johann Lay
96773ce7d6 AVR: Tag optimization options as "Optimization".
Some options that are pure optimizations where not tagged as such.

gcc/
	* config/avr/avr.opt (mcall-prologues, mrelax, maccumulate-args)
	(mstrict-X): Tag as "Optimization".
2024-02-26 22:07:21 +01:00
Georg-Johann Lay
9b0f7ef8bc AVR: Dead code removal.
gcc/
	* config/avr/avr.cc (avr_out_compare) [AVR_TINY]: Remove code in
	an "if avr_adiw_reg_p()" block that's dead for AVR_TINY.
2024-02-26 19:59:01 +01:00
Harald Anlauf
2f71e801ad Fortran: do not evaluate polymorphic functions twice in assignment [PR114012]
PR fortran/114012

gcc/fortran/ChangeLog:

	* trans-expr.cc (gfc_conv_procedure_call): Evaluate non-trivial
	arguments just once before assigning to an unlimited polymorphic
	dummy variable.

gcc/testsuite/ChangeLog:

	* gfortran.dg/pr114012.f90: New test.
2024-02-26 18:49:09 +01:00
Jakub Jelinek
1931c40364 varasm: Handle private COMDAT function symbol reference in readonly data section [PR113617]
If default_elf_select_rtx_section is called to put a reference to some
local symbol defined in a comdat section into memory, which happens more often
since the r14-4944 RA change, linking might fail.
default_elf_select_rtx_section puts such constants into .data.rel.ro.local
etc. sections and if linker chooses comdat sections from some other TU
and discards the one to which a relocation in .data.rel.ro.local remains,
linker diagnoses error.  References to private comdat symbols can only appear
from functions or data objects in the same comdat group, so the following
patch arranges using .data.rel.ro.local.pool.<comdat_name> and similar sections.

2024-02-26  Jakub Jelinek  <jakub@redhat.com>
	    H.J. Lu  <hjl.tools@gmail.com>

	PR rtl-optimization/113617
	* varasm.cc (default_elf_select_rtx_section): For
	references to private symbols in comdat sections
	use .data.relro.local.pool.<comdat>, .data.relro.pool.<comdat>
	or .rodata.<comdat> comdat sections.

	* g++.dg/other/pr113617.C: New test.
	* g++.dg/other/pr113617.h: New test.
	* g++.dg/other/pr113617-aux.cc: New test.
2024-02-26 17:55:07 +01:00
Jakub Jelinek
77576915cf c: Improve some diagnostics for __builtin_stdc_bit_* [PR114042]
The PR complains that for the __builtin_stdc_bit_* "builtins" the
diagnostics doesn't mention the name of the builtin the user used, but
instead __builtin_{clz,ctz,popcount}g instead (which is what the FE
immediately lowers it to).

The following patch repeats the checks from check_builtin_function_arguments
which are there done on BUILT_IN_{CLZ,CTZ,POPCOUNT}G, such that they
diagnose it with the name of the "builtin" user actually used before it
is gone.

2024-02-26  Jakub Jelinek  <jakub@redhat.com>

	PR c/114042
	* c-parser.cc (c_parser_postfix_expression): Diagnose
	__builtin_stdc_bit_* argument with ENUMERAL_TYPE or BOOLEAN_TYPE
	type or if signed here rather than on the replacement builtins
	in check_builtin_function_arguments.

	* gcc.dg/builtin-stdc-bit-2.c: Adjust testcase for actual builtin
	names rather than names of builtin replacements.
2024-02-26 16:30:16 +01:00
Joseph Myers
10c73c1116 Update gcc sv.po, zh_CN.po
* sv.po, zh_CN.po: Update.
2024-02-26 15:20:19 +00:00
Richard Biener
fb68e2cac1 tree-optimization/114099 - virtual LC PHIs and early exit vect
In some cases exits can lack LC PHI nodes for the virtual operand.
We have to create them when the epilog loop requires them which also
allows us to remove some only halfway correct fixups.  This is the
variant triggering for alternate exits.

	PR tree-optimization/114099
	* tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg):
	Create and fill in a needed virtual LC PHI for the alternate
	exits.  Remove code dealing with that missing.

	* gcc.dg/vect/vect-early-break_120-pr114099.c: New testcase.
2024-02-26 15:20:54 +01:00
Richard Biener
8293df8019 tree-optimization/114068 - missed virtual LC PHI after vect peeling
When we choose the IV exit to be one leading to no virtual use we
fail to have a virtual LC PHI even though we need it for the epilog
entry.  The following makes sure to create it so that later updating
works.

	PR tree-optimization/114068
	* tree-vect-loop-manip.cc (get_live_virtual_operand_on_edge):
	New function.
	(slpeel_tree_duplicate_loop_to_edge_cfg): Add a virtual LC PHI
	on the main exit if needed.  Remove band-aid for the case
	it was missing.

	* gcc.dg/vect/vect-early-break_118-pr114068.c: New testcase.
	* gcc.dg/vect/vect-early-break_119-pr114068.c: Likewise.
2024-02-26 15:20:54 +01:00
Juergen Christ
146f16c97f Add myself to write after approval and DCO.
ChangeLog:

	* MAINTAINERS: Add myself to write after approval and DCO.

Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
2024-02-26 14:50:08 +01:00
Eric Botcazou
39c07c5a3b Finalization of object allocated by anonymous access designating local type
The finalization of objects dynamically allocated through an anonymous
access type is deferred to the enclosing library unit in the current
implementation and a warning is given on each of them.

However this cannot be done if the designated type is local, because this
would generate dangling references to the local finalization routine, so
the finalization needs to be dropped in this case and the warning adjusted.

gcc/ada/
	PR ada/113893
	* exp_ch7.adb (Build_Anonymous_Master): Do not build the master
	for a local designated type.
	* exp_util.adb (Build_Allocate_Deallocate_Proc): Force Needs_Fin
	to false if no finalization master is attached to an access type
	and assert that it is anonymous in this case.
	* sem_res.adb (Resolve_Allocator): Mention that the object might
	not be finalized at all in the warning given when the type is an
	anonymous access-to-controlled type.

gcc/testsuite/
	* gnat.dg/access10.adb: New test.
2024-02-26 13:19:53 +01:00
H.J. Lu
bb98f71bac x86: Check interrupt instead of noreturn attribute
ix86_set_func_type checks noreturn attribute to avoid incompatible
attribute error in LTO1 on interrupt functions.  Since TREE_THIS_VOLATILE
is set also for _Noreturn without noreturn attribute, check interrupt
attribute for interrupt functions instead.

gcc/

	PR target/114097
	* config/i386/i386-options.cc (ix86_set_func_type): Check
	interrupt instead of noreturn attribute.

gcc/testsuite/

	PR target/114097
	* gcc.target/i386/pr114097-1.c: New test.
2024-02-26 02:31:06 -08:00
Jakub Jelinek
f12697f329 i386: Enable _BitInt support on ia32
Given the https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113837#c9
comment, the following patch just attempts to implement what I think
is best for ia32.

Compared to https://gitlab.com/x86-psABIs/i386-ABI/-/issues/5 ,
like that patch for _BitInt(64) or smaller it uses the smallest containing
{,un}signed {char,short,int,long long} for passing/returning and
layout of variables including in structures for alignment/size, with any
extra bits unspecified.
Unlike the above proposal, for larger _BitInt (i.e. _BitInt(65)+), it uses
passing/returning/layout/alignment of structure containing minimum needed
number of 32-bit limbs, again with the extra bits unspecified.
This is because most operations (except copy or bitwise ops) on _BitInts
aren't really vectorizable and will be under the hood implemented in loops
over 32-bit limbs anyway (using 64-bit limbs under the hood would mean
often using library implementation for the basic operations) and because
ia32 doesn't align even long long/double in structures to 64-bit I think
it is better to just use 32-bit alignment for that.  And I don't see
a reason to waste 32-bit bits say for _BitInt(224) or _BitInt(288) on ia32.

So, effectively it is like the x86-64 _BitInt ABI with everything divided by
2, the only exception is that in x86-64 psABI _BitInt(128) is said to be
already a structure of 2 limbs, which happens to be passed mostly the same
as __int128 (except for alignment).

2024-02-26  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/i386.cc (ix86_bitint_type_info): Add support for
	!TARGET_64BIT.
2024-02-26 11:12:39 +01:00
Rainer Orth
a25d7d1385 testsuite: xfail gcc.c-torture/compile/pr61159.c on Solaris/x86 with as [PR61159]
gcc.c-torture/compile/pr61159.c currently FAILs on 32 and 64-bit
Solaris/x86 with the native assembler:

FAIL: gcc.c-torture/compile/pr61159.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr61159.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr61159.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr61159.c   -O2 -flto  (test for excess errors)
FAIL: gcc.c-torture/compile/pr61159.c   -O2 -flto -flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr61159.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr61159.c   -Os  (test for excess errors)

Excess errors:
Assembler: pr61159.c
        "/var/tmp//ccRtFPva.s", line 5 : Cannot set a weak symbol to a common symbol

This is a bug/limitation in the native assembler.  Given that this
hasn't seen fixes for a long time, this patch xfails the test.

Tested on i386-pc-solaris2.11 (as and gas) and x86_64-pc-linux-gnu.

2024-02-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:
	PR ipa/61159
	* gcc.c-torture/compile/pr61159.c: xfail on Solaris/x86 with as.
2024-02-26 10:42:04 +01:00
Jakub Jelinek
24aa051af7 match.pd: Guard 2 simplifications on integral TYPE_OVERFLOW_UNDEFINED [PR114090]
These 2 patterns are incorrect on floating point, or for -fwrapv, or
for -ftrapv, or the first one for unsigned types (the second one is
mathematically correct, but we ought to just fold that to 0 instead).

So, the following patch properly guards this.

I think we don't need && !TYPE_OVERFLOW_SANITIZED (type) because
in both simplifications there would be UB before and after on
signed integer minimum.

2024-02-26  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/114090
	* match.pd ((x >= 0 ? x : 0) + (x <= 0 ? -x : 0) -> abs x):
	Restrict pattern to ANY_INTEGRAL_TYPE_P and TYPE_OVERFLOW_UNDEFINED
	types.
	((x <= 0 ? -x : 0) -> max(-x, 0)): Likewise.

	* gcc.dg/pr114090.c: New test.
2024-02-26 10:09:21 +01:00
Jakub Jelinek
f9d2a95be5 fold-const: Avoid infinite recursion in +-*&|^minmax reassociation [PR114084]
In the following testcase we infinitely recurse during BIT_IOR_EXPR
reassociation.
One operand is (unsigned _BitInt(31)) a << 4 and another operand
2147483647 >> 1 | 80 where both the right shift and the | 80
trees have TREE_CONSTANT set, but weren't folded because of delayed
folding, where some foldings are apparently done even in that case
unfortunately.
Now, the fold_binary_loc reassocation code splits both operands into
variable part, minus variable part, constant part, minus constant part,
literal part and minus literal parts, to prevent infinite recursion
punts if there are just 2 parts altogether from the 2 operands and then goes
on with reassociation, merges first the corresponding parts from both
operands and then some further merges.
The problem with the above expressions is that we get 3 different objects,
var0 (the left shift), con1 (the right shift) and lit1 (80), so the infinite
recursion prevention doesn't trigger, and we eventually merge con1 with
lit1, which effectively reconstructs the original op1 and then associate
that with var0 which is original op0, and associate_trees for that case
calls fold_binary.  There are some casts involved there too (the T typedef
type and the underlying _BitInt type which are stripped with STRIP_NOPS).

The following patch attempts to prevent this infinite recursion by tracking
the origin (if certain var comes from nothing - 0, op0 - 1, op1 - 2 or both - 3)
and propagates it through all the associate_tree calls which merge the vars.
If near the end we'd try to merge what comes solely from op0 with what comes
solely from op1 (or vice versa), the patch punts, because then it isn't any
kind of reassociation between the two operands, if anything it should be
handled when folding the suboperands.

2024-02-26  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/114084
	* fold-const.cc (fold_binary_loc): Avoid the final associate_trees
	if all subtrees of var0 come from one of the op0 or op1 operands
	and all subtrees of con0 come from the other one.  Don't clear
	variables which are never used afterwards.

	* gcc.dg/bitint-94.c: New test.
2024-02-26 10:09:21 +01:00
Richard Biener
af66ad89e8 middle-end/114070 - folding breaking VEC_COND expansion
The following properly guards the simplifications that move
operations into VEC_CONDs, in particular when that changes the
type constraints on this operation.

This needed a genmatch fix which was recording spurious implicit fors
when tcc_comparison is used in a C expression.

	PR middle-end/114070
	* genmatch.cc (parser::parse_c_expr): Do not record operand
	lists but only mark operators used.
	* match.pd ((c ? a : b) op (c ? d : e)  -->  c ? (a op d) : (b op e)):
	Properly guard the case of tcc_comparison changing the VEC_COND
	value operand type.

	* gcc.dg/torture/pr114070.c: New testcase.
2024-02-26 08:42:44 +01:00
Jakub Jelinek
6987f16742 i386: Fix up x86_function_profiler -masm=intel support [PR114094]
In my r14-8214 changes I apparently forgot one \n at the end of an instruction.
The corresponding AT&T line looks like:
"1:\tcall\t*%s@GOTPCREL(%%rip)\n"
but the Intel variant was
"1:\tcall\t[QWORD PTR %s@GOTPCREL[rip]]"

Fixed thusly.

2024-02-26  Jakub Jelinek  <jakub@redhat.com>

	PR target/114094
	* config/i386/i386.cc (x86_function_profiler): Add missing new-line
	to printed instruction.

	* gcc.target/i386/pr114094.c: New test.
2024-02-26 07:30:05 +01:00
H.J. Lu
4972f97a26 x86: Properly implement AMX-TILE load/store intrinsics
ldtilecfg and sttilecfg take a 512-byte memory block.  With
_tile_loadconfig implemented as

extern __inline void
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_tile_loadconfig (const void *__config)
{
  __asm__ volatile ("ldtilecfg\t%X0" :: "m" (*((const void **)__config)));
}

GCC sees:

(parallel [
  (asm_operands/v ("ldtilecfg	%X0") ("") 0
   [(mem/f/c:DI (plus:DI (reg/f:DI 77 virtual-stack-vars)
                         (const_int -64 [0xffffffffffffffc0])) [1 MEM[(const void * *)&tile_data]+0 S8 A128])]
   [(asm_input:DI ("m"))]
   (clobber (reg:CC 17 flags))])

and the memory operand size is 1 byte.  As the result, the rest of 511
bytes is ignored by GCC.  Implement ldtilecfg and sttilecfg intrinsics
with a pointer to XImode to honor the 512-byte memory block.

gcc/ChangeLog:

	PR target/114098
	* config/i386/amxtileintrin.h (_tile_loadconfig): Use
	__builtin_ia32_ldtilecfg.
	(_tile_storeconfig): Use __builtin_ia32_sttilecfg.
	* config/i386/i386-builtin.def (BDESC): Add
	__builtin_ia32_ldtilecfg and __builtin_ia32_sttilecfg.
	* config/i386/i386-expand.cc (ix86_expand_builtin): Handle
	IX86_BUILTIN_LDTILECFG and IX86_BUILTIN_STTILECFG.
	* config/i386/i386.md (ldtilecfg): New pattern.
	(sttilecfg): Likewise.

gcc/testsuite/ChangeLog:

	PR target/114098
	* gcc.target/i386/amxtile-4.c: New test.
2024-02-25 20:25:19 -08:00
GCC Administrator
ad178a2be7 Daily bump. 2024-02-26 00:16:54 +00:00
Iain Buclaw
94687d17ba Merge dmd, druntime ceff48bf7d, phobos dcbfbd43a
D front-end changes:

	-   Import latest fixes from dmd v2.107.1-rc.1.

D runtime changes:

	-   Import latest fixes from druntime v2.107.1-rc.1.

Phobos changes:

	-   Import latest fixes from phobos v2.107.1-rc.1.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd ceff48bf7d.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime ceff48bf7d.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_FREEBSD): Add
	core/sys/freebsd/net/if_.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos dcbfbd43a.
2024-02-26 00:06:22 +01:00
Jerry DeLisle
3f58f96a4e libgfortran: Propagate user defined iostat and iomsg.
PR libfortran/105456

libgfortran/ChangeLog:

	* io/list_read.c (list_formatted_read_scalar): Add checks
	for the case where a user defines their own error codes
	and error messages and generate the runtime error.
	* io/transfer.c (st_read_done): Whitespace.

gcc/testsuite/ChangeLog:

	* gfortran.dg/pr105456.f90: New test.
2024-02-25 14:53:52 -08:00
Gaius Mulley
d1b241b950 PR modula2/113749 m2 enabled build times out on i686-gnu-hurd
The bug fix changes the FIO module to use the target O_RDONLY,
O_WRONLY, SEEK_SET and SEEK_END (now available from the module wrapc).
Also rebuilt are the bootstrap tools mc and pge as they have their
own wrapc and C translations of FIO.

gcc/m2/ChangeLog:

	PR modula2/113749
	* Make-lang.in (BUILD-PGE-O): Add m2/pge-boot/Gwrapc.o.
	* gm2-libs-ch/wrapc.c (wrapc_SeekSet): New function.
	(wrapc_SeekEnd): Ditto.
	(wrapc_ReadOnly): Ditto.
	(wrapc_WriteOnly): Ditto.
	* gm2-libs/FIO.mod (SEEK_SET): Remove.
	(SEEK_END): Remove.
	(UNIXREADONLY): Remove.
	(UNIXWRITEONLY): Remove.
	(ConnectToUnix): Replace UNIXWRITEONLY with a call to WriteOnly.
	Replace UNIXREADONLY with a call to ReadOnly.
	(SetPositionFromBeginning): Replace SEEK_SET with a call to
	SeekSet.
	(SetPositionFromEnd): Replace SEEK_END with a call to
	SeekEnd.
	* gm2-libs/wrapc.def (SeekSet): New procedure function.
	(SeekEnd): New procedure function.
	(ReadOnly): New procedure function.
	(WriteOnly): New procedure function.
	* mc-boot-ch/Glibc.c (BUILD_MC_LIBC_TRACE): Undef.
	(check_init): New function.
	(tracedb): Ditto.
	(tracedb_open): Ditto.
	(tracedb_result): Ditto.
	(libc_read): Ditto.
	(libc_write): Ditto.
	(libc_close): Ditto.
	(libc_creat): Ditto.
	(libc_open): Ditto.
	(libc_lseek): Ditto.
	* mc-boot-ch/Gwrapc.c (wrapc_SeekSet): New function.
	(wrapc_SeekEnd): Ditto.
	(wrapc_ReadOnly): Ditto.
	(wrapc_WriteOnly): Ditto.
	* mc-boot/GDynamicStrings.cc: Rebuilt.
	* mc-boot/GFIO.cc: Ditto.
	* mc-boot/GIndexing.cc: Ditto.
	* mc-boot/GM2Dependent.cc: Ditto.
	* mc-boot/GM2EXCEPTION.cc: Ditto.
	* mc-boot/GPushBackInput.cc: Ditto.
	* mc-boot/GRTExceptions.cc: Ditto.
	* mc-boot/GRTint.cc: Ditto.
	* mc-boot/GSArgs.cc: Ditto.
	* mc-boot/GStdIO.cc: Ditto.
	* mc-boot/GStringConvert.cc: Ditto.
	* mc-boot/GSysStorage.cc: Ditto.
	* mc-boot/Gdecl.cc: Ditto.
	* mc-boot/Gkeyc.cc: Ditto.
	* mc-boot/Glibc.h: Ditto.
	* mc-boot/GmcComment.cc: Ditto.
	* mc-boot/GmcComp.cc: Ditto.
	* mc-boot/GmcDebug.cc: Ditto.
	* mc-boot/GmcMetaError.cc: Ditto.
	* mc-boot/GmcStack.cc: Ditto.
	* mc-boot/GmcStream.cc: Ditto.
	* mc-boot/GnameKey.cc: Ditto.
	* mc-boot/GsymbolKey.cc: Ditto.
	* mc-boot/Gvarargs.cc: Ditto.
	* mc-boot/Gwrapc.h: Ditto.
	* mc/decl.mod (getSymName): Add pointerref clause.
	* mc/mcStream.mod (copy): Check for an error after every read.
	* mc/varargs.mod (copy): Rewrite pointer arithmetic using INC to
	avoid type incompatibility.
	* pge-boot/GDynamicStrings.cc: Rebuilt.
	* pge-boot/GDynamicStrings.h: Ditto.
	* pge-boot/GFIO.cc: Ditto.
	* pge-boot/GFIO.h: Ditto.
	* pge-boot/GIO.cc: Ditto.
	* pge-boot/GIndexing.cc: Ditto.
	* pge-boot/GM2Dependent.cc: Ditto.
	* pge-boot/GM2EXCEPTION.cc: Ditto.
	* pge-boot/GNameKey.cc: Ditto.
	* pge-boot/GPushBackInput.cc: Ditto.
	* pge-boot/GRTExceptions.cc: Ditto.
	* pge-boot/GStdIO.cc: Ditto.
	* pge-boot/GSymbolKey.cc: Ditto.
	* pge-boot/GSysStorage.cc: Ditto.
	* pge-boot/Glibc.h: Ditto.
	* pge-boot/Gwrapc.cc: Ditto.
	* pge-boot/Gwrapc.h: Ditto.

libgm2/ChangeLog:

	PR modula2/113749
	* libm2pim/wrapc.cc: Include fcntl.h.
	(SeekSet): New function.
	(SeekEnd): Ditto.
	(ReadOnly): Ditto.
	(WriteOnly): Ditto.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2024-02-25 11:08:37 +00:00
GCC Administrator
5c45dc1b97 Daily bump. 2024-02-25 00:17:06 +00:00
Richard Sandiford
0394ae31e8 vect: Tighten check for impossible SLP layouts [PR113205]
During its forward pass, the SLP layout code tries to calculate
the cost of a layout change on an incoming edge.  This is taken
as the minimum of two costs: one in which the source partition
keeps its current layout (chosen earlier during the pass) and
one in which the source partition switches to the new layout.
The latter can sometimes be arranged by the backward pass.

If only one of the costs is valid, the other cost was ignored.
But the PR shows that this is not safe.  If the source partition
has layout 0 (the normal layout), we have to be prepared to handle
the case in which that ends up being the only valid layout.

Other code already accounts for this restriction, e.g. see
the code starting with:

    /* Reject the layout if it would make layout 0 impossible
       for later partitions.  This amounts to testing that the
       target supports reversing the layout change on edges
       to later partitions.

gcc/
	PR tree-optimization/113205
	* tree-vect-slp.cc (vect_optimize_slp_pass::forward_cost): Reject
	the proposed layout if it does not allow a source partition with
	layout 2 to keep that layout.

gcc/testsuite/
	PR tree-optimization/113205
	* gcc.dg/torture/pr113205.c: New test.
2024-02-24 11:58:22 +00:00
Jakub Jelinek
d8b74d0b1c Use HOST_WIDE_INT_{C,UC,0,0U,1,1U} macros some more
I've searched for some uses of (HOST_WIDE_INT) constant or (unsigned
HOST_WIDE_INT) constant and turned them into uses of the appropriate
macros.
THere are quite a few cases in non-i386 backends but I've left that out
for now.
The only behavior change is in build_replicated_int_cst where the
left shift was done in HOST_WIDE_INT type but assigned to unsigned
HOST_WIDE_INT, which I've changed into unsigned HOST_WIDE_INT shift.

2024-02-24  Jakub Jelinek  <jakub@redhat.com>

gcc/
	* builtins.cc (fold_builtin_isascii): Use HOST_WIDE_INT_UC macro.
	* combine.cc (make_field_assignment): Use HOST_WIDE_INT_1U macro.
	* double-int.cc (double_int::mask): Use HOST_WIDE_INT_UC macros.
	* genattrtab.cc (attr_alt_complement): Use HOST_WIDE_INT_1 macro.
	(mk_attr_alt): Use HOST_WIDE_INT_0 macro.
	* genautomata.cc (bitmap_set_bit, CLEAR_BIT): Use HOST_WIDE_INT_1
	macros.
	* ipa-strub.cc (can_strub_internally_p): Use HOST_WIDE_INT_1 macro.
	* loop-iv.cc (implies_p): Use HOST_WIDE_INT_1U macro.
	* pretty-print.cc (test_pp_format): Use HOST_WIDE_INT_C and
	HOST_WIDE_INT_UC macros.
	* rtlanal.cc (nonzero_bits1): Use HOST_WIDE_INT_UC macro.
	* tree.cc (build_replicated_int_cst): Use HOST_WIDE_INT_1U macro.
	* tree.h (DECL_OFFSET_ALIGN): Use HOST_WIDE_INT_1U macro.
	* tree-ssa-structalias.cc (dump_varinfo): Use ~HOST_WIDE_INT_0U
	macros.
	* wide-int.cc (divmod_internal_2): Use HOST_WIDE_INT_1U macro.
	* config/i386/constraints.md (define_constraint "L"): Use
	HOST_WIDE_INT_C macro.
	* config/i386/i386.md (movabsq split peephole2): Use HOST_WIDE_INT_C
	macro.
	(movl + movb peephole2): Likewise.
	* config/i386/predicates.md (x86_64_zext_immediate_operand): Likewise.
	(const_32bit_mask): Likewise.
gcc/objc/
	* objc-encoding.cc (encode_array): Use HOST_WIDE_INT_0 macros.
2024-02-24 12:45:40 +01:00
Jakub Jelinek
5e7a176e88 bitint: Handle VIEW_CONVERT_EXPRs between large/huge BITINT_TYPEs and VECTOR/COMPLEX_TYPE etc. [PR114073]
The following patch implements support for VIEW_CONVERT_EXPRs from/to
large/huge _BitInt to/from vector or complex types or anything else but
integral/pointer types which doesn't need to live in memory.

2024-02-24  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/114073
	* gimple-lower-bitint.cc (bitint_large_huge::lower_stmt): Handle
	VIEW_CONVERT_EXPRs between large/huge _BitInt and non-integer/pointer
	types like vector or complex types.
	(gimple_lower_bitint): Don't merge VIEW_CONVERT_EXPRs to non-integral
	types.  Fix up VIEW_CONVERT_EXPR handling.  Allow merging
	VIEW_CONVERT_EXPR from non-integral/pointer types with a store.

	* gcc.dg/bitint-93.c: New test.
2024-02-24 12:44:34 +01:00
Richard Sandiford
2541c9d910 Restrict gcc.dg/rtl/aarch64/pr113295-1.c to aarch64
I keep forgetting that gcc.dg/rtl is the one testsuite where
tests in target-specific subdirectories aren't automatically
restricted to that target.

gcc/testsuite/
	* gcc.dg/rtl/aarch64/pr113295-1.c: Restrict to aarc64*-*-*.
2024-02-24 10:10:36 +00:00
GCC Administrator
4d9da4199d Daily bump. 2024-02-24 00:17:42 +00:00
Steve Kargl
80d126ba99 Fortran: ALLOCATE statement, SOURCE/MOLD expressions with subrefs [PR114024]
PR fortran/114024

gcc/fortran/ChangeLog:

	* trans-stmt.cc (gfc_trans_allocate): When a source expression has
	substring references, part-refs, or %re/%im inquiries, wrap the
	entity in parentheses to force evaluation of the expression.

gcc/testsuite/ChangeLog:

	* gfortran.dg/allocate_with_source_27.f90: New test.
	* gfortran.dg/allocate_with_source_28.f90: New test.

Co-Authored-By: Harald Anlauf <anlauf@gmx.de>
2024-02-23 22:34:54 +01:00
Robin Dapp
85c12ae8b8 RISC-V: Fix vec_init for simple sequences [PR114028].
For a vec_init (_a, _a, _a, _a) with _a of mode DImode we try to
construct a "superword" of two "_a"s.  This only works for modes < Pmode
when we can "shift and or" both halves into one Pmode register.
This patch disallows the optimization for inner_mode == Pmode and emits
a simple broadcast in such a case.

gcc/ChangeLog:

	PR target/114028

	* config/riscv/riscv-v.cc (rvv_builder::can_duplicate_repeating_sequence_p):
	Return false if inner mode is already Pmode.
	(rvv_builder::is_all_same_sequence): New function.
	(expand_vec_init): Emit broadcast if sequence is all same.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/autovec/pr114028.c: New test.
2024-02-23 21:29:02 +01:00
Jakub Jelinek
fdf9df9d55 c++: Fix ICE due to folding a call to constructor on cdtor_returns_this arches (aka arm32) [PR113083]
When targetm.cxx.cdtor_returns_this () (aka on arm32 TARGET_AAPCS_BASED)
constructor is supposed to return this pointer, but when we cp_fold such
a call, we don't take that into account and just INIT_EXPR the object,
so we can later ICE during gimplification, because the expression doesn't
have the right type.

2024-02-23  Jakub Jelinek  <jakub@redhat.com>

	PR c++/113083
	* cp-gimplify.cc (cp_fold): For targetm.cxx.cdtor_returns_this ()
	wrap r into a COMPOUND_EXPR and return folded CALL_EXPR_ARG (x, 0).

	* g++.dg/cpp0x/constexpr-113083.C: New test.
2024-02-23 18:55:12 +01:00
Richard Sandiford
ff442719cd aarch64: Spread out FPR usage between RA regions [PR113613]
early-ra already had code to do regrename-style "broadening"
of the allocation, to promote scheduling freedom.  However,
the pass divides the function into allocation regions
and this broadening only worked within a single region.
This meant that if a basic block contained one subblock
of FPR use, followed by a point at which no FPRs were live,
followed by another subblock of FPR use, the two subblocks
would tend to reuse the same registers.  This in turn meant
that it wasn't possible to form LDP/STP pairs between them.

The failure to form LDPs and STPs in the testcase was a
regression from GCC 13.

The patch adds a simple heuristic to prefer less recently
used registers in the event of a tie.

gcc/
	PR target/113613
	* config/aarch64/aarch64-early-ra.cc
	(early_ra::m_current_region): New member variable.
	(early_ra::m_fpr_recency): Likewise.
	(early_ra::start_new_region): Bump m_current_region.
	(early_ra::allocate_colors): Prefer less recently used registers
	in the event of a tie.  Add a comment to explain why we prefer(ed)
	higher-numbered registers.
	(early_ra::find_oldest_color): Prefer less recently used registers
	here too.
	(early_ra::finalize_allocation): Update recency information for
	allocated registers.
	(early_ra::process_blocks): Initialize m_current_region and
	m_fpr_recency.

gcc/testsuite/
	PR target/113613
	* gcc.target/aarch64/pr113613.c: New test.
2024-02-23 14:12:55 +00:00
Richard Sandiford
9f105cfdc1 aarch64: Tighten early-ra chain test for wide registers [PR113295]
Most code in early-ra used is_chain_candidate to check whether we
should chain two allocnos.  This included both tests that matter
for correctness and tests for certain heuristics.

Once that test passes for one pair of allocnos, we test whether
it's safe to chain the containing groups (which might contain
multiple allocnos for x2, x3 and x4 modes).  This test used an
inline test for correctness only, deliberately skipping the
heuristics.  However, this instance of the test was missing
some handling of equivalent allocnos.

This patch fixes things by making is_chain_candidate take a
strictness parameter: correctness only, or correctness + heuristics.
It then makes the group-chaining test use the correctness version
rather than trying to replicate it inline.

gcc/
	PR target/113295
	* config/aarch64/aarch64-early-ra.cc
	(early_ra::test_strictness): New enum.
	(early_ra::is_chain_candidate): Add a strictness parameter to
	control whether only correctness matters, or whether both correctness
	and heuristics should be used.  Handle multiple levels of equivalence.
	(early_ra::find_related_start): Update call accordingly.
	(early_ra::strided_polarity_pref): Likewise.
	(early_ra::form_chains): Likewise.
	(early_ra::try_to_chain_allocnos): Use is_chain_candidate in
	correctness mode rather than trying to inline the test.

gcc/testsuite/
	PR target/113295
	* gcc.target/aarch64/pr113295-2.c: New test.
2024-02-23 14:12:55 +00:00
Richard Sandiford
8a16e06da9 aarch64: Add missing early-ra bookkeeping [PR113295]
416.gamess showed up two wrong-code bugs in early-ra.  This patch
fixes the first of them.  It was difficult to reduce the source code
to something that would meaningfully show the situation, so the
testcase uses a direct RTL sequence instead.

In the sequence:

(a) register <2> is set more than once
(b) register <2> is copied to a temporary (<4>)
(c) register <2> is the destination of an FCSEL between <4> and
    another value (<5>)
(d) <4> and <2> are equivalent for <4>'s live range
(e) <5>'s and <2>'s live ranges do not intersect, and there is
    a pseudo-copy between <5> and <2>

On its own, (d) implies that <4> can be treated as equivalent to <2>.
And on its own, (e) implies that <5> can share <2>'s register.  But
<4>'s and <5>'s live ranges conflict, meaning that they cannot both
share the register together.  A bit of missing bookkeeping meant that
the mechanism for detecting this didn't fire.  We therefore ended up
with an FCSEL in which both inputs were the same register.

gcc/
	PR target/113295
	* config/aarch64/aarch64-early-ra.cc
	(early_ra::find_related_start): Account for definitions by shared
	registers when testing for a single register definition.
	(early_ra::accumulate_defs): New function.
	(early_ra::record_copy): If A shares B's register, fold A's
	definition information into B's.  Fold A's use information into B's.

gcc/testsuite/
	PR target/113295
	* gcc.dg/rtl/aarch64/pr113295-1.c: New test.
2024-02-23 14:12:54 +00:00
H.J. Lu
7f2cf0c45f x86-64: Check R_X86_64_CODE_6_GOTTPOFF support
If assembler and linker supports

add %reg1, name@gottpoff(%rip), %reg2

with R_X86_64_CODE_6_GOTTPOFF, we can generate it instead of

mov name@gottpoff(%rip), %reg2
add %reg1, %reg2

gcc/

	* configure.ac (HAVE_AS_R_X86_64_CODE_6_GOTTPOFF): Defined as 1
	if R_X86_64_CODE_6_GOTTPOFF is supported.
	* config.in: Regenerated.
	* configure: Likewise.
	* config/i386/predicates.md (apx_ndd_add_memory_operand): Allow
	UNSPEC_GOTNTPOFF if R_X86_64_CODE_6_GOTTPOFF is supported.

gcc/testsuite/

	* gcc.target/i386/apx-ndd-tls-1b.c: New test.
	* lib/target-supports.exp
	(check_effective_target_code_6_gottpoff_reloc): New.
2024-02-23 06:00:20 -08:00
Tobias Burnus
9266d9fce2 Fortran/Openmp: Use OPT_Wopenmp for gfc_match_omp_depobj warning
gcc/fortran/ChangeLog:

	* openmp.cc (gfc_match_omp_depobj): Use OPT_Wopenmp
	as warning category in gfc_warning.
2024-02-23 13:12:48 +01:00
Richard Earnshaw
016c4eed36 arm: fix ICE with vectorized reciprocal division [PR108120]
The expand pattern for reciprocal division was enabled for all math
optimization modes, but the patterns it was generating were not
enabled unless -funsafe-math-optimizations were enabled, this leads to
an ICE when the pattern we generate cannot be recognized.

Fixed by only enabling vector division when doing unsafe math.

gcc:

	PR target/108120
	* config/arm/neon.md (div<VCVTF:mode>3): Rename from div<mode>3.
	Gate with ARM_HAVE_NEON_<MODE>_ARITH.

gcc/testsuite:
	PR target/108120
	* gcc.target/arm/neon-recip-div-1.c: New file.
2024-02-23 11:39:28 +00:00
Jakub Jelinek
22121546e0 expr: Fix REDUCE_BIT_FIELD in multiplication expansion [PR114054]
The following testcase ICEs, because the REDUCE_BIT_FIELD macro uses
the target variable implicitly:
 #define REDUCE_BIT_FIELD(expr)  (reduce_bit_field                         \
                                  ? reduce_to_bit_field_precision ((expr), \
                                                                   target, \
                                                                   type)   \
                                  : (expr))
and so when the code below reuses the target variable, documented to be
   The value may be stored in TARGET if TARGET is nonzero.
   TARGET is just a suggestion; callers must assume that
   the rtx returned may not be the same as TARGET.
for something unrelated (the value that should be returned), this misbehaves
(in the testcase target is set to a CONST_INT, which has VOIDmode and
reduce_to_bit_field_precision assert checking doesn't like that).
Needed to say that
   If TARGET is CONST0_RTX, it means that the value will be ignored.
but in expand_expr_real_2 does at the start:
  ignore = (target == const0_rtx
            || ((CONVERT_EXPR_CODE_P (code)
                 || code == COND_EXPR || code == VIEW_CONVERT_EXPR)
                && TREE_CODE (type) == VOID_TYPE));

  /* We should be called only if we need the result.  */
  gcc_assert (!ignore);
- so such target is mainly meant for calls and the like in other routines.
Certainly doesn't expect that target changes from not being ignored
initially to ignore later on and other CONST_INT results as well as anything
which is not an object into which anything can be stored.

So, the following patch fixes that by using a more appripriate temporary
for the result, which other code is using.

2024-02-23  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/114054
	* expr.cc (expand_expr_real_2) <case MULT_EXPR>: Use
	temp variable instead of target parameter for result.

	* gcc.dg/bitint-92.c: New test.
2024-02-23 11:38:18 +01:00
Jakub Jelinek
be1f2bc452 bitintlower: Fix .{ADD,SUB}_OVERFLOW lowering [PR114040]
The following testcases show 2 bugs in the .{ADD,SUB}_OVERFLOW lowering,
both related to storing of the REALPART_EXPR part of the result.
On the first testcase prec is 255, prec_limbs is 4 and for the second limb
in the loop the store of the REALPART_EXPR of .USUBC (_30) is stored through:
  if (_27 <= 3)
    goto <bb 12>; [80.00%]
  else
    goto <bb 15>; [20.00%]

  <bb 12> [local count: 1073741824]:
  if (_27 < 3)
    goto <bb 14>; [80.00%]
  else
    goto <bb 13>; [20.00%]

  <bb 13> [local count: 1073741824]:
  bitint.3[_27] = _30;
  goto <bb 15>; [100.00%]

  <bb 14> [local count: 858993464]:
  MEM[(unsigned long *)&bitint.3 + 24B] = _30;

  <bb 15> [local count: 1073741824]:
The first check is right, as prec_limbs is 4, we don't want to store
bitint.3[4] or above at all, those limbs are just computed for the overflow
checking and nothing else, so _27 > 4 leads to no store.
But the other condition is exact opposite of what should be done, if
the current index of the second limb (_27) is < 3, then it should
  bitint.3[_27] = _30;
and if it is == 3, it should
  MEM[(unsigned long *)&bitint.3 + 24B] = _30;
and (especially important for the targets which would bitinfo.extended = 1)
should actually in this case zero extend it from the 63 bits to 64, that is
the handling of the partial limb.  The if_then_if_then_else helper if
there are 2 conditions sets m_gsi to be at the start of the
edge_true_false->dest bb, i.e. when the first condition is true and second
false, and that is where we store the SSA_NAME indexed limb store, so the
condition needs to be reversed.

The following patch does that and adds the cast as well, the usual
assumption that already handle_operand has the partial limb type doesn't
have to be true here, because the source operand could have much larger
precision than the REALPART_EXPR of the lhs.

2024-02-23  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/114040
	* gimple-lower-bitint.cc (bitint_large_huge::lower_addsub_overflow):
	Use EQ_EXPR rather than LT_EXPR for g2 condition and change its
	probability from likely to unlikely.  When handling the true true
	store, first cast to limb_access_type and then to l's type.

	* gcc.dg/torture/bitint-60.c: New test.
	* gcc.dg/torture/bitint-61.c: New test.
2024-02-23 11:36:15 +01:00
Xi Ruoyao
f09a9dd319
LoongArch: Don't falsely claim gold supported in toplevel configure
The gold linker has never been ported to LoongArch (and it seems
unlikely to be ported in the future as the new architectures are
focusing on lld and/or mold for fast linkers).

ChangeLog:

	* configure.ac (ENABLE_GOLD): Remove loongarch*-*-* from target
	list.
	* configure: Regenerate.
2024-02-23 18:13:25 +08:00
Richard Biener
bff1cbf2f6 Add ia64*-*-* to the list of obsolete targets
The following deprecates ia64*-*-* for GCC 14.  Since we plan to
force LRA for GCC 15 and the target only has slim chances of getting
updated this notifies people in advance.  Given both Linux and
glibc have axed the target further development is also made difficult.
There is no listed maintainer for ia64 either.

	PR target/90785
gcc/
	* config.gcc: Add ia64*-*-* to the list of obsoleted targets.

contrib/
	* config-list.mk (LIST): --enable-obsolete for ia64*-*-*.
2024-02-23 10:45:31 +01:00
Rainer Orth
818094a07a testsuite: vect: Actually skip gcc.dg/vect/vect-bic-bitmask-12.c etc. on SPARC
gcc.dg/vect/vect-bic-bitmask-12.c and gcc.dg/vect/vect-bic-bitmask-23.c
currently FAIL on 32 and 64-bit Solaris/SPARC

FAIL: gcc.dg/vect/vect-bic-bitmask-12.c -flto -ffat-lto-objects  scan-tree-dump dce7 "<=\\\\s*.+{ 255,.+}"
FAIL: gcc.dg/vect/vect-bic-bitmask-12.c scan-tree-dump dce7 "<=\\\\s*.+{ 255,.+}"
FAIL: gcc.dg/vect/vect-bic-bitmask-23.c -flto -ffat-lto-objects  scan-tree-dump dce7 "<=\\\\s*.+{ 255, 15, 1, 65535 }"
FAIL: gcc.dg/vect/vect-bic-bitmask-23.c scan-tree-dump dce7 "<=\\\\s*.+{ 255, 15, 1, 65535 }"

although they should be skipped since

commit 5f07095d22
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Tue Mar 8 11:32:59 2022 +0000

    vect: disable bitmask tests on sparc

The problem is that dg-skip-if must come after dg-do, although this
isn't currently documented unfortunately.

Fixed by reordering the directives.

Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11.

2024-02-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:
	* gcc.dg/vect/vect-bic-bitmask-12.c: Move dg-skip-if down.
	* gcc.dg/vect/vect-bic-bitmask-23.c: Likewise.
2024-02-23 10:14:31 +01:00
Rainer Orth
6837c45037 testsuite: plugin: Fix gcc.dg/plugin/crash-test-write-though-null-sarif.c on Solaris
gcc.dg/plugin/crash-test-write-though-null-sarif.c FAILs on Solaris:

FAIL: gcc.dg/plugin/crash-test-write-though-null-sarif.c -fplugin=./crash_test_plugin.so  scan-sarif-file "text": "Segmentation fault

Comparing the sarif files between Linux and Solaris reveals

-                                                            "message": {"text": "Segmentation fault"},
+                                                            "message": {"text": "Segmentation Fault"},

This patch allows for both forms.

Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and
x86_64-pc-linux-gnu.

2024-02-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:
	* gcc.dg/plugin/crash-test-write-though-null-sarif.c
	(scan-sarif-file): Allow for "Segmentation Fault", too.
2024-02-23 10:06:41 +01:00
Monk Chiang
eb7a8f213d Add myself to write after approval
ChangeLog:

	* MAINTAINERS: Add myself.
2024-02-23 15:48:56 +08:00
Palmer Dabbelt
23f5da91cc RISC-V: Point our Python scripts at python3
This builds for me, and I frequently have python-is-python3 type
packages installed so I think I've been implicitly testing it for a
while.  Looks like Kito's tested similar configurations, and the
bugzilla indicates we should be moving over.

gcc/ChangeLog:

	PR other/109668
	* config/riscv/arch-canonicalize: Move to python3
	* config/riscv/multilib-generator: Likewise
2024-02-23 12:36:07 +08:00
Palmer Dabbelt
1c5da882bf doc: RISC-V: Document that -mcpu doesn't override -march or -mtune
This came up recently as Edwin was looking through the test suite.  A
few of us were talking about this during the patchwork meeting and were
surprised.  Looks like this is the desired behavior, so let's at least
document it.

gcc/ChangeLog:

	* doc/invoke.texi: Document -mcpu.

Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-02-23 12:26:47 +08:00