Commit Graph

227528 Commits

Author SHA1 Message Date
Xi Ruoyao
4898147482 Partially revert "LoongArch: Fix bug123807."
This reverts the loongarch.cc change of the commit
4df77a2542.

PR 123807 turns out to be a special case of the middle-end PR 124250.
The previous ad-hoc fix is unneeded now since the underlying middle-end
issue is fixed, so revert it but keep the test case.

gcc/

	PR target/123807
	PR middle-end/124250
	* config/loongarch/loongarch.cc
	(loongarch_expand_vector_init_same): Revert r16-7163 change.
2026-03-05 18:04:36 +08:00
Jakub Jelinek
ed29af4100 i386: Fix up last -masm=intel operand of vcvthf82ph [PR124349]
gas expects for this instruction
vcvthf82ph      xmm30, QWORD PTR [r9]
vcvthf82ph      ymm30, XMMWORD PTR [r9]
vcvthf82ph      zmm30, YMMWORD PTR [r9]
i.e. the memory size is half of the dest register size.
We currently emit it for the last 2 forms but emit XMMWORD PTR
for the first one too.  So, we need %q1 for V8HF and for V16HF/V32HF
can either use just %1 or %x1/%t1.  There is no define_mode_attr
that would provide those, so I've added one just for this insn.

2026-03-05  Jakub Jelinek  <jakub@redhat.com>

	PR target/124349
	* config/i386/sse.md (iptrssebvec_2): New define_mode_attr.
	(cvthf82ph<mode><mask_name>): Use it for -masm=intel input
	operand.

	* gcc.target/i386/avx10_2-pr124349-2.c: New test.
2026-03-05 10:05:44 +01:00
Jakub Jelinek
d828a370db i386: Fix up vpternlogq last operand of *andnot<mode>3 for -masm=intel [PR124367]
The immediate operand 0x44 in this insn was incorrectly emitted as
$0x44 even in -masm=intel syntax.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
approved by Uros in the PR, committed to trunk.

2026-03-05  Jakub Jelinek  <jakub@redhat.com>

	PR target/124367
	* config/i386/sse.md (*andnot<mode>3): Use 0x44 rather than $0x44
	for -masm=intel.

	* gcc.target/i386/avx512vl-pr124367.c: New test.
2026-03-05 09:39:36 +01:00
Jakub Jelinek
860da84158 i386: Fix operand order for @wrss<mode> and @wruss<mode> [PR124366]
These two insns were using the same operand order for both -masm=att
and -masm=intel, which is ok if using the same operand for both, but not
when they are different.

2026-03-05  Jakub Jelinek  <jakub@redhat.com>

	PR target/124366
	* config/i386/i386.md (@wrss<mode>, @wruss<mode>): Swap operand
	order for -masm=intel.

	* gcc.target/i386/cet-pr124366.c: New test.
2026-03-05 09:35:39 +01:00
Jakub Jelinek
f8152db386 c++: Fix up handling of unnamed types named by typedef for linkage purposes for -freflection [PR123810]
As mentioned on the PR, we ICE on the following testcase and if members_of
isn't called on a class with e.g. typedef struct { int d; } D;, we don't
handle it correctly, e.g. we say ^^C::D is not an type alias or for
members_of in a namespace that there aren't two entities, the struct itself
and the type alias for it.
This is because name_unnamed_type handles the naming of an unnamed type
through typedef for linkage purposes (where we originally have
a TYPE_DECL with IDENTIFIER_ANON_P DECL_NAME for the type) by replacing
all occurrences of TYPE_NAME on the type from the old TYPE_DECL to the new
TYPE_DECL with the user provided name.
The ICE for members_of (^^C, uctx) is then because we see two TYPE_DECLs
(one with IDENTIFIER_ANON_P, one with user name) with the same TREE_TYPE
and enter the same thing twice into what we want to return and ICE in the
comparison routine.  Anyway, for is_type_alias purposes, there is no
is_typedef_decl and can't be because the same TYPE_DECL is used as TYPE_NAME
of both the type proper and its alias.  Without reflection we didn't care
about the difference.

So, the following patch changes name_unnamed_type to do things differently,
but only for -freflection, because 1) I don't want to break stuff late in
stage4 2) without reflection we don't really need it and don't need to
pay the extra memory cost by having another type which is the type alias.
The change is that instead of
TYPE_DECL .anon_NN
  | TREE_TYPE
  v
type <----------+
  | TYPE_NAME   |
  v             |
TYPE_DECL D     |
  | TREE_TYPE   |
  +-------------+
where for class context both TYPE_DECLs are in TYPE_FIELDS and for
namespace context only the latter one is (as pushdecl ignores the
IDENTIFIER_ANON_P one) we have
TYPE_DECL D    TYPE_DECL D --- DECL_ORIGINAL_TYPE
  | TREE_TYPE    | TREE_TYPE      |
  v              v                |
type           variant_type       |
  ^-------------------------------+
which is except for the same DECL_NAME on both TYPE_DECLs exactly what
is used for typedef struct D_ { int d; } D;
Various spots have been testing for the typedef name for linkage purposes
cases and were using tests like:
OVERLOAD_TYPE_P (TREE_TYPE (value))
&& value == TYPE_NAME (TYPE_MAIN_VARIANT (TREE_TYPE (value)))
So that this can be tested, this patch introduces a new decl_flag on
the TYPE_DECLs and marks for -freflection both of these TYPE_DECLs
(and for -fno-reflection the one without IDENTIFIER_ANON_P name).
It is easy to differentiate between the two, the first one is also
DECL_IMPLICIT_TYPEDEF_P, the latter is not (and on the other side
has DECL_ORIGINAL_TYPE non-NULL).
For name lookup in namespaces, nothing special needs to be done,
because the originally IDENTIFIER_ANON_P TYPE_DECL wasn't added
to the bindings, at block scope I had to deal with it in pop_local_binding
because it was unhappy that it got renamed.  And finally for class
scopes, we need to arrange for the latter TYPE_DECL to be found, but
currently it is the second one.  The patch currently skips the first one for
name lookup in fields_linear_search and arranges for count_class_fields
and member_vec_append_class_fields to also ignore the first one.  Wonder if
the latter two shouldn't also ignore any other IDENTIFIER_ANON_P TYPE_FIELDS
chain decls, or do we ever perform name lookup for the anon identifiers?
Another option for fields_linear_search would be try to swap the order of
the two TYPE_DECLs in TYPE_FIELDS chain somewhere in grokfield.

Anyway, the changes result in minor emitted DWARF changes, say for
g++.dg/debug/dwarf2/typedef1.C without -freflection there is
        .uleb128 0x4    # (DIE (0x46) DW_TAG_enumeration_type)
        .long   .LASF6  # DW_AT_name: "typedef foo<1>::type type"
        .byte   0x7     # DW_AT_encoding
        .byte   0x4     # DW_AT_byte_size
        .long   0x70    # DW_AT_type
        .byte   0x1     # DW_AT_decl_file (typedef1.C)
        .byte   0x18    # DW_AT_decl_line
        .byte   0x12    # DW_AT_decl_column
        .long   .LASF7  # DW_AT_MIPS_linkage_name: "N3fooILj1EE4typeE"
...
and no typedef, while with -freflection there is
        .uleb128 0x3    # (DIE (0x3a) DW_TAG_enumeration_type)
        .long   .LASF5  # DW_AT_name: "type"
        .byte   0x7     # DW_AT_encoding
        .byte   0x4     # DW_AT_byte_size
        .long   0x6c    # DW_AT_type
        .byte   0x1     # DW_AT_decl_file (typedef1.C)
        .byte   0x18    # DW_AT_decl_line
        .byte   0x12    # DW_AT_decl_column
...
        .uleb128 0x5    # (DIE (0x57) DW_TAG_typedef)
        .long   .LASF5  # DW_AT_name: "type"
        .byte   0x1     # DW_AT_decl_file (typedef1.C)
        .byte   0x18    # DW_AT_decl_line
        .byte   0x1d    # DW_AT_decl_column
        .long   0x3a    # DW_AT_type
so, different DW_AT_name on the DW_TAG_enumeration_type, missing
DW_AT_MIPS_linkage_name and an extra DW_TAG_typedef.  While in theory
I could work harder to hide that detail, I actually think it is a good
thing to have it the latter way because it represents more exactly
what is going on.
Another slight change is different locations in some diagnostics
on g++.dg/lto/odr-3 test (location of the unnamed struct vs. locations
of the typedef name given to it without -freflection), and a module
issue which Nathan has some WIP patch for in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123810#c11

In any case, none of those differences show up in normal testsuite runs
currently (as those tests aren't compiled with -freflection), if/when
-freflection becomes the default for -std=c++26 we can deal with the
DWARF one as well as different locations in odr-3 and for modules I was
hoping it could be handled incrementally.  I'm not even sure what should
happen if one TU has struct D { int d; }; and another one has
typedef struct { int d; } D;, shall that be some kind of error?  Though
right now typedef struct { int d; } D; in both results in an error too
and that definitely needs to be handled.

2026-03-05  Jakub Jelinek  <jakub@redhat.com>

	PR c++/123810
	* cp-tree.h (TYPE_DECL_FOR_LINKAGE_PURPOSES_P): Define.
	(TYPE_DECL_WAS_UNNAMED): Likewise.
	(TYPE_WAS_UNNAMED): Also check TYPE_DECL_WAS_UNNAMED.
	* decl.cc (start_decl): Use TYPE_DECL_FOR_LINKAGE_PURPOSES_P.
	(maybe_diagnose_non_c_class_typedef_for_l): If t == type, use
	DECL_SOURCE_LOCATION (orig) instead of
	DECL_SOURCE_LOCATION (TYPE_NAME (t)).
	(name_unnamed_type): Set TYPE_DECL_FOR_LINKAGE_PURPOSES_P
	on decl.  For -freflection don't change TYPE_NAME from
	orig to decl, but instead change DECL_NAME (orig) to
	DECL_NAME (decl) and set TYPE_DECL_FOR_LINKAGE_PURPOSES_P on
	orig too.
	* decl2.cc (grokfield): Use TYPE_DECL_FOR_LINKAGE_PURPOSES_P.
	* name-lookup.cc (fields_linear_search): Ignore
	TYPE_DECL_WAS_UNNAMED decls.
	(count_class_fields): Likewise.
	(member_vec_append_class_fields): Likewise.
	(pop_local_binding): Likewise.
	* reflect.cc (namespace_members_of): For TYPE_DECL with
	TYPE_DECL_FOR_LINKAGE_PURPOSES_P set also append
	reflection of strip_typedefs (m).
	* class.cc (find_flexarrays): Handle TYPE_DECLs with
	TYPE_DECL_WAS_UNNAMED like the ones with IDENTIFIER_ANON_P
	name.

	* g++.dg/reflect/members_of10.C: New test.
	* g++.dg/cpp2a/typedef1.C: Expect one message on a different line.
2026-03-05 09:19:59 +01:00
GCC Administrator
d01f53d3cc Daily bump. 2026-03-05 00:16:29 +00:00
Marek Polacek
8db7ba7ffb c++/reflection: fix return value of meta::extent [PR124368]
std::meta::extent returns a size_t, but eval_extent returns either
size_zero_node or size_binop(), both of which are of type sizetype,
which is not the C/C++ size_t and so we don't pass the check in
cxx_eval_outermost_constant_expr:

  /* Check we are not trying to return the wrong type.  */
  if (!same_type_ignoring_top_level_qualifiers_p (type, TREE_TYPE (r)))

We should convert to size_type_node which represents the C/C++ size_t,
like for instance fold_sizeof_expr does.

	PR c++/124368

gcc/cp/ChangeLog:

	* reflect.cc (eval_extent): Convert the result to size_type_node.

gcc/testsuite/ChangeLog:

	* g++.dg/reflect/extent1.C: New test.

Reviewed-by: Jakub Jelinek <jakub@redhat.com>
2026-03-04 18:37:54 -05:00
Thiago Jung Bauermann
9f8989d556 testsuite: Remove xfail from g++.dg/ipa/devirt-23.C [PR60674]
As Andrew Pinski noted in PR60674:

  devirt-23.C started to pass with r16-101-g132d01d96ea9d6.

  So just need to update the testcase removing the xfail and close this
  bug as fixed.

  The reason why this was not fixed until r16-101-g132d01d96ea9d6 is
  because the call is from main which is known to be called once and was
  not a candidate for IPA-CP until then.

  In fact renaming the function from main to f (and adding a `return 0`
  so not invoking undefined behavior), the scan-ipa-dump works all the
  way back to GCC 5.

Tested on aarch64-linux-gnu and arm-linux-gnueabihf.

gcc/testsuite/ChangeLog:
	PR ipa/60674
	* g++.dg/ipa/devirt-23.C: Remove xfail.
2026-03-04 20:06:58 -03:00
Marek Polacek
b95955b885 c++: reusing typedefs in template for [PR124229]
This is a crash on code like:

  template for (constexpr auto val : define_static_array (enumerators_of (^^E)))
    {
      constexpr auto a = annotations_of(val)[0];
      using U = [:type_of(a):];
      constexpr auto m1 = extract<U>(a);
    }

because the template arg to extract wasn't substituted to "info".
Once I dug deeper I realized this problem isn't tied to Reflection:
we also crash here:

  template for (constexpr auto val : { 42 })
    {
      using U = decltype(val);
      foo<U>();
    }

because we emit code for foo() that still has a DECLTYPE_TYPE in it.

The problem is in tsubst and reusing typedefs.  Normally, for code like

  template<typename T> void foo () {
      using U = T;
      U u;
  }

we do the DECL_FUNCTION_SCOPE_P -> retrieve_local_specialization call.
This call only happens in function templates (that are not explicit
specializations), but the "template for" above are both in non-template
functions.  So we end up returning the original tree:

        /* The typedef is from a non-template context.  */
        return t;

It seems clear that this is the wrong thing to do, and that the
DECL_FUNCTION_SCOPE_P code should happen in this scenario as well.
[temp.decls.general] tells me that "For the purpose of name lookup and
instantiation, the compound-statement of an expansion-statement is
considered a template definition." so I'm guessing that we want to
check for an expansion-statement as well.  As decl_dependent_p says,
in_expansion_stmt is false when instantiating, so I'm looking for
sk_template_for.

	PR c++/124229

gcc/cp/ChangeLog:

	* pt.cc (in_expansion_stmt_p): New.
	(tsubst): When reusing typedefs, do retrieve_local_specialization also
	when in_expansion_stmt_p is true.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp26/expansion-stmt32.C: New test.
	* g++.dg/reflect/expansion-stmt2.C: New test.

Reviewed-by: Jason Merrill <jason@redhat.com>
2026-03-04 14:33:00 -05:00
Jakub Jelinek
477a1ff545 c++: Find annotations in DECL_ATTRIBUTES (TYPE_NAME (r)) for type aliases
On Wed, Feb 25, 2026 at 08:50:40PM +0100, Jakub Jelinek wrote:
> > Sounds like the maybe_strip_typedefs is wrong, since reflection in general
> > tries to preserve aliases.
>
> Actually the maybe_strip_typedefs call is correct, that is for the type
> argument (so when it is std::meta::annotations_with_type) and the standard
> says that dealias should be used
> - https://eel.is/c++draft/meta.reflection#annotation-6.2
> But we probably shouldn't use TYPE_ATTRIBUTES but DECL_ATTRIBUTES (TYPE_NAME (r))
> if r is a type alias.
> I'll test a patch for that separately.

Here it is.

2026-03-04  Jakub Jelinek  <jakub@redhat.com>

	PR c++/123866
	* reflect.cc (eval_annotations_of): For type aliases look for
	annotations in DECL_ATTRIBUTES (TYPE_NAME (r)).

	* g++.dg/reflect/annotations11.C: New test.
2026-03-04 19:22:29 +01:00
Jakub Jelinek
62bbc98748 libgfortran: Fix up putenv uses in libcaf_shmem [PR124330]
I don't have access to HP/UX, but at least on other OSes and what Linux as
well as POSIX documents is that when you call putenv with some argument,
what that argument points to becomes part of the environment and when
it is changed, the environment changes.  I believe ENOMEM from putenv is
about reallocating of the __environ (or similar) pointed array of pointers
(e.g. if the particular env var name isn't there already), it still
shouldn't allocate any memory for the NAME=VALUE string and just use
the user provided.  So, padding address of automatic array will be UB
as soon as the scope of that var is left.

One can either malloc the buffer, or use static vars, then nothing leaks
and in the unlikely case putenv would be called twice for the same env var,
it would second time only register the same buffer.

2026-03-04  Jakub Jelinek  <jakub@redhat.com>

	PR libfortran/124330
	* caf/shmem/shared_memory.c (shared_memory_set_env): Make buffer
	used by putenv static.
	(shared_memory_init): Likewise.
2026-03-04 17:12:29 +01:00
Torbjörn SVENSSON
e93b0c744f testsuite: drop xfail for vect-reduc-pattern-2c.c [PR124359, PR122961]
Since r16-4411-gb6e802fd55d37e, the pattern is now generated:

vect-reduc-pattern-2c.c:28:17: note: vect_recog_widen_sum_pattern: detected: _4 = _2 + shortsum.0_3;

gcc/testsuite/ChangeLog:

	PR testsuite/124359
	PR testsuite/122961
	* gcc.dg/vect/vect-reduc-pattern-2c.c: Drop xfail.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2026-03-04 16:01:11 +01:00
Torbjörn SVENSSON
9caa6d919f testsuite: arm: add -fno-ipa-cp to gcc.target/arm/simd/vextQp64_1.c
Without this patch, the following failure can be seen in the logs:

gcc.target/arm/simd/vextQp64_1.c: vext.64[ \t]+[qQ][0-9]+, [qQ][0-9]+, [qQ][0-9]+, #[0-9]+!?(?:[ \t]+@[a-zA-Z0-9 ]+)?\n found 2 times
FAIL: gcc.target/arm/simd/vextQp64_1.c scan-assembler-times vext.64[ \t]+[qQ][0-9]+, [qQ][0-9]+, [qQ][0-9]+, #[0-9]+!?(?:[ \t]+@[a-zA-Z0-9 ]+)?\n 1

gcc/testsuite/ChangeLog:

	* gcc.target/arm/simd/vextQp64_1.c: Compile with -fno-ipa-cp.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2026-03-04 16:01:11 +01:00
Andrew Pinski
4ef3d71a08 widen mult: Fix handling of _Fract mixed with _Fract [PR119568]
The problem here is we try calling find_widening_optab_handler_and_mode
with to_mode=E_USAmode and from_mode=E_UHQmode. This causes an ICE (with checking only).
The fix is to reject the case where the mode classes are different in convert_plusminus_to_widen
before even trying to deal with the modes.

Bootstrapped and tested on x86_64-linux-gnu.

	PR tree-optimization/119568

gcc/ChangeLog:

	* tree-ssa-math-opts.cc (convert_plusminus_to_widen): Reject different
	mode classes.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
2026-03-04 04:32:37 -08:00
Jonathan Wakely
47339c8f8a libstdc++: Change comment on #endif to match #if condition [PR124363]
I changed the #if in r8-3123-gc6888c62577671 but didn't make the
corresponding change to the #endif.

libstdc++-v3/ChangeLog:

	PR libstdc++/124363
	* include/std/string_view: Adjust comment on #endif to match #if
	condition.
2026-03-04 11:59:39 +00:00
Torbjörn SVENSSON
b02f9495dc testsuite: arm: adjust inline assembler for arm-none-eabi [PR124320]
gcc/testsuite/ChangeLog:

	PR testsuite/124320
	* gcc.dg/lto/toplevel-extended-asm-1_0.c: Adjust inline
	assembler for arm-none-eabi.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2026-03-04 10:59:34 +01:00
Robin Dapp
4bcf6c461a lra: Validate regno and mode in equiv substitution. [PR124041]
We can perform equivalence substitution in subreg context:

(insn 34 32 36 3 (set (reg:SI 103 [ _7 ])
        (subreg:SI (reg/f:DI 119) 0)) "bla.c":7:41 104 {*movsi_aarch64}

becomes

(insn 34 32 36 3 (set (reg:SI 103 [ _7 ])
        (subreg:SI (reg/f:DI 64 sfp) 0)) "bla.c":7:41 104 {*movsi_aarch64}
     (nil))

but aarch64_hard_regno_mode_ok doesn't like that:

  if (regno == FRAME_POINTER_REGNUM || regno == ARG_POINTER_REGNUM)
    return mode == Pmode;

and ICEs further on.

Therefore, this patch checks hard_regno_mode_ok if we substitute a hard
reg in subreg context.

	PR rtl-optimization/124041

gcc/ChangeLog:

	* lra-constraints.cc (curr_insn_transform): Check if hardreg is
	valid in subreg context.

gcc/testsuite/ChangeLog:

	* gcc.dg/torture/pr124041.c: New test.

Signed-off-by: Robin Dapp <rdapp@oss.qualcomm.com>
2026-03-04 10:03:08 +01:00
Nathan Myers
25996a53e8 libstdc++: debug impls for heterogeneous insertion overloads (P2363) [PR117402]
Implement the debug versions of new overloads from P2363.

Also, simplify implementation of other overloads to match.

libstdc++-v3/ChangeLog:
	PR libstdc++/117402
	* include/debug/map.h (try_emplace (2x), insert_or_assign (2x)):
	Define heterogeneous overloads, simplify existing overloads.
	* include/debug/unordered_map: Same.
	* include/debug/set.h (insert (2x)):
	Define heterogeneous overloads.
	* include/debug/unordered_set: Same.
2026-03-04 04:01:49 -05:00
Nathan Myers
94d5ca4583 libstdc++: container heterogeneous insertion (P2363) [PR117402]
Implements P2353R5 "Extending associative containers with the
remaining heterogeneous overloads". Adds overloads templated on
heterogeneous key types for several members of associative
containers, particularly insertions:

                      /-- unordered --\
 set  map  mset mmap set  map  mset mmap
  @    .    .    .    @    .    .    .    insert
  .    @    .    .    .    @    .    .    op[], at, try_emplace,
                                            insert_or_assign
  .    .    .    .    @    @    @    @    bucket

(Nothing is added to the multiset or multimap tree containers.)
All the insert*() and try_emplace() members also get a hinted
overload.  The at() members get const and non-const overloads.

The new overloads enforce concept __heterogeneous_tree_key or
__heterogeneous_hash_key, as in P2077, to enforce that the
function objects provided meet requirements, and that the key
supplied is not an iterator or the native key. Insertions
implicitly construct the required key_type object from the
argument, by move where permitted.

libstdc++-v3/ChangeLog:
	PR libstdc++/117402
	* include/bits/stl_map.h (operator[], at (2x), try_emplace (2x),
	insert_or_assign (2x)): Add overloads.
	* include/bits/unordered_map.h (operator[], at (2x),
	try_emplace (2x), insert_or_assign (2x), bucket (2x)): Add overloads.
	* include/bits/stl_set.h (insert (2x)): Add overloads.
	* include/bits/unordered_set.h (insert (2x), bucket (2x)): Add overloads.
	* include/bits/hashtable.h (_M_bucket_tr, _M_insert_tr): Define.
	* include/bits/hashtable_policy.h (_M_at_tr (2x)): Define.
	* include/bits/stl_tree.h (_M_emplace_here, _M_get_insert_unique_pos_tr,
	_M_get_insert_hint_unique_pos_tr): Define new heterogeneous insertion
	code path for set and map.
	* include/bits/version.def (associative_heterogeneous_insertion):
	Define.
	* include/bits/version.h: Regenerate.
	* include/std/map (__glibcxx_want_associative_heterogeneous_insertion):
	Define macro.
	* include/std/set: Same.
	* include/std/unordered_map: Same.
	* include/std/unordered_set: Same.
	* testsuite/23_containers/map/modifiers/hetero/insert.cc: New tests.
	* testsuite/23_containers/set/modifiers/hetero/insert.cc: Same.
	* testsuite/23_containers/unordered_map/modifiers/hetero/insert.cc:
	Same.
	* testsuite/23_containers/unordered_multimap/modifiers/hetero/insert.cc:
	Same.
	* testsuite/23_containers/unordered_multiset/modifiers/hetero/insert.cc:
	Same.
	* testsuite/23_containers/unordered_set/modifiers/hetero/insert.cc:
	Same.
2026-03-04 03:59:15 -05:00
Philipp Tomsich
37980a5a78 avoid-store-forwarding: Clear sbitmap before use [PR124351]
The forwarded_bytes sbitmap needs to be zeroed after allocation,
as sbitmaps are not implicitly initialized.  This caused valgrind
warnings about conditional jumps depending on uninitialised values.

gcc/ChangeLog:

	PR rtl-optimization/124351
	* avoid-store-forwarding.cc (process_store_forwarding): Add
	bitmap_clear after allocating forwarded_bytes.
2026-03-04 09:49:09 +01:00
Jakub Jelinek
e4bd889001 i386: Fix up vcvt<convertfp8_pack><mode><mask_name> for -masm=intel [PR124341]
The vcvt<convertfp8_pack><mode><mask_name> pattern uses wrong <mask_operand?>
for -masm=intel, so the testcase fails to assemble, it emits something
like {ymm1} instead of {k1}.

2026-03-04  Jakub Jelinek  <jakub@redhat.com>

	PR target/124341
	* config/i386/sse.md (vcvt<convertfp8_pack><mode><mask_name>): Use
	<mask_operand3> rather than <mask_operand2> for -masm=intel.

	* gcc.target/i386/avx10_2-pr124341.c: New test.
2026-03-04 09:38:28 +01:00
Jakub Jelinek
7fe63e16ae i386: Fix up printing of input operand of avx10_2_comisbf16_v8bf for -masm=intel [PR124349]
gas expects the second operand if in memory WORD PTR rather than XMMWORD PTR.
The following patch fixes it by using %w1 instead of %1, if the operand is
a register, it is printed as xmm1 in both cases.

2026-03-04  Jakub Jelinek  <jakub@redhat.com>

	PR target/124349
	* config/i386/sse.md (avx10_2_comisbf16_v8bf): Use %w1 instead of %1
	for -masm=intel.

	* gcc.target/i386/avx10_2-pr124349.c: New test.
2026-03-04 09:34:33 +01:00
Richard Biener
19d4d56d67 Adjust gcc.dg/vect/vect-reduc-dot-s8b.c again
A failure on sparc shows that the dump scan for dot-prod is fragile
enough.  The following simply removes it given it serves no actual
purpose and adds comments in place.

	* gcc.dg/vect/vect-reduc-dot-s8b.c: Remove scan for
	dot_prod pattern matching.
2026-03-04 09:27:47 +01:00
Rainer Orth
6f9dd9fcb9 testsuite: Only xfail gcc.dg/ipa/iinline-attr.c on 32-bit SPARC [PR64835]
As discussed in PR target/64835, the gcc.dg/ipa/iinline-attr.c test
XPASSes on 64-bit SPARC:

XPASS: gcc.dg/ipa/iinline-attr.c scan-ipa-dump inline "hooray[^\\\\n]*inline copy in test"

Therefore this patch restricts the xfail to 32-bit sparc for now.

Tested on sparc-sun-solaris2.11, i386-pc-solaris2.11, and
visium-unknown-unknown.

2026-03-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:
	PR target/64835
	* gcc.dg/ipa/iinline-attr.c (scan-ipa-dump): Restrict xfail to
	32-bit SPARC.
2026-03-04 09:20:49 +01:00
Jerry DeLisle
266ea973f9 Fortran: Fix failures on windows and hpux systems [PR124330]
Fix missed hunk in previous commit.

	PR fortran/124330

libgfortran/ChangeLog:

	* caf/shmem/shared_memory.c (shared_memory_init): Use
	putenv() for HPUX and as a fallback where setenv()
	is not available.
2026-03-03 20:50:32 -08:00
liuhongt
ec3d2c9ab8 Refine the testcase.
> This testcase fails with binutils 2.35:
vmovw is supported in binutils 2.38 and later, need
/* { dg-require-effective-target avx512fp16 } */ to avoid errors.

> ```
> /tmp/ccf20y5C.s:20: Error: no such instruction: `vmovw xmm0,WORD PTR .LC0[rip]'
> /tmp/ccf20y5C.s:21: Error: no such instruction: `vmovw WORD PTR [rbp-18],xmm0'
> /tmp/ccf20y5C.s:22: Error: no such instruction: `vmovw xmm0,WORD PTR [rbp-18]'
> /tmp/ccf20y5C.s:23: Error: no such instruction: `vmovw WORD PTR [rbp-20],xmm0'
> /tmp/ccf20y5C.s:24: Error: no such instruction: `vmovw xmm0,WORD PTR [rbp-18]'
> /tmp/ccf20y5C.s:25: Error: no such instruction: `vmovw WORD PTR [rbp-22],xmm0'
> /tmp/ccf20y5C.s:26: Error: no such instruction: `vmovw xmm0,WORD PTR [rbp-18]'
> /tmp/ccf20y5C.s:27: Error: no such instruction: `vmovw WORD PTR [rbp-24],xmm0'
> /tmp/ccf20y5C.s:28: Error: no such instruction: `vmovw xmm0,WORD PTR [rbp-18]'
> /tmp/ccf20y5C.s:29: Error: no such instruction: `vmovw WORD PTR [rbp-26],xmm0'
> /tmp/ccf20y5C.s:30: Error: no such instruction: `vmovw xmm0,WORD PTR [rbp-18]'
> ```
>
> Thanks,
> Andrew Pinski

gcc/testsuite/ChangeLog:

	PR target/124335
	* gcc.target/i386/avx512fp16-pr124335.c: Require target
	avx512fp16 instead of avx512bw.
2026-03-03 19:04:50 -08:00
GCC Administrator
9bf30667dc Daily bump. 2026-03-04 00:16:31 +00:00
H.J. Lu
a7cce1afee x86: Call ix86_access_stack_p only with symbolic constant load
ix86_access_stack_p can be quite expensive.  Cache the result and call it
only if there are symbolic constant loads.  This reduces the compile time
of PR target/124165 test from 202 seconds to 55 seconds.

gcc/

	PR target/124165
	* config/i386/i386-protos.h (symbolic_reference_mentioned_p):
	Change the argument type from rtx to const_rtx.
	* config/i386/i386.cc (symbolic_reference_mentioned_p): Likewise.
	(ix86_access_stack_p): Add 2 auto_bitmap[] arguments.  Cache
	the register BB domination result.
	(ix86_symbolic_const_load_p_1): New.
	(ix86_symbolic_const_load_p): Likewise.
	(ix86_find_max_used_stack_alignment): If there is no symbolic
	constant load into the register, don't call ix86_access_stack_p.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2026-03-04 06:09:19 +08:00
Vladimir N. Makarov
958d1a8819 [PR115042, LRA]: Postpone processing of new reload insns, 2nd variant
This is the second attempt to solve the PR.  The first attempt (see
commit 9a7da540b6) resulted in numerous
test suite failures on some secondary targets.

LRA in this PR can not find regs for asm insn which requires 11
general regs when 13 regs are available.  Arm subtarget (thumb) has
two stores with low and high general regs.  LRA systematically chooses
stores involving low regs as having less costs and there are only 8
low regs.  That is because LRA (and reload) chooses (mov) insn
alternatives independently from register pressure.

The proposed patch postpones processing new reload insns until the
reload pseudos are assigned and after that considers new reload insns.
We postpone reloads only for asm insns as they can have a lot of
operands.  Depending on the assignment LRA chooses insns involving low
or high regs.  Generally speaking it can change code generation in
better or worse way but it should be a very rare case.

The patch does not contain the test as original test is too big (300KB
of C code).  Unfortunately cvise after 2 days of work managed to
decrease the test only to 100KB file.

gcc/ChangeLog:

	PR target/115042
	* lra-int.h (lra_postponed_insns): New.
	* lra.cc (lra_set_insn_deleted, lra_asm_insn_error): Clear
	postponed insn flag.
	(lra_process_new_insns): Propagate postponed insn flag for asm
	gotos.
	(lra_postponed_insns): New.
	(lra): Initialize lra_postponed_insns.  Push postponed insns on
	the stack.
	* lra-constraints.cc (postpone_insns): New function.
	(curr_insn_transform): Use it to postpone processing reload insn
	constraints.  Skip processing postponed insns.
2026-03-03 15:29:00 -05:00
Mark Wielaard
438a7925cd libgfortran: Regenerate config.h.in and configure
commit e13b14030a ("Fortran: Fix libfortran cannot be cross compiled
[PR124286]") updated configure.ac but didn't regenerate config.h.in
with autoheader. Also some line numbers were still wrong in
configure. Fix this by explicitly regenerating both files with
autoheader and autoconf version 2.69.

libgfortran/ChangeLog:

	* config.h.in: Regenerate.
	* configure: Regenerate.
2026-03-03 20:34:58 +01:00
Richard Biener
ee3f1197b6 middle-end/45273 - avoid host double in profiling
The following replaces the last host double computation by using
int64_t instead to avoid overflow of 32bit (but capped to
REG_BR_PROB_BASE) values.

	PR middle-end/45273
	* predict.cc (combine_predictions_for_insn): Use int64_t
	math instead of double.
2026-03-03 19:11:11 +01:00
Adam Wood
a40655524e libstdc++: Add filesystem::copy_symlink tests [PR122217]
libstdc++-v3/Changelog:

	PR libstdc++/122217
	* testsuite/27_io/filesystem/operations/copy_symlink/1.cc: New
	test.
	* testsuite/27_io/filesystem/operations/copy_symlink/2.cc: New
	test.
	* testsuite/27_io/filesystem/operations/copy_symlink/3.cc: New
	test.
	* testsuite/27_io/filesystem/operations/copy_symlink/4.cc: New
	test.
2026-03-03 16:14:35 +00:00
Arthur O'Dwyer
300f170835 libstdc++: Make std::expected nodiscard [PR119197]
The new test includes two lines that currently do not warn because of
GCC compiler bug PR85973; the lines that do warn are the more
important cases.

	PR libstdc++/119197

libstdc++-v3/ChangeLog:

	* include/std/expected (expected, expected<void, E>): Add
	[[nodiscard]] to class.
	* testsuite/20_util/expected/119197.cc: New test.

Signed-off-by: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
Reviewed-by: Nathan Myers <ncm@cantrip.org>
2026-03-03 16:13:23 +00:00
Jonathan Wakely
28e4005c42 libstdc++: Adjust indentation of std::atomic<T*> wait/notify members
libstdc++-v3/ChangeLog:

	* include/std/atomic (atomic<T*>::wait, atomic<T*>::notify_one)
	(atomic<T*>::notify_all): Fix indentation.
2026-03-03 16:11:58 +00:00
Jerry DeLisle
4a9c76b78c Fortran: Fix failures on windows and hpux systems [PR124330]
Co-authored-by: John David Anglin <danglin@gcc.gnu.org>

	PR fortran/124330

libgfortran/ChangeLog:

	* caf/shmem/shared_memory.c: Fix filenames for WIN32
	includes.
	(shared_memory_set_env): Use putenv() for HPUX and as
	a fallback where setenv () is not available.
	(NAME_MAX): Replace with SHM_NAME_MAX.
	(SHM_NAME_MAX): Use this to avoid duplicating NAME_MAX
	used elsewhere.
	* caf/shmem/supervisor.c (get_image_num_from_envvar): Add
	a fallback for HPUX. Add additional comment to explain why
	the number of cores is used in lieu of GFORTRAN_NUM_IMAGES.
2026-03-03 08:05:32 -08:00
Martin Uecker
d5c50c75f0 c: Fix wrong code related to TBAA for components of structure types 2/2 [PR122572]
Given the following two types, the C FE assigns the same
TYPE_CANONICAL to both struct bar, because it treats pointer to
tagged types with the same type as compatible (in this context).

struct foo { int y; };
struct bar { struct foo *c; }

struct foo { long y; };
struct bar { struct foo *c; }

get_alias_set records the components of aggregate types, but only
considers the components of the canonical version.  To prevent
miscompilation, we create a modified canonical type where we
change such pointers to void pointers.

	PR c/122572

gcc/c/ChangeLog:
	* c-decl.cc (finish_struct): Add distinct canonical type.
	* c-tree.h (c_type_canonical): Prototype for new function.
	* c-typeck.cc (c_type_canonical): New function.
	(ptr_to_tagged_member): New function.

gcc/testsuite/ChangeLog:
	* gcc.dg/pr123356-2.c: New test.
	* gcc.dg/struct-alias-2.c: New test.
2026-03-03 16:14:53 +01:00
Martin Uecker
065bbf5c5f c: Fix wrong code related to TBAA for components of structure types 1/2 [PR122572]
When computing TYPE_CANONICAL we form equivalence classes of types
ignoring some aspects.  In particular, we treat two structure / union
types as equivalent if a member is a pointer to another tagged type
which has the same tag, even if this pointed-to type is otherwise not
compatible.  The fundamental reason why we do this is that even in a
single TU the equivalence class needs to be consistent with compatibility
of incomplete types across TUs.  (LTO globs such pointers to void*).

The bug is that the test incorrectly treated also two pointed-to types
without tag as equivalent.  One would expect that this just pessimizes
aliasing decisions, but due to how the middle-end handles TBAA for
components of structures, this leads to wrong code.

	PR c/122572

gcc/c/ChangeLog:
	* c-typeck.cc (tagged_types_tu_compatible_p): Fix check.

gcc/testsuite/ChangeLog:
	* gcc.dg/pr122572.c: New test.
	* gcc.dg/pr123356-1.c: New test.
2026-03-03 16:14:53 +01:00
Jakub Jelinek
41a533a85a i386: Use orb instead of orl/orq for stack probes/clash [PR124336]
This PR is about an inconsistency between AT&T and Intel syntax
for output_adjust_stack_and_probe/output_probe_stack_range.
On ia32 they use both orl or or BYTE PTR, i.e. 32-bit or,
but on x86_64 in AT&T syntax they use orq (i.e. 64-bit or) and
in Intel syntax they use or DWORD PTR (i.e. 32-bit or).
These cases are used when probing stack in a loop, for each
page one probe.  There is also the probe_stack named pattern
which currently uses word_mode or (i.e. 64-bit or for x86_64)
for both syntaxes, used when probing only once.

Functionally, I think whether we do an 8-bit or 32-bit or 64-bit
or with 0 constant doesn't matter, we don't modify any values on the
stack, just pretend to modify it.  The 8-bit and 32-bit ors
are 1-byte shorter though than 64-bit one.  How the 3 behave
performance-wise is unknown, if the particular probed spot on the
stack hasn't been stored/read for a while and won't be for a while,
then I'd think it shouldn't matter, dunno if there can be store
forwarding effects if it has been e.g. written or read very recently
by some other function as say 32-bit access and now is 8-bit.  The
access after the probe (if it happens soon enough) should be in valid
programs a store (and again, dunno if there can be issues if the
sizes are different).

Now, for consistency reasons, we could just make the Intel
syntax match the AT&T and use 64-bit or on x86_64, so
use QWORD PTR instead of DWORD PTR if stack_pointer_rtx is 64-bit
in those 2 functions and be done with it.

Another possibility is use always 32-bit ors (in both those 2 functions
and probe_stack*; similar to the posted patch except testsuite changes
aren't needed and s/{b}/{l}/g;s/QI/SI/g;s/BYTE PTR/DWORD PTR/g) and
last option is to always use 8-bit ors (which is what the following
patch does).  Or some other mix, say use 32-bit ors for -Os/-Oz and
64-bit ors otherwise.

2026-03-03  Jakub Jelinek  <jakub@redhat.com>

	PR target/124336
	* config/i386/i386.cc (output_adjust_stack_and_probe): Use
	or{b} rather than or%z0 and BYTE PTR rather than DWORD PTR.
	(output_probe_stack_range): Likewise.
	* config/i386/i386.md (probe_stack): Pass just 2 arguments
	to gen_probe_stack_1, first adjust_address to QImode, second
	const0_rtx.
	(@probe_stack_1_<mode>): Remove.
	(probe_stack_1): New define_insn.

	* gcc.target/i386/stack-check-11.c: Allow orb next to orl/orq.
	* gcc.target/i386/stack-check-18.c: Likewise.
	* gcc.target/i386/stack-check-19.c: Likewise.
2026-03-03 15:47:08 +01:00
Jakub Jelinek
4a2d9d886e c++: Set OLD_PARM_DECL_P even in regenerate_decl_from_template [PR124306]
The following testcase ICEs, because we try to instantiate the PARM_DECLs
of foo <int> twice, once when parsing ^^foo <int> and remember in a
REFLECT_EXPR a PARM_DECL in there, later on regenerate_decl_from_template
is called and creates new set of PARM_DECLs and changes DECL_ARGUMENTS
(or something later on in that chain) to the new set.
This means when we call parameters_of on ^^foo <int> later on, they won't
compare equal to the earlier acquired ones, and when we do e.g. type_of
or other operation on the old PARM_DECL where it needs to search the
DECL_ARGUMENTS (DECL_CONTEXT (parm_decl)) list, it will ICE because it
won't find it there.

The following patch fixes it similarly to how duplicate_decls deals
with those, by setting OLD_PARM_DECL_P flag on the old PARM_DECLs, so that
before using reflections of those we search DECL_ARGUMENTS and find the
corresponding new PARM_DECL.

2026-03-03  Jakub Jelinek  <jakub@redhat.com>

	PR c++/124306
	* pt.cc (regenerate_decl_from_template): Mark the old PARM_DECLs
	replaced with tsubst_decl result with OLD_PARM_DECL_P flag.

	* g++.dg/reflect/parameters_of8.C: New test.
2026-03-03 15:44:19 +01:00
Marek Polacek
86bfcedd0f c++/reflection: add fixed test [PR124324]
Another test for the recently-fixed PR124324.

	PR c++/124324

gcc/testsuite/ChangeLog:

	* g++.dg/reflect/substitute6.C: New test.
2026-03-03 09:41:06 -05:00
Marek Polacek
40ee8d4e9f c++/reflection: static member template operator [PR124324]
This testcase didn't compile properly because eval_is_function and
eval_extract got an unresolved TEMPLATE_ID_EXPR.  We used to resolve
them in process_metafunction but I removed that call, thinking it was
no longer necessary.  This patch puts it in eval_substitute which
should cover it.

	PR c++/124324

gcc/cp/ChangeLog:

	* reflect.cc (eval_substitute): Call resolve_nondeduced_context.

gcc/testsuite/ChangeLog:

	* g++.dg/reflect/extract11.C: New test.

Reviewed-by: Jason Merrill <jason@redhat.com>
2026-03-03 08:41:07 -05:00
Richard Biener
c817ededd4 Adjust gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c
The following avoids the extra epilogue vectorization we now get for
fixed-size vectors so the dump scanning is not confused by it.

	* gcc.dg/vect/complex/fast-math-complex-add-pattern-half-float.c:
	Add --param vect-epilogues-nomask=0.
2026-03-03 14:04:10 +01:00
Jonathan Wakely
f48b123580 libstdc++: Reference C++11 standard more precisely in regex comments
libstdc++-v3/ChangeLog:

	* include/bits/regex_compiler.h: Adjust comments so that
	standard references are specific to C++11.
2026-03-03 12:05:49 +00:00
Jonathan Wakely
c1bd384cb1 gcc: Fix "Conveinece" typo in comment
gcc/ChangeLog:

	* fold-const.cc: Fix "Conveinece" typo in comment.
2026-03-03 12:05:49 +00:00
Richard Biener
1ca2e5dfa5 Do not mark stmts PURE_SLP for loop vectorization
Remove this legacy marking from loop vectorization code and adjust
few leftovers from the removal of hybrid SLP support.

	* tree-vect-slp.cc (vect_make_slp_decision): Do not call
	vect_mark_slp_stmts.
	* tree-vect-data-refs.cc (vect_enhance_data_refs_alignment):
	We are always doing SLP.
	(vect_supportable_dr_alignment): Likewise.
	* tree-vect-loop.cc (vect_analyze_loop_2): No need to reset
	STMT_SLP_TYPE.
2026-03-03 13:04:06 +01:00
Jonathan Yong
823c969054 gcc: libgdiagnostics DLL for mingw should be for mingw hosts
Fixed incorrect attempts to build a libgdiagnostics by naming it
as a DLL when gcc is configured as a cross compiler that targets
mingw but hosted on non-Windows systems.

gcc/ChangeLog:

	* Makefile.in: the libgdiagnostics shared object for mingw
	should be based on host name, not target name.

Signed-off-by: Jonathan Yong <10walls@gmail.com>
2026-03-03 09:19:32 +00:00
Richard Sandiford
0399019276 rtl-ssa: Ensure live-out uses before redefinitions [PR123786]
This patch fixes cases in which:

(1) a register is live in to an EBB;
(2) the register is live out of at least one BB in the EBB; and
(3) the register is redefined by a later BB in the same EBB.

We were supposed to create live-out uses for (2), so that the redefinition
in (3) cannot be moved up into the live range of (1).

The patch does this by collecting all definitions in second and
subsequence BBs of an EBB.  It then creates degenerate phis for those
registers that do not naturally need phis.  For speed and simplicity,
the patch does not check for (2).  If a register is live in to the EBB,
then it must be used somewhere, either in the EBB itself or in a
successor outside of the EBB.  A degenerate phi would eventually
be needed in either case.

This requires moving append_bb earlier, so that add_phi_nodes can
iterate over the BBs in an EBB.

live_out_value contained an on-the-fly optimisation to remove redundant
phis.  That was a mistake.  live_out_value can be called multiple times
for the same quantity.  Replacing a phi on-the-fly messes up bookkeeping
for second and subsequent calls.

The live_out_value optimisation was mostly geared towards memory.
As an experiment, I added an assert for when the optimisation applied
to registers.  It only fired once in an x86_64-linux-gnu bootstrap &
regression test, in gcc.dg/tree-prof/split-1.c.  That's a very poor
(but unsurprising) return.  And the optimisation will still be done
eventually anyway, during the phi simplification phase.  Doing it on
the fly was just supposed to allow the phi's memory to be reused.

The patch therefore moves the optimisation into add_phi_nodes and
restricts it to memory (for which it does make a difference).

gcc/
	PR rtl-optimization/123786
	* rtl-ssa/functions.h (function_info::live_out_value): Delete.
	(function_info::create_degenerate_phi): New overload.
	* rtl-ssa/blocks.cc (all_uses_are_live_out_uses): Delete.
	(function_info::live_out_value): Likewise.
	(function_info::replace_phi): Keep live-out uses if they are followed
	by a definition in the same EBB.
	(function_info::create_degenerate_phi): New overload, extracted
	from create_reg_use.
	(function_info::add_phi_nodes): Ensure that there is a phi for
	every live input that is redefined by a second or subsequent
	block in the EBB.  Record that such phis need live-out uses.
	(function_info::record_block_live_out): Use look_through_degenerate_phi
	rather than live_out_value when setting phi inputs.  Remove use of
	live_out_value for live-out uses.  Inline the old handling of
	bb_mem_live_out.
	(function_info::start_block): Move append_bb call to...
	(function_info::create_ebbs): ...here.
	* rtl-ssa/insns.cc (function_info::create_reg_use): Use the new
	create_degenerate_phi overload.

gcc/testsuite/
	PR rtl-optimization/123786
	* gcc.target/aarch64/pr123786.c: New test.

Co-authored-by: Artemiy Volkov <artemiy.volkov@arm.com>
2026-03-03 08:55:38 +00:00
Jakub Jelinek
19e1192b1f i386: Fix up some FMA patterns for -masm=intel [PR124315]
The following 4 define_insns don't have matching operands between AT&T and
Intel syntax, %3 is "0" and %1 was missing.
Searched grep '%0%{%4%}|%0%{%4%}' *.md and didn't find other spots where
the operand numbers wouldn't match (reverse order of course).

2026-03-03  Jakub Jelinek  <jakub@redhat.com>

	PR target/124315
	* config/i386/sse.md (avx512f_vmfmadd_<mode>_mask3<round_name>,
	avx512f_vmfmsub_<mode>_mask3<round_name>,
	avx512f_vmfnmadd_<mode>_mask3<round_name>,
	avx512f_vmfnmsub_<mode>_mask3<round_name>): Use %<iptr>1 instead of
	%<iptr>3 in -masm=intel syntax.

	* gcc.target/i386/avx512f-pr124315.c: New test.
2026-03-03 09:51:33 +01:00
Jakub Jelinek
b3502a6686 i386: Fix up *avx512f_load<mode>_mask for -masm=intel [PR124335]
The Intel syntax part is missing % before 3, so it always prints {3}
rather than {k1} or similar.

Fixed thusly.

2026-03-03  Jakub Jelinek  <jakub@redhat.com>

	PR target/124335
	* config/i386/sse.md (*avx512f_load<mode>_mask): Use %{%3%} instead of
	%{3%} for -masm=intel syntax.

	* gcc.target/i386/avx512fp16-pr124335.c: New test.
2026-03-03 09:50:44 +01:00
Jakub Jelinek
6e15e34201 i386: Rename avx512fp16_mov<mode> to *avx512fp16_mov<mode>
On Mon, Mar 02, 2026 at 08:04:53PM +0800, Hongtao Liu wrote:
> You are correct. There is no place that calls
> gen_avx512fp16_mov{v8hf,v8bf,v8hi}. The original pattern‘s name is
> avx512fp16_vmovsh which is added in r12-3407-g9e2a82e1f9d2c4, there's
> also another pattern named *avx512fp16_movsh . At that time, the * was
> added to distinguish between these two patterns.
> And yes, we can add* to the pattern name.

Here it is.

2026-03-03  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/sse.md (avx512fp16_mov<mode>): Rename pattern to...
	(*avx512fp16_mov<mode>): ... this.
2026-03-03 09:49:33 +01:00