From yjn@yjn-systems.com Sun Nov 1 02:51:58 2026
From: yjn@yjn-systems.com (York Jasper Niebuhr)
Date: Sun, 1 Nov 2026 03:51:58 +0100
Subject: [PATCH 0/2] Preserve semantic origins through C constant folding
Message-ID: <20261101025158.271216-1-yjn@yjn-systems.com>
This series introduces a mechanism for preserving the semantic origins
of C constant expressions which would usually be lost to frontend
folding, and new BPF CO-RE capabilities that consume them.
The C language frontend folds expressions such as
__builtin_offsetof (struct S, field)
or enum constants to raw integer constants, with no remaining
association to field or enum identities. The BPF backend must retrieve
such information to generate CO-RE relocations.
Until now, BPF had to rely on custom builtins and copied integer
constant keys in side-maps to funnel semantic intent through the C
frontend.
With deferred constants...
* The BPF backend can automatically generate relocations for offsetof
expressions that refer to offsets of structs marked with the
"preserve_access_index" attribute, without the need to use a dedicated
builtin function.
* The BPF backend can recover the identity of the enum value handed to
__builtin_preserve_enum_value without a side-map.
* BPF supports a new "preserve_enum_values" attribute for enum types.
When set, all occurrences of enumerators of that type automatically
get corresponding relocations during BPF lowering, without the need
to use a builtin everywhere. This is basically the enum equivalent
to "preserve_access_index".
* Other consumers, such as Selfpatch-SLR (in development) [1] can get
the information they need to instrument all dependencies on field
offsets or enum values.
Patch 1 of this series introduces the entirely opt-in deferred constant
mechanism into the C frontend. It adds a DEFERRED_CST_EXPR to represent
expressions with otherwise constant semantics while postponing their final
evaluation. If a struct type is explicitly marked for constant deferral
(e.g. in a PLUGIN_FINISH_TYPE callback), fold_offsetof returns
DEFERRED_CST_EXPRs instead of INTEGER_CST nodes for matching offset
expressions. If an enum type is marked for constant deferral, its
enumerators' occurrences are also resolved to DEFERRED_CST_EXPRs instead
of their INTEGER_CST initial values.
Patch 2 implements a BPF consumer of deferred constants that provides
the improvements/features mentioned above.
I'm open to any suggestions or change requests, though I am no BPF
wizard, so it would be lovely to get some BPF people involved with that
part of this series.
Thanks,
Jasper
[1] https://lore.kernel.org/lkml/20261025031011.183364-1-yjn@yjn-systems.com/
York Jasper Niebuhr (2):
c: deferred constant expressions
bpf: CO-RE consumer of deferred constants
gcc/Makefile.in | 4 +-
gcc/c-family/c-common.cc | 109 ++-
gcc/c/c-fold.cc | 173 +++++
gcc/c/c-typeck.cc | 55 +-
gcc/config/bpf/bpf-passes.def | 1 +
gcc/config/bpf/bpf-protos.h | 3 +
gcc/config/bpf/bpf.cc | 24 +
gcc/config/bpf/core-builtins.cc | 637 ++++++++++++++++--
gcc/deferred-cst.cc | 403 +++++++++++
gcc/deferred-cst.h | 54 ++
gcc/gimple-expr.cc | 5 +
gcc/gimple.cc | 3 +-
gcc/gimplify.cc | 5 +
gcc/internal-fn.cc | 18 +
gcc/internal-fn.def | 6 +
gcc/passes.def | 1 +
.../gcc.dg/plugin/deferred_cst-test.c | 80 +++
.../gcc.dg/plugin/deferred_cst_plugin.cc | 619 +++++++++++++++++
gcc/testsuite/gcc.dg/plugin/plugin.exp | 1 +
.../gcc.target/bpf/core-auto-drain-1.c | 29 +
.../gcc.target/bpf/core-auto-enum-value-1.c | 33 +
.../gcc.target/bpf/core-auto-field-offset-1.c | 36 +
gcc/tree-pass.h | 1 +
gcc/tree-pretty-print.cc | 7 +
gcc/tree.def | 10 +
gcc/varasm.cc | 5 +-
26 files changed, 2253 insertions(+), 69 deletions(-)
create mode 100644 gcc/deferred-cst.cc
create mode 100644 gcc/deferred-cst.h
create mode 100644 gcc/testsuite/gcc.dg/plugin/deferred_cst-test.c
create mode 100644 gcc/testsuite/gcc.dg/plugin/deferred_cst_plugin.cc
create mode 100644 gcc/testsuite/gcc.target/bpf/core-auto-drain-1.c
create mode 100644 gcc/testsuite/gcc.target/bpf/core-auto-enum-value-1.c
create mode 100644 gcc/testsuite/gcc.target/bpf/core-auto-field-offset-1.c
--
2.43.0
From yjn@yjn-systems.com Sun Nov 1 02:53:37 2026
From: yjn@yjn-systems.com (York Jasper Niebuhr)
Date: Sun, 1 Nov 2026 03:53:37 +0100
Subject: [PATCH 1/2] c: deferred constant expressions
In-Reply-To: <20261101025158.271216-1-yjn@yjn-systems.com>
References: <20261101025158.271216-1-yjn@yjn-systems.com>
Message-ID: <20261101025337.271337-1-yjn@yjn-systems.com>
Add an opt-in mechanism for preserving select semantic origins of
constant expressions through C frontend folding.
Normally, enum constants and field offsets lose their source-level
identity when the C frontend folds them to INTEGER_CST nodes. Introduce
DEFERRED_CST_EXPR to represent expressions which retain most of normal
constant semantics while postponing their final evaluation.
Consumers can mark RECORD_TYPE and ENUMERAL_TYPE nodes for constant
deferral through the deferred-cst interface. Marking a type has no
effect on the type's C semantics; it only causes selected constants
originating from that type to retain their identity during folding.
For marked enum types, references to enumerators are represented using a
deferred enum-value expression which retains the originating CONST_DECL.
For marked record types, fold_offsetof preserves field offsets using a
deferred field-offset expression which retains the originating
FIELD_DECL. If not types are marked for constant deferral, absolutely
no DEFERRED_CST_EXPRs are ever generated!
c_fully_fold propagates deferred constants through otherwise constant,
side-effect-free expressions. Const-ness checks in static initializers
permit deferred constants. It is the responsibility of the consumer
that marked types for constant deferral to instrument all
DEFERRED_CST_EXPRs before an IPA barrier pass that runs right after
all_lowering_passes. Deferred constants may never survive beyond this
lifetime boundary.
Signed-off-by: York Jasper Niebuhr
cd ${TOP}
-git clone git://gcc.gnu.org/git/gcc.git gcc
+git clone https://gcc.gnu.org/git/gcc.git gcc
# This makes sure that file timestamps are in order initially.
cd ${TOP}/gcc
contrib/gcc_update --touch
--
2.56.0
From yqtian668@gmail.com Sun Nov 1 12:09:11 2026
From: yqtian668@gmail.com (Yongqiang Tian)
Date: Sun, 1 Nov 2026 23:09:11 +1100
Subject: [PATCH] tree-cfg: Ignore debug stmts when checking coverage nops
[PR128346]
Message-ID: <20261101120911.70954-1-yqtian668@gmail.com>
gimple_can_merge_blocks_p checks the final statement of a block for the
compiler-inserted nop that marks a coverage-suppression boundary. A trailing
DEBUG_BEGIN_STMT hides that nop under -g, allows the blocks to be merged, and
changes the gcov CFG checksum even though the generated code is unchanged.
Use gsi_last_nondebug_bb so debug markers do not affect the merge decision.
Add a focused regression test.
The test case was found by a non-AI automated testing tool.
Assisted-by: OpenAI Codex 5.6 Sol.
Bootstrapped and regression tested on x86_64-pc-linux-gnu. The focused
test fails before the change and passes after it.
PR gcov-profile/128346
gcc/ChangeLog:
* tree-cfg.cc (gimple_can_merge_blocks_p): Ignore debug statements
when examining the end of a block.
gcc/testsuite/ChangeLog:
* gcc.misc-tests/gcov-45.c: New test.
Signed-off-by: Yongqiang Tian
---
gcc/testsuite/gcc.misc-tests/gcov-45.c | 19 +++++++++++++++++++
gcc/tree-cfg.cc | 2 +-
2 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gcc.misc-tests/gcov-45.c
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-45.c b/gcc/testsuite/gcc.misc-tests/gcov-45.c
new file mode 100644
index 000000000..c7b223048
--- /dev/null
+++ b/gcc/testsuite/gcc.misc-tests/gcov-45.c
@@ -0,0 +1,19 @@
+/* PR gcov-profile/128346 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -g -fno-thread-jumps -fprofile-arcs -fdump-tree-cfg-details" } */
+
+int bar (int);
+
+#pragma GCC suppress_coverage begin
+int
+foo (int a)
+{
+ a;
+#pragma GCC suppress_coverage end
+ if (a > 3)
+ a = bar (a);
+ return bar (a);
+}
+
+/* A debug marker must not hide the coverage-suppression nop. */
+/* { dg-final { scan-tree-dump-not "Merging blocks 2 and 3" "cfg" } } */
diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc
index ba1d4a125..93a830f0e 100644
--- a/gcc/tree-cfg.cc
+++ b/gcc/tree-cfg.cc
@@ -1874,7 +1874,7 @@ gimple_can_merge_blocks_p (basic_block a, basic_block b)
/* If A ends by a statement causing exceptions or something similar, we
cannot merge the blocks. */
- stmt = *gsi_last_bb (a);
+ stmt = *gsi_last_nondebug_bb (a);
if (stmt && stmt_ends_bb_p (stmt))
return false;
--
2.34.1
From frs.dumont@gmail.com Sun Nov 1 12:53:57 2026
From: frs.dumont@gmail.com (=?UTF-8?Q?Fran=C3=A7ois_Dumont?=)
Date: Sun, 1 Nov 2026 13:53:57 +0100
Subject: [PATCH][_GLIBCXX_DEBUG] Fix _Safe_iterator copy/move semantic PR
127540
In-Reply-To: <7f23aa64-e31d-4132-81c9-3a8ca82607b3@gmail.com>
References: <7f23aa64-e31d-4132-81c9-3a8ca82607b3@gmail.com>
Message-ID:
Note that I already realized that move-constructor should be rather
implemented at _Safe_iterator_base level.
Assignment operators should be too even if it is a little bit more
complicated because lock must be maintained while normal iterator is
being assigned.
Fran?ois
On 10/29/26 23:05, Fran?ois Dumont wrote:
> Hi
>
> Here is what I've come up with so far.
>
> This is clearly not limited to fix of PR 127540 but it does fix it.
>
> This is a big performance improvement for the _GLIBCXX_DEBUG mode. The
> proof is that I managed to run testsuite/23_containers/flat_* tests.
> They were all timeout-ing on my laptop without the patch.
>
> I still need to work on the ChangeLog entry which I copied from your
> RFC Jonathan.
>
> I've also prepared the same for _Safe_local_iterator.
>
> Happy to have some feedback.
>
> ? ? libstdc++: Fix _Safe_iterator copy/move semantic PR 127540
>
> ? ? Currently our safe iterators for debug mode fail to meet the
> requirement
> ? ? that they have a "valid but unspecified" state after being moved
> from.
> ? ? They have a singular and non-copyable state, which means they
> cannot be
> ? ? copied or passed around by value. This is non-conforming.
>
> ? ? Define the moved-from state for our safe iterators to be the same as
> ? ? their value-initialized state. This means they are copyable after
> being
> ? ? moved from.
>
> ? ? The downside of this change is that we no longer diagnose equality
> ? ? comparison with a moved-from iterator, which is undefined behaviour.
> ? ? Because value-initialized iterators can be compared, our moved-from
> ? ? iterators are now also comparable. This seems like an acceptable
> ? ? compromise in order to support copying them (which needs to work).
>
> ? ? If we care about diagnosing invalid comparisons, we would need to
> ? ? introduce a new moved-from state to the iterators. That could then be
> ? ? checked in the iterator's constructors and assignment operators so
> that
> ? ? moved-from iterators are allowed as the source of those
> operations. The
> ? ? new state would not be checked in comparisons so that using them
> would
> ? ? abort, as was the case before this commit, e.g.
>
> /home/jwakely/gcc/17/include/c++/17.0.0/debug/safe_iterator.h:546:
> ? ? ? In function:
> ? ? ? ? ? constexpr bool gnu_debug::operator==(const
> _Safe_iterator ? ? ? ? ? normal_iterator >
> >, std::
> ? ? ? ? ? debug::vector, std::forward_iterator_tag>::_Self&, const
> ? ? ? ? ? _Safe_iterator ? ? ? ? ? std::allocator > >, std::debug::vector,
> ? ? ? ? ? std::forward_iterator_tag>::_Self&)
>
> ? ? ? Error: attempt to compare a singular iterator to a
> dereferenceable iterator.
>
> ? ? libstdc++-v3/ChangeLog:
>
> ? ? ? ? ? ? PR libstdc++/127540
> ? ? ? ? ? ? * config/abi/pre/gnu.ver (GLIBCXX_3.4.37): Add
> _Safe_sequence_base::_M_attach
> ? ? ? ? ? ? and _Safe_sequence_base::_M_attach_single symbols so that
> freshly instantiated
> ? ? ? ? ? ? safe iterators can be attached without going through a
> detach attempt.
> ? ? ? ? ? ? * include/debug/safe_base.h
> ? ? ? ? ? ? (_Safe_iterator_base): Remove implicit C++20 constexpr
> qualification.
> ? ? ? ? ? ? (_Safe_iterator_base::operator=(const
> _Safe_iterator_base&)): New, default.
> ? ? ? ? ? ? (_Safe_iterator_base::_M_get_sequence): New, get sequence
> pointer if not singular.
> ? ? ? ? ? ? (_Safe_iterator_base::_M_attach_only): New.
> ? ? ? ? ? ? (_Safe_iterator_base(const _Safe_sequence_base*, bool)):
> Use latter.
> ? ? ? ? ? ? (_Safe_iterator_base(const _Safe_iterator_base&, bool)):
> Likewise and only copy
> ? ? ? ? ? ? input _Safe_iterator_base _M_sequence and _M_version if
> singular.
> ? ? ? ? ? ? * include/debug/safe_iterator.h:
> ? ? ? ? ? ? (_Safe_iterator(const _Safe_iterator&)): Forward to latter
> _Safe_iterator_base
> ? ? ? ? ? ? constructor.
> ? ? ? ? ? ? (_Safe_iterator<_MutableIte>(const _Safe_iterator<>&)):
> Likewise.
> ? ? ? ? ? ? (_Safe_iterator): Add friend declaration to access mutable
> iterator members
> ? ? ? ? ? ? from the immutable type.
> ? ? ? ? ? ? (_Safe_iterator::_M_move): New, make moved instance
> value-initialized.
> ? ? ? ? ? ? (_Safe_iterator(_Safe_iterator&&, bool)): New.
> ? ? ? ? ? ? (_Safe_iterator(_Safe_iterator&&)): Forward to latter.
> (_Safe_iterator<_MutableIte>(_Safe_iterator<_MutableIte, _Seq, _Cat>&&)):
> ? ? ? ? ? ? Likewise.
> ? ? ? ? ? ? (_Safe_iterator::_M_copy_assign<_Ite>): New.
> ? ? ? ? ? ? (_Safe_iterator::operator=(const _Safe_iterator&)): Call
> latter.
> ? ? ? ? ? ? (_Safe_iterator::operator=<_MutableIte>(const
> _Safe_iterator<>&)): New, likewise.
> ? ? ? ? ? ? (_Safe_iterator::_M_move_assign): New.
> ? ? ? ? ? ? (_Safe_iterator::operator=(_Safe_iterator&&)): Call latter.
> (_Safe_iterator::operator=<_MutableIte>(_Safe_iterator<>&&)): New,
> likewise.
> ? ? ? ? ? ? (_Safe_iterator::_M_attach): Remove.
> ? ? ? ? ? ? (_Safe_iterator::_M_attach_single): Remove.
> ? ? ? ? ? ? * src/c++11/debug.cc (_Safe_iterator_base::_M_attach): Do
> not reset _M_version
> ? ? ? ? ? ? if attaching to a null sequence.
> ? ? ? ? ? ? (_Safe_iterator_base::_M_attach_single): Likewise.
> ? ? ? ? ? ? * testsuite/24_iterators/debug/safe_iterator.cc: New test.
>
> Tested under Linux x86_64 23_containers and 24_iterators tests.
>
> Fran?ois
From torbjorn.svensson@foss.st.com Sun Nov 1 12:59:03 2026
From: torbjorn.svensson@foss.st.com (=?UTF-8?q?Torbj=C3=B6rn=20SVENSSON?=)
Date: Sun, 1 Nov 2026 13:59:03 +0100
Subject: [PATCH] testsuite: Require checking for nested crash tests [PR124872]
Message-ID: <20261101130027.2007793-1-torbjorn.svensson@foss.st.com>
Ok for trunk?
To fix this on releases/gcc-16, a different approach is need.
Kind regards,
Torbj?rn
--
The nested crash tests fail when the compiler is built without checking.
Add a checking effective target and use it to skip these tests.
PR testsuite/124872
gcc/ChangeLog:
* doc/sourcebuild.texi: Document checking.
gcc/testsuite/ChangeLog:
* lib/et-static.def (checking): New effective target.
* gcc.dg/plugin/crash-test-nested-ice.c: Require checking.
* gcc.dg/plugin/crash-test-nested-write-through-null.c: Likewise.
Signed-off-by: Torbj?rn SVENSSON
---
gcc/doc/sourcebuild.texi | 3 +++
gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c | 1 +
.../gcc.dg/plugin/crash-test-nested-write-through-null.c | 1 +
gcc/testsuite/lib/et-static.def | 4 ++++
4 files changed, 9 insertions(+)
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 897be37e450..f4dca33b088 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -3064,6 +3064,9 @@ Target supports automatic stack alignment.
@item branch_cost
Target supports @option{-branch-cost=N}.
+@item checking
+Compiler has been configured with internal checking enabled.
+
@item const_volatile_readonly_section
Target places const volatile variables in readonly sections.
diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c b/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c
index 5a98813896f..eda7c7cfdf6 100644
--- a/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c
+++ b/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target checking } */
/* { dg-skip-if "Target frontend exits early on syntax recovery errors" { hppa*-*-hpux* } } */
/* { dg-additional-options "-fno-report-bug" } */
/* { dg-additional-options "-fplugin-arg-crash_test_plugin-nested" } */
diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-nested-write-through-null.c b/gcc/testsuite/gcc.dg/plugin/crash-test-nested-write-through-null.c
index 3f1277bff16..fa3bdde6d8a 100644
--- a/gcc/testsuite/gcc.dg/plugin/crash-test-nested-write-through-null.c
+++ b/gcc/testsuite/gcc.dg/plugin/crash-test-nested-write-through-null.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target checking } */
/* { dg-skip-if "Target frontend exits early on syntax recovery errors" { hppa*-*-hpux* } } */
/* { dg-additional-options "-fno-report-bug" } */
/* { dg-additional-options "-fplugin-arg-crash_test_plugin-nested" } */
diff --git a/gcc/testsuite/lib/et-static.def b/gcc/testsuite/lib/et-static.def
index b5a32335920..76c9a3e3a0f 100644
--- a/gcc/testsuite/lib/et-static.def
+++ b/gcc/testsuite/lib/et-static.def
@@ -24,6 +24,10 @@
# Keep this sorted alphabetically by effective-target name. */
+checking
+CHECKING_P
+the compiler was built with checking enabled
+
code_6_gottpoff_reloc
HAVE_AS_R_X86_64_CODE_6_GOTTPOFF
assembler and linker support R_X86_64_CODE_6_GOTTPOFF
--
2.43.0
From rdsandiford@googlemail.com Sun Nov 1 13:11:25 2026
From: rdsandiford@googlemail.com (Richard Sandiford)
Date: Sun, 1 Nov 2026 22:11:25 +0900
Subject: [PATCH 1/3] expmed: Extract subvectors via vec_perm_const.
In-Reply-To: <20261030151204.95945-2-rdapp.gcc@gmail.com>
References: <20261030151204.95945-1-rdapp.gcc@gmail.com>
<20261030151204.95945-2-rdapp.gcc@gmail.com>
Message-ID:
On Sat, 31 Oct 2026 at 00:12, Robin Dapp wrote:
> This patch adds a way of extracting vectors from vectors by building a
> consecutive permute pattern for the target to handle.
I think this is ultimately what we should do for all vector-from-vector
extracts, and never use direct optabs. Maybe that's the plan. I realise
it would be a bit of work though.
I agree that this patch can go in on its own though. Some comments below.
>
> gcc/ChangeLog:
>
> * expmed.cc (vec_extract_perm_p): New function.
I think this belongs in optabs-query.cc.
> (extract_vector_from_vector_perm): New function.
> (extract_vector_from_vector): Allow vector extraction via
> permute.
> * expmed.h (vec_extract_perm_p): Declare.
> ---
> gcc/expmed.cc | 105 +++++++++++++++++++++++++++++++++++++++++++++++++-
> gcc/expmed.h | 3 ++
> 2 files changed, 107 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/expmed.cc b/gcc/expmed.cc
> index 367e8af46e5..fcf100df90d 100644
> --- a/gcc/expmed.cc
> +++ b/gcc/expmed.cc
> @@ -747,6 +747,48 @@ store_bit_field_using_insv (const extraction_insn *insv, rtx op0,
> return false;
> }
>
> +/* See if we can extract a vector of mode SUBVEC_MODE from a larger vector
> + of mode VEC_MODE at EXTRACT_IDX. EXTRACT_IDX counts in elements
> + of VEC_MOD and SUBVEC_MODE. If we can, return the possibly punned
VEC_MODE
> + input mode. */
> +
> +opt_machine_mode
> +vec_extract_perm_p (machine_mode vec_mode, machine_mode subvec_mode,
> + poly_uint64 extract_idx)
> +{
> + if (!VECTOR_MODE_P (vec_mode) || !VECTOR_MODE_P (subvec_mode))
> + return opt_machine_mode ();
> +
> + if (maybe_ne (GET_MODE_UNIT_SIZE (vec_mode),
> + GET_MODE_UNIT_SIZE (subvec_mode)))
This can just be !=.
> + return opt_machine_mode ();
> +
> + if (maybe_gt (GET_MODE_NUNITS (subvec_mode) + extract_idx,
> + GET_MODE_NUNITS (vec_mode)))
> + return opt_machine_mode ();
> +
> + /* Look for a matching mode for the vector elements.
> + Do not pun the whole vector with a mode of different element size
> + here (e.g. V2DI and V4SI). We expect a target to do that itself. */
> + if (GET_MODE_INNER (vec_mode) != GET_MODE_INNER (subvec_mode)
> + && !related_vector_mode (vec_mode, GET_MODE_INNER (subvec_mode),
> + GET_MODE_NUNITS (vec_mode)).exists
> + (&vec_mode))
> + return opt_machine_mode ();
> +
> + poly_uint64 out_nunits = GET_MODE_NUNITS (subvec_mode);
> + poly_uint64 in_nunits = GET_MODE_NUNITS (vec_mode);
> +
> + vec_perm_builder sel (out_nunits, 1, 3);
> + for (unsigned int i = 0; i < 3; ++i)
> + sel.quick_push (extract_idx + i);
> +
> + vec_perm_indices indices (sel, 2, in_nunits);
Why is this 2-input rather than 1-input?
> + if (can_vec_perm_const_p (subvec_mode, vec_mode, indices))
> + return vec_mode;
> + return opt_machine_mode ();
> +}
> +
> /* A subroutine of store_bit_field, with the same arguments. Return true
> if the operation could be implemented.
>
> @@ -1698,9 +1740,65 @@ extract_bit_field_as_subreg (machine_mode mode, rtx op0,
> return NULL_RTX;
> }
>
> +/* Same as extract_vector_from_vector but try with a permutation. */
> +
> +static rtx
> +extract_vector_from_vector_perm (rtx vec, rtx target, machine_mode mode,
> + machine_mode subvec_mode, poly_uint64 bitsize,
> + poly_uint64 bitnum, rtx *alt_rtl)
> +{
> + machine_mode vec_mode = GET_MODE (vec);
> + poly_uint64 extract_idx;
> + if (!VECTOR_MODE_P (vec_mode)
> + || MEM_P (vec)
> + || !VECTOR_MODE_P (subvec_mode)
> + || maybe_ne (bitsize, GET_MODE_PRECISION (subvec_mode))
> + || known_le (GET_MODE_SIZE (GET_MODE (vec)),
> + GET_MODE_SIZE (subvec_mode))
known_le doesn't seem right. Extracting a 128-bit vector from a
possibly 128-bit, possibly larger vector should be ok.
But this kind of check is redundant wrt what vec_extract_perm_p checks,
so I think we should just drop it rather than change it.
> + || !multiple_p (bitnum, GET_MODE_UNIT_BITSIZE (subvec_mode),
> + &extract_idx))
> + return NULL_RTX;
> +
> + /* We don't want to handle single-element vector modes here. */
Why not? I think the comment should say, rather than leave the reader
to guess :)
> + if (known_le (GET_MODE_NUNITS (subvec_mode), 1)
> + || known_le (GET_MODE_NUNITS (vec_mode), 1))
> + return NULL_RTX;
> +
> + machine_mode punned_vec_mode;
> + if (!vec_extract_perm_p (vec_mode, subvec_mode, extract_idx).exists
> + (&punned_vec_mode))
> + return NULL_RTX;
> +
> + if (punned_vec_mode != vec_mode)
> + vec = gen_lowpart (punned_vec_mode, vec);
> +
> + poly_uint64 out_nunits = GET_MODE_NUNITS (subvec_mode);
> +
> + vec_perm_builder sel (out_nunits, 1, 3);
> + for (unsigned int i = 0; i < 3; ++i)
> + sel.quick_push (extract_idx + i);
> +
> + rtx tmp = subvec_mode == mode ? target : NULL_RTX;
> + rtx res = expand_vec_perm_const (subvec_mode, vec, vec, sel, BLKmode, tmp);
> + if (!res)
> + return NULL_RTX;
> +
> + if (res == target && alt_rtl)
> + *alt_rtl = target;
> +
> + if (subvec_mode != mode)
> + res = gen_lowpart (mode, res);
> +
> + return res;
> +}
> +
> /* Try to extract a subvector of mode SUBVEC_MODE (which has BITSIZE bits)
> from vector VEC, starting at bit BITNUM, then extract the MODE lowpart of
> - the subvector. Return the result on success or NULL_RTX on failure. */
> + the subvector.
> + If the vec_extract-based attempt failed, build a vector permute to extract
> + the part and hand it to the target.
I think the new sentence should either flow into the existing paragraph
or be a new paragraph.
OK with the above changes if changing to a single-input permute is correct.
Thanks,
Richard
> +
> + Return the result on success or NULL_RTX on failure. */
>
> static rtx
> extract_vector_from_vector (rtx vec, rtx target, machine_mode mode,
> @@ -1755,6 +1853,11 @@ extract_vector_from_vector (rtx vec, rtx target, machine_mode mode,
> }
> }
>
> + rtx res = extract_vector_from_vector_perm (vec, target, mode, subvec_mode,
> + bitsize, bitnum, alt_rtl);
> + if (res)
> + return res;
> +
> return NULL_RTX;
> }
>
> diff --git a/gcc/expmed.h b/gcc/expmed.h
> index b4b44bba1d7..2e2d9009c84 100644
> --- a/gcc/expmed.h
> +++ b/gcc/expmed.h
> @@ -730,6 +730,9 @@ extern rtx expmed_mult_highpart_optab (scalar_int_mode, rtx, rtx, rtx,
> int, int);
> extern rtx expand_rotate_as_vec_perm (machine_mode, rtx, rtx, rtx);
>
> +extern opt_machine_mode vec_extract_perm_p (machine_mode, machine_mode,
> + poly_uint64);
> +
> /* The constant divisor of the last division expanded, reset per function
> by prepare_function_start. */
> extern HOST_WIDE_INT last_div_const;
> --
> 2.56.
From rdsandiford@googlemail.com Sun Nov 1 13:18:57 2026
From: rdsandiford@googlemail.com (Richard Sandiford)
Date: Sun, 1 Nov 2026 22:18:57 +0900
Subject: [PATCH 2/3] vect: Use can_vec_extract.
In-Reply-To: <20261030151204.95945-3-rdapp.gcc@gmail.com>
References: <20261030151204.95945-1-rdapp.gcc@gmail.com>
<20261030151204.95945-3-rdapp.gcc@gmail.com>
Message-ID:
On Sat, 31 Oct 2026 at 00:12, Robin Dapp wrote:
> This connects can_vec_extract and the new vec_extract_perm_p and
> replaces the vectorizer's vec_extract optab checks with it.
> That way it is mostly in sync with what we can actually expand.
> The patch passes a dummy extraction index because we don't know the
> final index yet.
But...
> A side effect of using can_vec_extract instead of a direct check is that
> we perform type punning a bit earlier now in vectorizable_store. This
> leads to slightly different codegen in one case where we had
>
> (set (reg:DI 123) (vec_select:DI (subreg:V2DI (reg:V4SI 121) 0) ...))
> (set (mem:DI ...) (reg:DI 123))
>
> before but now get
>
> (set (reg:DI 125) (vec_select:DI (subreg:V2DI (reg:V4SI 109) 0) ...))
> (set (mem:V2SI ...) (subreg:V2SI (reg:DI 125) 0))
>
> The latter is not recognized as direct DImode store. This is a
> scalar/vector corner case and could be fixed at the target level as well
> as by an RTL optimization. In order not to change too much I made
> can_vec_extract's scalar punning explicit by having it return the
> extract mode.
>
> gcc/ChangeLog:
>
> * optabs-query.cc (can_vec_extract): Query vec_extract_perm_p
> and return extract mode.
> * optabs-query.h (can_vec_extract): Change return type.
> * tree-vect-loop.cc (vect_find_reusable_accumulator): Use
> can_vec_extract.
> (vect_create_partial_epilog): Likewise.
> * tree-vect-stmts.cc (vectorizable_store): Likewise.
> ---
> gcc/optabs-query.cc | 30 +++++++++++++++++++-----------
> gcc/optabs-query.h | 2 +-
> gcc/tree-vect-loop.cc | 17 ++++++++---------
> gcc/tree-vect-stmts.cc | 8 ++------
> 4 files changed, 30 insertions(+), 27 deletions(-)
>
> diff --git a/gcc/optabs-query.cc b/gcc/optabs-query.cc
> index da0d37cf5df..d1f513697af 100644
> --- a/gcc/optabs-query.cc
> +++ b/gcc/optabs-query.cc
> @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
> #include "recog.h"
> #include "vec-perm-indices.h"
> #include "internal-fn.h"
> +#include "expmed.h"
> #include "memmodel.h"
> #include "optabs.h"
>
> @@ -793,32 +794,39 @@ supports_vec_scatter_store_p (machine_mode mode)
> }
>
> /* Whether we can extract part of the vector mode MODE as
> - (scalar or vector) mode EXTR_MODE. */
> + (scalar or vector) mode EXTR_MODE. Returns the extraction mode
> + we would use or no mode. */
>
> -bool
> +opt_machine_mode
> can_vec_extract (machine_mode mode, machine_mode extr_mode)
> {
> unsigned m;
> if (!VECTOR_MODE_P (mode)
> || !constant_multiple_p (GET_MODE_SIZE (mode),
> GET_MODE_SIZE (extr_mode), &m))
> - return false;
> + return opt_machine_mode ();
>
> if (convert_optab_handler (vec_extract_optab, mode, extr_mode)
> != CODE_FOR_nothing)
> - return true;
> + return extr_mode;
>
> /* Besides a direct vec_extract we can also use an element extract from
> an integer vector mode with elements of the size of the extr_mode. */
> scalar_int_mode imode;
> machine_mode vmode;
> - if (!int_mode_for_size (GET_MODE_BITSIZE (extr_mode), 0).exists (&imode)
> - || !related_vector_mode (mode, imode, m).exists (&vmode)
> - || (convert_optab_handler (vec_extract_optab, vmode, imode)
> - == CODE_FOR_nothing))
> - return false;
> - /* We assume we can pun mode to vmode and imode to extr_mode. */
> - return true;
> + if (int_mode_for_size (GET_MODE_BITSIZE (extr_mode), 0).exists (&imode)
> + && related_vector_mode (mode, imode, m).exists (&vmode)
> + && (convert_optab_handler (vec_extract_optab, vmode, imode)
> + != CODE_FOR_nothing))
> + return imode;
> +
> + /* We don't know yet where exactly to extract from, just use
> + the number of units. */
> + if (vec_extract_perm_p (mode, extr_mode, GET_MODE_NUNITS
> + (extr_mode)).exists ())
...why GET_MODE_NUNITS rather than 0, given that 0 should be the most
permissive value? GET_MODE_NUNITS could rule out some valid cases
for VLA vectors, such as extracting an AArch64 AdvSIMD vector from
an SVE vector.
(No other comment on the patch from me.)
Richard
> + return extr_mode;
> +
> + return opt_machine_mode ();
> }
>
> /* OP is either neg_optab or abs_optab and FMODE is the floating-point inner
> diff --git a/gcc/optabs-query.h b/gcc/optabs-query.h
> index faa688a0609..c230ee19aac 100644
> --- a/gcc/optabs-query.h
> +++ b/gcc/optabs-query.h
> @@ -173,7 +173,7 @@ bool supports_vec_gather_load_p (machine_mode = E_VOIDmode,
> bool supports_vec_scatter_store_p (machine_mode = E_VOIDmode);
> opt_machine_mode get_absneg_bit_mode (optab, machine_mode,
> scalar_float_mode, int *);
> -bool can_vec_extract (machine_mode, machine_mode);
> +opt_machine_mode can_vec_extract (machine_mode, machine_mode);
> bool can_open_code_p (optab, machine_mode);
> bool can_implement_p (optab, machine_mode);
>
> diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
> index e8cff98997c..89a3671ab08 100644
> --- a/gcc/tree-vect-loop.cc
> +++ b/gcc/tree-vect-loop.cc
> @@ -5226,7 +5226,10 @@ vect_find_reusable_accumulator (loop_vec_info loop_vinfo,
> || !directly_supported_p (VECT_REDUC_INFO_CODE (reduc_info),
> intermediate_vectype)
> || !can_vec_extract (TYPE_MODE (prev_vectype),
> - TYPE_MODE (intermediate_vectype)))
> + TYPE_MODE (intermediate_vectype)).exists ()
> + /* We could actually extract VLA vectors but bit_field_ref and
> + friends aren't yet prepared for it. */
> + || !TYPE_VECTOR_SUBPARTS (intermediate_vectype).is_constant ())
> return false;
> prev_vectype = intermediate_vectype;
> }
> @@ -5286,10 +5289,8 @@ vect_create_partial_epilog (tree vec_def, tree vectype, code_helper code,
> an integer mode punning. */
> tree dst1, dst2;
> gimple *epilog_stmt;
> - if (convert_optab_handler (vec_extract_optab,
> - TYPE_MODE (TREE_TYPE (new_temp)),
> - TYPE_MODE (vectype1))
> - != CODE_FOR_nothing)
> + if (can_vec_extract (TYPE_MODE (TREE_TYPE (new_temp)),
> + TYPE_MODE (vectype1)).exists ())
> {
> /* Extract sub-vectors directly once vec_extract becomes
> a conversion optab. */
> @@ -5314,10 +5315,8 @@ vect_create_partial_epilog (tree vec_def, tree vectype, code_helper code,
> vector. */
> tree eltype = build_nonstandard_integer_type (bitsize, 1);
> tree etype = build_vector_type (eltype, 2);
> - gcc_assert (convert_optab_handler (vec_extract_optab,
> - TYPE_MODE (etype),
> - TYPE_MODE (eltype))
> - != CODE_FOR_nothing);
> + gcc_assert (can_vec_extract (TYPE_MODE (etype),
> + TYPE_MODE (eltype)).exists ());
> tree tem = make_ssa_name (etype);
> epilog_stmt = gimple_build_assign (tem, VIEW_CONVERT_EXPR,
> build1 (VIEW_CONVERT_EXPR,
> diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
> index b33d3f6b782..7a72a872e67 100644
> --- a/gcc/tree-vect-stmts.cc
> +++ b/gcc/tree-vect-stmts.cc
> @@ -8552,9 +8552,7 @@ vectorizable_store (vec_info *vinfo,
> if (!VECTOR_MODE_P (TYPE_MODE (vectype))
> || !related_vector_mode (TYPE_MODE (vectype), elmode,
> n).exists (&vmode)
> - || (convert_optab_handler (vec_extract_optab,
> - TYPE_MODE (vectype), vmode)
> - == CODE_FOR_nothing)
> + || can_vec_extract (TYPE_MODE (vectype), vmode) != vmode
> || !(dr_align == dr_aligned
> || dr_align == dr_unaligned_supported))
> {
> @@ -8572,9 +8570,7 @@ vectorizable_store (vec_info *vinfo,
> && VECTOR_MODE_P (TYPE_MODE (vectype))
> && related_vector_mode (TYPE_MODE (vectype), elmode,
> lnunits).exists (&vmode)
> - && (convert_optab_handler (vec_extract_optab,
> - vmode, elmode)
> - != CODE_FOR_nothing))
> + && can_vec_extract (vmode, elmode).exists ())
> {
> nstores = lnunits;
> lnel = n;
> --
> 2.56.0
From iains.gcc@gmail.com Sun Nov 1 13:39:40 2026
From: iains.gcc@gmail.com (Iain Sandoe)
Date: Sun, 1 Nov 2026 13:39:40 +0000
Subject: [PATCH 0/2] Fix JIT for Darwin and emulated TLS
Message-ID: <20261101133942.28618-1-iain@sandoe.co.uk>
Currently all Jit TLS access tests fail for several reasons;
1. the builtins needed are not created during startup
2. Darwin needs the "word" type to be available
3. Emulated TLS variables are not exported by name - instead the name of the
control object is exported, so we have to look up via that.
Tested on x86_64-linux, darwin and aarch64-linux, OK for trunk?
thanks,
Iain
Iain Sandoe (2):
jit: Create additional builtins that Darwin uses.
jit: Lookup TLS globals for targets with emulated TLS.
gcc/jit/jit-builtins.cc | 9 +++++-
gcc/jit/jit-result.cc | 70 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 78 insertions(+), 1 deletion(-)
--
2.50.1 (Apple Git-155)
From iains.gcc@gmail.com Sun Nov 1 13:39:41 2026
From: iains.gcc@gmail.com (Iain Sandoe)
Date: Sun, 1 Nov 2026 13:39:41 +0000
Subject: [PATCH 1/2] jit: Create additional builtins that Darwin uses.
In-Reply-To: <20261101133942.28618-1-iain@sandoe.co.uk>
References: <20261101133942.28618-1-iain@sandoe.co.uk>
Message-ID: <20261101133942.28618-2-iain@sandoe.co.uk>
For Darwin (and any other emulated TLS targets) we must initialise the
relevant builtins for the two functions that are used by this.
Darwin also needs the "WORD" type to be registered.
gcc/jit/ChangeLog:
* jit-builtins.cc (builtins_manager::make_primitive_type): Register
word type.
(builtins_manager::ensure_optimization_builtins_exist): For targets
without native TLS, register the builtins for the two functions used
by emulated TLS.
Signed-off-by: Iain Sandoe
---
gcc/jit/jit-builtins.cc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gcc/jit/jit-builtins.cc b/gcc/jit/jit-builtins.cc
index 539ee132393..4d5cbb4aa41 100644
--- a/gcc/jit/jit-builtins.cc
+++ b/gcc/jit/jit-builtins.cc
@@ -483,7 +483,8 @@ builtins_manager::make_primitive_type (enum jit_builtin_type type_id)
case BT_UINT32: return m_ctxt->get_int_type (4, false);
case BT_UINT64: return m_ctxt->get_int_type (8, false);
case BT_UINT128: return m_ctxt->get_int_type (16, false);
- // case BT_WORD:
+ case BT_WORD:
+ return m_ctxt->get_int_type (GET_MODE_SIZE (word_mode), false);
// case BT_UNWINDWORD:
case BT_FLOAT: return m_ctxt->get_type (GCC_JIT_TYPE_FLOAT);
case BT_DOUBLE: return m_ctxt->get_type (GCC_JIT_TYPE_DOUBLE);
@@ -620,6 +621,12 @@ builtins_manager::ensure_optimization_builtins_exist ()
(void)get_builtin_function_by_id (BUILT_IN_CTZL);
(void)get_builtin_function_by_id (BUILT_IN_CLZLL);
(void)get_builtin_function_by_id (BUILT_IN_CTZLL);
+ if (!targetm.have_tls)
+ {
+ /* Targets without native TLS may use the emulated model. */
+ (void)get_builtin_function_by_id (BUILT_IN_EMUTLS_GET_ADDRESS);
+ (void)get_builtin_function_by_id (BUILT_IN_EMUTLS_REGISTER_COMMON);
+ }
}
/* Playback support. */
--
2.50.1 (Apple Git-155)
From iains.gcc@gmail.com Sun Nov 1 13:39:42 2026
From: iains.gcc@gmail.com (Iain Sandoe)
Date: Sun, 1 Nov 2026 13:39:42 +0000
Subject: [PATCH 2/2] jit: Lookup TLS globals for targets with emulated TLS.
In-Reply-To: <20261101133942.28618-2-iain@sandoe.co.uk>
References: <20261101133942.28618-1-iain@sandoe.co.uk>
<20261101133942.28618-2-iain@sandoe.co.uk>
Message-ID: <20261101133942.28618-3-iain@sandoe.co.uk>
For glibc targets with native TLS, the C library automatically indirects
the symbol lookup through the TLS machinery.
For emulated TLS we have to do a similar process, but we have no way to
tell that the symbol is TLS. So the strategy is to try to look it up as
a regular global and, if that fails, try to look up the name of the
corresponding control object, if that succeeds we have a TLS var of that
name and we can collect its address in the usual manner.
gcc/jit/ChangeLog:
* jit-result.cc (EMUTLS_SEPARATOR): New.
(get_emulated_tls_global): New.
(get_global): If an initial attempt to find a global fails and the
target is using emulated TLS, try looking the corresponding control
object and resolving the object address from that.
Signed-off-by: Iain Sandoe
---
gcc/jit/jit-result.cc | 70 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/gcc/jit/jit-result.cc b/gcc/jit/jit-result.cc
index f48f2eddc74..78284830cb8 100644
--- a/gcc/jit/jit-result.cc
+++ b/gcc/jit/jit-result.cc
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#define INCLUDE_DLFCN_H
#include "system.h"
#include "coretypes.h"
+#include "target.h"
#include "jit-common.h"
#include "jit-logging.h"
@@ -104,6 +105,61 @@ get_code (const char *funcname)
return code;
}
+#ifndef _WIN32
+/* Emulated TLS has no exported symbol for the variable itself. What is
+ exported is the control object, so we need to first look to see if there
+ is a control object for the named var; if there is we can then translate
+ the address. Control object name composition copied from tree-emutls.cc. */
+
+#if !defined (NO_DOT_IN_LABEL)
+# define EMUTLS_SEPARATOR "."
+#elif !defined (NO_DOLLAR_IN_LABEL)
+# define EMUTLS_SEPARATOR "$"
+#else
+# define EMUTLS_SEPARATOR "_"
+#endif
+
+static void *
+get_emulated_tls_global (void *dso_handle, const char *name)
+{
+ const char *prefix = (targetm.emutls.var_prefix
+ ? targetm.emutls.var_prefix
+ : "__emutls_v" EMUTLS_SEPARATOR);
+ char *control_name = concat (prefix, name, NULL);
+ /* Look this up and exit early if it is not available. */
+ void *control = dlsym (dso_handle, control_name);
+ free (control_name);
+ if (!control)
+ return NULL;
+
+ /* We have to call get_address function to translate the emulated TLS
+ control object address to a pointer the actual var. */
+ const char *fn_name;
+ if (targetm.emutls.get_address)
+ {
+ fn_name = targetm.emutls.get_address;
+ if (strncmp (fn_name, "__builtin_", 10) == 0)
+ fn_name += 10;
+ }
+ else
+ fn_name = "__emutls_get_address";
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wconditionally-supported"
+ /* We need the function pointer here, but we need to look up the version
+ that the dynamic linker resolved - which is most likely not in the same
+ DSO as the variable we are looking up. */
+ using fn_t = void * (*) (void*);
+ auto get_address_fn
+ = reinterpret_cast (dlsym (RTLD_DEFAULT, fn_name));
+#pragma GCC diagnostic pop
+ if (!get_address_fn)
+ return NULL;
+
+ return get_address_fn (control);
+}
+#endif /* !_WIN32 */
+
/* Attempt to locate the given global by name within the
playback::result, using dlsym.
@@ -133,6 +189,20 @@ get_global (const char *name)
global = dlsym (m_dso_handle, name);
+ if (!global && !targetm.have_tls)
+ {
+ /* Under emulated TLS there is no symbol for the variable itself, so the
+ global lookup above fails. The only way to tell if there is a TLS var
+ with this name is by trying to look it up via its control object. */
+ void *tls_global = get_emulated_tls_global (m_dso_handle, name);
+ if (tls_global)
+ {
+ /* Discard the "symbol not found" error from the failed lookup. */
+ dlerror ();
+ return tls_global;
+ }
+ }
+
if ((error = dlerror()) != NULL) {
fprintf(stderr, "%s\n", error);
}
--
2.50.1 (Apple Git-155)
From iains.gcc@gmail.com Sun Nov 1 13:41:47 2026
From: iains.gcc@gmail.com (Iain Sandoe)
Date: Sun, 1 Nov 2026 13:41:47 +0000
Subject: [PATCH] jit, testsuite: Fix bfloat16 tests.
Message-ID: <20261101134155.28797-1-iain@sandoe.co.uk>
Tested on x86_64,aarch64-linux (one progression on aarch64) and on
x86_64-darwin, OK for trunk?
thanks,
Iain
--- 8< ---
These were failing on build on any non-x86 platform because of the
unconditional inclusion . Additionaly the bfloat16
cases were behind HAVE_BFmode which is not a define available to the
testsuite. Use a compiler pre-define for this.
gcc/testsuite/ChangeLog:
* jit.dg/test-types.c: Remove unneeded header, gate bfloat16
tests on an compiler pre-define that is present when it is
supported.
Signed-off-by: Iain Sandoe
---
gcc/testsuite/jit.dg/test-types.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/jit.dg/test-types.c b/gcc/testsuite/jit.dg/test-types.c
index e5c2b77112c..bd59c11deb9 100644
--- a/gcc/testsuite/jit.dg/test-types.c
+++ b/gcc/testsuite/jit.dg/test-types.c
@@ -1,4 +1,3 @@
-#include
#include
#include
#include
@@ -521,8 +520,8 @@ verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
CHECK_VALUE (gcc_jit_type_get_size (gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_FLOAT)), sizeof (float));
CHECK_VALUE (gcc_jit_type_get_size (gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_DOUBLE)), sizeof (double));
-#ifdef HAVE_BFmode
- CHECK_VALUE (gcc_jit_type_get_size (gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_BFLOAT16)), sizeof (__bfloat16));
+#ifdef __BFLT16_MANT_DIG__
+ CHECK_VALUE (gcc_jit_type_get_size (gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_BFLOAT16)), sizeof (__bf16));
#endif
gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
--
2.50.1 (Apple Git-155)
From Dipesh.Sharma@amd.com Sun Nov 1 13:47:52 2026
From: Dipesh.Sharma@amd.com (Dipesh Sharma)
Date: Sun, 1 Nov 2026 19:17:52 +0530
Subject: [PATCH v3 0/4][X86] Add support for AVX10V1AUX.
Message-ID: <20261101134756.351245-1-Dipesh.Sharma@amd.com>
This patch series adds support for AVX10V1AUX.
This revision addresses the comments on the
previous(V2) revision: https://gcc.gnu.org/pipermail/gcc-patches/2026-October/736257.html
Dipesh Sharma (4):
[X86]: Initial support for AVX10V1AUX
[X86]: Move shared AVX10.2 convert intrinsics to AVX10V1AUX.
[X86]: Move shared AVX10.2 and VNNI byte and word intrinsics to
AVX10V1AUX.
[X86]: Add AVX10V1AUX tests for VNNIINT8/16.
gcc/common/config/i386/cpuinfo.h | 15 +-
gcc/common/config/i386/i386-common.cc | 27 +-
gcc/common/config/i386/i386-cpuinfo.h | 1 +
gcc/common/config/i386/i386-isas.h | 2 +
gcc/config.gcc | 2 +-
gcc/config/i386/avx10_2convertintrin.h | 1376 ---------
gcc/config/i386/avx10_2mediaintrin.h | 1032 -------
gcc/config/i386/avx10v1auxintrin.h | 2459 +++++++++++++++++
gcc/config/i386/cpuid.h | 1 +
gcc/config/i386/i386-builtin.def | 308 +--
gcc/config/i386/i386-c.cc | 2 +
gcc/config/i386/i386-expand.cc | 8 +-
gcc/config/i386/i386-isa.def | 1 +
gcc/config/i386/i386-options.cc | 4 +-
gcc/config/i386/i386.cc | 4 +-
gcc/config/i386/i386.h | 5 +-
gcc/config/i386/i386.md | 4 +-
gcc/config/i386/i386.opt | 5 +
gcc/config/i386/i386.opt.urls | 3 +
gcc/config/i386/immintrin.h | 2 +
gcc/config/i386/sse.md | 162 +-
gcc/doc/extend.texi | 5 +
gcc/doc/invoke.texi | 8 +-
gcc/doc/sourcebuild.texi | 3 +
gcc/testsuite/gcc.target/i386/avx-1.c | 2 +-
.../gcc.target/i386/avx10_2-builtin-1.c | 2 +-
.../gcc.target/i386/avx10_2-builtin-2.c | 2 +-
gcc/testsuite/gcc.target/i386/avx10v1aux-1a.c | 375 +++
gcc/testsuite/gcc.target/i386/avx10v1aux-1b.c | 267 ++
gcc/testsuite/gcc.target/i386/funcspec-56.inc | 2 +
gcc/testsuite/gcc.target/i386/sse-13.c | 2 +-
gcc/testsuite/gcc.target/i386/sse-14.c | 2 +-
gcc/testsuite/gcc.target/i386/sse-22.c | 2 +-
gcc/testsuite/gcc.target/i386/sse-23.c | 2 +-
gcc/testsuite/lib/target-supports.exp | 13 +
35 files changed, 3441 insertions(+), 2669 deletions(-)
create mode 100644 gcc/config/i386/avx10v1auxintrin.h
create mode 100644 gcc/testsuite/gcc.target/i386/avx10v1aux-1a.c
create mode 100644 gcc/testsuite/gcc.target/i386/avx10v1aux-1b.c
--
2.34.1
From Dipesh.Sharma@amd.com Sun Nov 1 13:47:53 2026
From: Dipesh.Sharma@amd.com (Dipesh Sharma)
Date: Sun, 1 Nov 2026 19:17:53 +0530
Subject: [PATCH v3 1/4] [X86]: Initial support for AVX10V1AUX
In-Reply-To: <20261101134756.351245-1-Dipesh.Sharma@amd.com>
References: <20261101134756.351245-1-Dipesh.Sharma@amd.com>
Message-ID: <20261101134756.351245-2-Dipesh.Sharma@amd.com>
AVX10.2 now implies AVX10V1AUX.
gcc/ChangeLog:
* common/config/i386/cpuinfo.h (get_available_features): Add AVX10V1AUX.
* common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AVX10V1AUX_SET): New.
(OPTION_MASK_ISA2_AVX10_1_UNSET): Disable AVX10V1AUX.
(OPTION_MASK_ISA2_AVX10V2AUX_UNSET): Disable ACEV1.
(OPTION_MASK_ISA2_AVX10V1AUX_UNSET): Disable ACEV1.
(ix86_handle_option): Handle AVX10V1AUX.
* common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_AVX10V1AUX.
* common/config/i386/i386-isas.h: Handle avx10v1aux.
* config/i386/cpuid.h (bit_AVX10V1AUX): New.
* config/i386/i386-c.cc (ix86_target_macros_internal): Handle avx10v1aux.
* config/i386/i386-isa.def (AVX10V1AUX): New.
* config/i386/i386-options.cc (ix86_valid_target_attribute_inner_p): Handle Ditto..
* config/i386/i386.h: Add PTA_AVX10V1AUX to targets using
PTA_AVX10_2.
* config/i386/i386.opt: Add avx10v1aux.
* config/i386/i386.opt.urls: Regenerated.
* doc/extend.texi: Add avx10v1aux documentation.
* doc/invoke.texi: Ditto.
* doc/sourcebuild.texi: Ditto.
Co-authored-by: Venkataramanan Kumar
---
gcc/common/config/i386/cpuinfo.h | 15 +++++++++++----
gcc/common/config/i386/i386-common.cc | 27 ++++++++++++++++++++++++---
gcc/common/config/i386/i386-cpuinfo.h | 1 +
gcc/common/config/i386/i386-isas.h | 2 ++
gcc/config/i386/cpuid.h | 1 +
gcc/config/i386/i386-c.cc | 2 ++
gcc/config/i386/i386-isa.def | 1 +
gcc/config/i386/i386-options.cc | 4 +++-
gcc/config/i386/i386.h | 5 +++--
gcc/config/i386/i386.opt | 5 +++++
gcc/config/i386/i386.opt.urls | 3 +++
gcc/doc/extend.texi | 5 +++++
gcc/doc/invoke.texi | 8 +++++++-
gcc/doc/sourcebuild.texi | 3 +++
14 files changed, 71 insertions(+), 11 deletions(-)
diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h
index f433810457b9..bc660a803af1 100644
--- a/gcc/common/config/i386/cpuinfo.h
+++ b/gcc/common/config/i386/cpuinfo.h
@@ -837,7 +837,7 @@ get_available_features (struct __processor_model *cpu_model,
int has_kl = 0;
/* Record AVX10 version. */
int avx10_set = 0;
- int ace_set = 0, avx10v2aux_set = 0;
+ int ace_set = 0, avx10v2aux_set = 0, avx10v1aux_set = 0;
int version = 0;
if ((ecx & bit_OSXSAVE))
{
@@ -1169,13 +1169,20 @@ get_available_features (struct __processor_model *cpu_model,
set_feature (FEATURE_AVX10V2AUX);
avx10v2aux_set = 1;
}
+ if (ecx & bit_AVX10V1AUX)
+ {
+ set_feature (FEATURE_AVX10V1AUX);
+ avx10v1aux_set = 1;
+ }
}
}
/* Get Advanced Features at level 0x1d (eax = 0x1d).
- ACE check must be put after AVX10 check to get AVX10 features.
- TODO: Change the condition after AVX10V1AUX is added. */
- if (version >= 2 && avx10v2aux_set && ace_set && max_cpuid_level >= 0x1d)
+ ACE check must be put after AVX10 check to get AVX10 features. */
+ if (((avx10v1aux_set && version >= 1) || version >= 2)
+ && avx10v2aux_set
+ && ace_set
+ && max_cpuid_level >= 0x1d)
{
__cpuid_count (0x1d, 0, eax, ebx, ecx, edx);
if (eax == 2)
diff --git a/gcc/common/config/i386/i386-common.cc b/gcc/common/config/i386/i386-common.cc
index ed126f4c70dc..2ca4f9a911e8 100644
--- a/gcc/common/config/i386/i386-common.cc
+++ b/gcc/common/config/i386/i386-common.cc
@@ -129,7 +129,8 @@ along with GCC; see the file COPYING3. If not see
(OPTION_MASK_ISA2_AVX512FP16_SET | OPTION_MASK_ISA2_AVX512BF16_SET \
| OPTION_MASK_ISA2_AVX10_1)
#define OPTION_MASK_ISA2_AVX10_2_SET \
- (OPTION_MASK_ISA2_AVX10_1_SET | OPTION_MASK_ISA2_AVX10_2)
+ (OPTION_MASK_ISA2_AVX10_1_SET | OPTION_MASK_ISA2_AVX10V1AUX_SET \
+ | OPTION_MASK_ISA2_AVX10_2)
#define OPTION_MASK_ISA2_AMX_AVX512_SET \
(OPTION_MASK_ISA2_AMX_TILE_SET | OPTION_MASK_ISA2_AMX_AVX512)
#define OPTION_MASK_ISA2_AMX_FP8_SET \
@@ -142,6 +143,8 @@ along with GCC; see the file COPYING3. If not see
(OPTION_MASK_ISA2_AVX10_1_SET | OPTION_MASK_ISA2_AVX10V2AUX)
#define OPTION_MASK_ISA2_ACEV1_SET \
(OPTION_MASK_ISA2_AVX10V2AUX_SET | OPTION_MASK_ISA2_ACEV1)
+#define OPTION_MASK_ISA2_AVX10V1AUX_SET \
+ (OPTION_MASK_ISA2_AVX10_1_SET | OPTION_MASK_ISA2_AVX10V1AUX)
/* SSE4 includes both SSE4.1 and SSE4.2. -msse4 should be the same
as -msse4.2. */
@@ -328,7 +331,7 @@ along with GCC; see the file COPYING3. If not see
#define OPTION_MASK_ISA2_USER_MSR_UNSET OPTION_MASK_ISA2_USER_MSR
#define OPTION_MASK_ISA2_AVX10_1_UNSET \
(OPTION_MASK_ISA2_AVX10_1 | OPTION_MASK_ISA2_AVX10_2_UNSET \
- | OPTION_MASK_ISA2_AVX10V2AUX_UNSET)
+ | OPTION_MASK_ISA2_AVX10V2AUX_UNSET | OPTION_MASK_ISA2_AVX10V1AUX_UNSET)
#define OPTION_MASK_ISA2_AVX10_2_UNSET OPTION_MASK_ISA2_AVX10_2
#define OPTION_MASK_ISA2_AMX_AVX512_UNSET OPTION_MASK_ISA2_AMX_AVX512
#define OPTION_MASK_ISA2_AMX_FP8_UNSET OPTION_MASK_ISA2_AMX_FP8
@@ -338,6 +341,9 @@ along with GCC; see the file COPYING3. If not see
#define OPTION_MASK_ISA2_AVX10V2AUX_UNSET \
(OPTION_MASK_ISA2_AVX10V2AUX | OPTION_MASK_ISA2_ACEV1_UNSET)
#define OPTION_MASK_ISA2_ACEV1_UNSET OPTION_MASK_ISA2_ACEV1
+#define OPTION_MASK_ISA2_AVX10V1AUX_UNSET \
+ (OPTION_MASK_ISA2_AVX10V1AUX | OPTION_MASK_ISA2_AVX10_2_UNSET \
+ | OPTION_MASK_ISA2_ACEV1_UNSET)
/* SSE4 includes both SSE4.1 and SSE4.2. -mno-sse4 should the same
as -mno-sse4.1. */
@@ -1422,7 +1428,7 @@ ix86_handle_option (struct gcc_options *opts,
}
return true;
- case OPT_mavx10v2aux:
+ case OPT_mavx10v2aux:
if (value)
{
opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_AVX10V2AUX_SET;
@@ -1437,6 +1443,21 @@ ix86_handle_option (struct gcc_options *opts,
}
return true;
+ case OPT_mavx10v1aux:
+ if (value)
+ {
+ opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_AVX10V1AUX_SET;
+ opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA2_AVX10V1AUX_SET;
+ opts->x_ix86_isa_flags |= OPTION_MASK_ISA_AVX10_1_SET;
+ opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_AVX10_1_SET;
+ }
+ else
+ {
+ opts->x_ix86_isa_flags2 &= ~OPTION_MASK_ISA2_AVX10V1AUX_UNSET;
+ opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA2_AVX10V1AUX_UNSET;
+ }
+ return true;
+
case OPT_mamx_avx512:
if (value)
{
diff --git a/gcc/common/config/i386/i386-cpuinfo.h b/gcc/common/config/i386/i386-cpuinfo.h
index ed989667e020..e75b18bda227 100644
--- a/gcc/common/config/i386/i386-cpuinfo.h
+++ b/gcc/common/config/i386/i386-cpuinfo.h
@@ -285,6 +285,7 @@ enum processor_features
FEATURE_AVX512BMM,
FEATURE_AVX10V2AUX,
FEATURE_ACEV1,
+ FEATURE_AVX10V1AUX,
CPU_FEATURE_MAX
};
diff --git a/gcc/common/config/i386/i386-isas.h b/gcc/common/config/i386/i386-isas.h
index 171226ab07b7..f4a9fbad6bfc 100644
--- a/gcc/common/config/i386/i386-isas.h
+++ b/gcc/common/config/i386/i386-isas.h
@@ -194,4 +194,6 @@ ISA_NAMES_TABLE_START
ISA_NAMES_TABLE_ENTRY("avx10v2aux", FEATURE_AVX10V2AUX, P_NONE,
"-mavx10v2aux")
ISA_NAMES_TABLE_ENTRY("acev1", FEATURE_ACEV1, P_NONE, "-macev1")
+ ISA_NAMES_TABLE_ENTRY("avx10v1aux", FEATURE_AVX10V1AUX, P_NONE,
+ "-mavx10v1aux")
ISA_NAMES_TABLE_END
diff --git a/gcc/config/i386/cpuid.h b/gcc/config/i386/cpuid.h
index c40970df872d..6f33927b50a9 100644
--- a/gcc/config/i386/cpuid.h
+++ b/gcc/config/i386/cpuid.h
@@ -173,6 +173,7 @@
/* AVX10 sub leaf (%eax == 0x24, %ecx == 1) */
/* %ecx */
+#define bit_AVX10V1AUX (1 << 2)
#define bit_AVX10V2AUX (1 << 3)
/* AMX sub leaf (%eax == 0x1e, %ecx == 1) */
diff --git a/gcc/config/i386/i386-c.cc b/gcc/config/i386/i386-c.cc
index f6a4093c2776..6750332ee9cf 100644
--- a/gcc/config/i386/i386-c.cc
+++ b/gcc/config/i386/i386-c.cc
@@ -794,6 +794,8 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag,
def_or_undef (parse_in, "__AVX10V2AUX__");
if (isa_flag2 & OPTION_MASK_ISA2_ACEV1)
def_or_undef (parse_in, "__ACEV1__");
+ if (isa_flag2 & OPTION_MASK_ISA2_AVX10V1AUX)
+ def_or_undef (parse_in, "__AVX10V1AUX__");
if (TARGET_IAMCU)
{
def_or_undef (parse_in, "__iamcu");
diff --git a/gcc/config/i386/i386-isa.def b/gcc/config/i386/i386-isa.def
index 28835b1d542e..9803ad6b6f11 100644
--- a/gcc/config/i386/i386-isa.def
+++ b/gcc/config/i386/i386-isa.def
@@ -127,3 +127,4 @@ DEF_PTA(AMX_MOVRS)
DEF_PTA(AVX512BMM)
DEF_PTA(AVX10V2AUX)
DEF_PTA(ACEV1)
+DEF_PTA(AVX10V1AUX)
diff --git a/gcc/config/i386/i386-options.cc b/gcc/config/i386/i386-options.cc
index ebd86f71f93a..27c3db38ad7a 100644
--- a/gcc/config/i386/i386-options.cc
+++ b/gcc/config/i386/i386-options.cc
@@ -276,7 +276,8 @@ static struct ix86_target_opts isa2_opts[] =
{ "-mamx-movrs", OPTION_MASK_ISA2_AMX_MOVRS },
{ "-mavx512bmm", OPTION_MASK_ISA2_AVX512BMM },
{ "-mavx10v2aux", OPTION_MASK_ISA2_AVX10V2AUX },
- { "-macev1", OPTION_MASK_ISA2_ACEV1 }
+ { "-macev1", OPTION_MASK_ISA2_ACEV1 },
+ { "-mavx10v1aux", OPTION_MASK_ISA2_AVX10V1AUX }
};
static struct ix86_target_opts isa_opts[] =
{
@@ -1143,6 +1144,7 @@ ix86_valid_target_attribute_inner_p (tree fndecl, tree args, char *p_strings[],
IX86_ATTR_ISA ("avx512bmm", OPT_mavx512bmm),
IX86_ATTR_ISA ("avx10v2aux", OPT_mavx10v2aux),
IX86_ATTR_ISA ("acev1", OPT_macev1),
+ IX86_ATTR_ISA ("avx10v1aux", OPT_mavx10v1aux),
/* enum options */
IX86_ATTR_ENUM ("fpmath=", OPT_mfpmath_),
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 47725c560906..aeaa057d3bd5 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -2510,12 +2510,13 @@ constexpr wide_int_bitmask PTA_PANTHERLAKE =
constexpr wide_int_bitmask PTA_DIAMONDRAPIDS = PTA_GRANITERAPIDS_D
| PTA_AVXIFMA | PTA_AVXNECONVERT | PTA_AVXVNNIINT16 | PTA_AVXVNNIINT8
| PTA_CMPCCXADD | PTA_SHA512 | PTA_SM3 | PTA_SM4 | PTA_AVX10_2
- | PTA_APX_F | PTA_AMX_AVX512 | PTA_AMX_FP8 | PTA_MOVRS | PTA_AMX_MOVRS;
+ | PTA_APX_F | PTA_AMX_AVX512 | PTA_AMX_FP8 | PTA_MOVRS | PTA_AMX_MOVRS
+ | PTA_AVX10V1AUX;
constexpr wide_int_bitmask PTA_NOVALAKE = PTA_PANTHERLAKE | PTA_PREFETCHI
| PTA_AVX512F | PTA_AVX512CD | PTA_AVX512VL | PTA_AVX512BW | PTA_AVX512DQ
| PTA_AVX512VBMI | PTA_AVX512IFMA | PTA_AVX512VNNI | PTA_AVX512VBMI2
| PTA_AVX512BITALG | PTA_AVX512VPOPCNTDQ | PTA_AVX512FP16 | PTA_AVX512BF16
- | PTA_AVX10_1 | PTA_AVX10_2 | PTA_APX_F | PTA_MOVRS;
+ | PTA_AVX10_1 | PTA_AVX10_2 | PTA_APX_F | PTA_MOVRS | PTA_AVX10V1AUX;
constexpr wide_int_bitmask PTA_BDVER1 = PTA_64BIT | PTA_MMX | PTA_SSE
| PTA_SSE2 | PTA_SSE3 | PTA_SSE4A | PTA_CX16 | PTA_POPCNT | PTA_LZCNT
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index f9aeeac08faf..740a08f80752 100644
--- a/gcc/config/i386/i386.opt
+++ b/gcc/config/i386/i386.opt
@@ -1399,3 +1399,8 @@ macev1
Target Mask(ISA2_ACEV1) Var(ix86_isa_flags2) Save
Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2,
AVX10.1 and ACEV1 built-in functions and code generation.
+
+mavx10v1aux
+Target Mask(ISA2_AVX10V1AUX) Var(ix86_isa_flags2) Save
+Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2,
+AVX10.1 and AVX10V1AUX built-in functions and code generation.
diff --git a/gcc/config/i386/i386.opt.urls b/gcc/config/i386/i386.opt.urls
index 5cfa30c07e3b..304cd67c5aab 100644
--- a/gcc/config/i386/i386.opt.urls
+++ b/gcc/config/i386/i386.opt.urls
@@ -641,3 +641,6 @@ UrlSuffix(gcc/x86-Options.html#index-mavx10v2aux)
macev1
UrlSuffix(gcc/x86-Options.html#index-macev1)
+mavx10v1aux
+UrlSuffix(gcc/x86-Options.html#index-mavx10v1aux)
+
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 9b6161334680..09261ea611d1 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -9575,6 +9575,11 @@ Enable/disable the generation of the AVX10V2AUX instructions.
@itemx no-acev1
Enable/disable the generation of the ACEV1 instructions.
+@atindex @code{target("avx10v1aux")}, x86
+@item avx10v1aux
+@itemx no-avx10v1aux
+Enable/disable the generation of the AVX10V1AUX instructions.
+
@atindex @code{target("cld")}, x86
@item cld
@itemx no-cld
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f89b984fd25f..4ee15dee1df2 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1553,7 +1553,7 @@ See RS/6000 and PowerPC Options.
-mavxneconvert -mcmpccxadd -mamx-fp16 -mprefetchi -mraoint
-mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mapxf
-musermsr -mavx10.1 -mavx10.2 -mamx-avx512 -mmovrs -mamx-movrs
--mavx512bmm -mavx10v2aux -macev1
+-mavx512bmm -mavx10v2aux -macev1 -mavx10v1aux
-mcldemote -mms-bitfields -mno-align-stringops -minline-all-stringops
-minline-stringops-dynamically -mstringop-strategy=@var{alg}
-mkl -mwidekl
@@ -36382,6 +36382,12 @@ AVX10.1 and AVX10V2AUX built-in functions and code generation.
@item -macev1
Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2,
AVX10.1 and ACEV1 built-in functions and code generation.
+
+@opindex mavx10v1aux
+@opindex mno-avx10v1aux
+@item -mavx10v1aux
+Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2,
+AVX10.1 and AVX10V1AUX built-in functions and code generation.
@end table
These additional options are available for the x86 processor family.
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 3aa9fcbb5778..755494751e18 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2718,6 +2718,9 @@ Target supports the execution of @code{avx} instructions.
@item avx10v2aux
Target supports the execution of @code{avx10v2aux} instructions.
+@item avx10v1aux
+Target supports the execution of @code{avx10v1aux} instructions.
+
@item avx10.1
Target supports the execution of @code{avx10.1} instructions.
--
2.34.1
From Dipesh.Sharma@amd.com Sun Nov 1 13:47:56 2026
From: Dipesh.Sharma@amd.com (Dipesh Sharma)
Date: Sun, 1 Nov 2026 19:17:56 +0530
Subject: [PATCH v3 4/4] [X86]: Add AVX10V1AUX tests for VNNIINT8/16.
In-Reply-To: <20261101134756.351245-1-Dipesh.Sharma@amd.com>
References: <20261101134756.351245-1-Dipesh.Sharma@amd.com>
Message-ID: <20261101134756.351245-5-Dipesh.Sharma@amd.com>
Since avx10.2 implies avx10v1aux, I feel passing avx10v1aux on
top of avx10.2 in several testfiles{ e.g. sse-*.c} is redundant.
gcc/testsuite/ChangeLog:
* gcc.target/i386/avx-1.c: Rename header avx10v1aux builtins.
* gcc.target/i386/avx10_2-builtin-1.c: Check builtins under avx10v1aux.
* gcc.target/i386/avx10_2-builtin-2.c: Likewise.
* gcc.target/i386/sse-13.c: Rename header avx10v1aux builtins.
* gcc.target/i386/sse-14.c: Likewise.
* gcc.target/i386/sse-22.c: Likewise.
* gcc.target/i386/sse-23.c: Likewise.
* lib/target-supports.exp: Add more check for avx10v1aux.
* gcc.target/i386/avx10v1aux-1b.c: New test.
Co-authored-by: Venkataramanan Kumar
---
gcc/testsuite/gcc.target/i386/avx-1.c | 2 +-
.../gcc.target/i386/avx10_2-builtin-1.c | 2 +-
.../gcc.target/i386/avx10_2-builtin-2.c | 2 +-
gcc/testsuite/gcc.target/i386/avx10v1aux-1b.c | 267 ++++++++++++++++++
gcc/testsuite/gcc.target/i386/sse-13.c | 2 +-
gcc/testsuite/gcc.target/i386/sse-14.c | 2 +-
gcc/testsuite/gcc.target/i386/sse-22.c | 2 +-
gcc/testsuite/gcc.target/i386/sse-23.c | 2 +-
gcc/testsuite/lib/target-supports.exp | 4 +-
9 files changed, 277 insertions(+), 8 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/i386/avx10v1aux-1b.c
diff --git a/gcc/testsuite/gcc.target/i386/avx-1.c b/gcc/testsuite/gcc.target/i386/avx-1.c
index 7a8e5cc2301f..ec21ef4f43c9 100644
--- a/gcc/testsuite/gcc.target/i386/avx-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-1.c
@@ -848,7 +848,7 @@
#define __builtin_ia32_mpsadbw256_mask(A, B, C, D, E) __builtin_ia32_mpsadbw256_mask (A, B, 1, D, E)
#define __builtin_ia32_mpsadbw128_mask(A, B, C, D, E) __builtin_ia32_mpsadbw128_mask (A, B, 1, D, E)
-/* avx10_2convertintrin.h */
+/* avx10v1auxintrin.h */
#define __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, E) __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, 8)
/* avx10_2bf16intrin.h */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-builtin-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-builtin-1.c
index 2c793cfa0a98..867a439364b1 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-builtin-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-builtin-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -march=x86-64-v3 -mavx10.2 -mno-avxvnniint8" } */
+/* { dg-options "-O0 -march=x86-64-v3 -mavx10v1aux -mno-avx10.2 -mno-avxvnniint8" } */
typedef int v8si __attribute__ ((vector_size (32)));
v8si
foo (v8si a, v8si b, v8si c)
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-builtin-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-builtin-2.c
index 6eeb20e034f0..73e32fe4f9fa 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-builtin-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-builtin-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -march=x86-64-v3 -mavx10.2 -mno-avxvnniint16" } */
+/* { dg-options "-O0 -march=x86-64-v3 -mavx10v1aux -mno-avx10.2 -mno-avxvnniint16" } */
typedef int v8si __attribute__ ((vector_size (32)));
v8si
foo (v8si a, v8si b, v8si c)
diff --git a/gcc/testsuite/gcc.target/i386/avx10v1aux-1b.c b/gcc/testsuite/gcc.target/i386/avx10v1aux-1b.c
new file mode 100644
index 000000000000..3df9ce9c120c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10v1aux-1b.c
@@ -0,0 +1,267 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx10v1aux -O2 " } */
+/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbssds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbsuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpbuuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwsuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwusds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuud\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuud\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuud\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuuds\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuuds\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpdpwuuds\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\\n\\r]*%xmm\[0-9\]+\[^\\n\\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include
+
+volatile __m512i x1,y2,z1;
+volatile __m256i x,y,z;
+volatile __m128i x_,y_,z_;
+volatile __mmask16 m16;
+volatile __mmask8 m;
+
+void extern
+avx10v1aux_test (void)
+{
+ x1 = _mm512_dpbssd_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpbssd_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpbssd_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpbssd_epi32 (x, y, z);
+ x = _mm256_mask_dpbssd_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpbssd_epi32 (m, x, y, z);
+
+ x_ = _mm_dpbssd_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpbssd_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpbssd_epi32 (m, x_, y_, z_);
+
+ x1 = _mm512_dpbssds_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpbssds_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpbssds_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpbssds_epi32 (x, y, z);
+ x = _mm256_mask_dpbssds_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpbssds_epi32 (m, x, y, z);
+
+ x_ = _mm_dpbssds_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpbssds_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpbssds_epi32 (m, x_, y_, z_);
+
+ x1 = _mm512_dpbsud_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpbsud_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpbsud_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpbsud_epi32 (x, y, z);
+ x = _mm256_mask_dpbsud_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpbsud_epi32 (m, x, y, z);
+
+ x_ = _mm_dpbsud_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpbsud_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpbsud_epi32 (m, x_, y_, z_);
+
+ x1 = _mm512_dpbsuds_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpbsuds_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpbsuds_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpbsuds_epi32 (x, y, z);
+ x = _mm256_mask_dpbsuds_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpbsuds_epi32 (m, x, y, z);
+
+ x_ = _mm_dpbsuds_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpbsuds_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpbsuds_epi32 (m, x_, y_, z_);
+
+ x1 = _mm512_dpbuud_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpbuud_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpbuud_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpbuud_epi32 (x, y, z);
+ x = _mm256_mask_dpbuud_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpbuud_epi32 (m, x, y, z);
+
+ x_ = _mm_dpbuud_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpbuud_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpbuud_epi32 (m, x_, y_, z_);
+
+ x1 = _mm512_dpbuuds_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpbuuds_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpbuuds_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpbuuds_epi32 (x, y, z);
+ x = _mm256_mask_dpbuuds_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpbuuds_epi32 (m, x, y, z);
+
+ x_ = _mm_dpbuuds_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpbuuds_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpbuuds_epi32 (m, x_, y_, z_);
+
+ x1 = _mm512_dpwsud_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpwsud_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpwsud_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpwsud_epi32 (x, y, z);
+ x = _mm256_mask_dpwsud_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpwsud_epi32 (m, x, y, z);
+
+ x_ = _mm_dpwsud_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpwsud_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpwsud_epi32 (m, x_, y_, z_);
+
+ x1 = _mm512_dpwsuds_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpwsuds_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpwsuds_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpwsuds_epi32 (x, y, z);
+ x = _mm256_mask_dpwsuds_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpwsuds_epi32 (m, x, y, z);
+
+ x_ = _mm_dpwsuds_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpwsuds_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpwsuds_epi32 (m, x_, y_, z_);
+
+ x1 = _mm512_dpwusd_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpwusd_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpwusd_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpwusd_epi32 (x, y, z);
+ x = _mm256_mask_dpwusd_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpwusd_epi32 (m, x, y, z);
+
+ x_ = _mm_dpwusd_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpwusd_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpwusd_epi32 (m, x_, y_, z_);
+
+ x1 = _mm512_dpwusds_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpwusds_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpwusds_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpwusds_epi32 (x, y, z);
+ x = _mm256_mask_dpwusds_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpwusds_epi32 (m, x, y, z);
+
+ x_ = _mm_dpwusds_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpwusds_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpwusds_epi32 (m, x_, y_, z_);
+
+ x1 = _mm512_dpwuud_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpwuud_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpwuud_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpwuud_epi32 (x, y, z);
+ x = _mm256_mask_dpwuud_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpwuud_epi32 (m, x, y, z);
+
+ x_ = _mm_dpwuud_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpwuud_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpwuud_epi32 (m, x_, y_, z_);
+
+ x1 = _mm512_dpwuuds_epi32 (x1, y2, z1);
+ x1 = _mm512_mask_dpwuuds_epi32 (x1, m16, y2, z1);
+ x1 = _mm512_maskz_dpwuuds_epi32 (m16, x1, y2, z1);
+
+ x = _mm256_dpwuuds_epi32 (x, y, z);
+ x = _mm256_mask_dpwuuds_epi32 (x, m, y, z);
+ x = _mm256_maskz_dpwuuds_epi32 (m, x, y, z);
+
+ x_ = _mm_dpwuuds_epi32 (x_, y_, z_);
+ x_ = _mm_mask_dpwuuds_epi32 (x_, m, y_, z_);
+ x_ = _mm_maskz_dpwuuds_epi32 (m, x_, y_, z_);
+
+}
diff --git a/gcc/testsuite/gcc.target/i386/sse-13.c b/gcc/testsuite/gcc.target/i386/sse-13.c
index 3284fcd4bd43..f43fa8cebf1b 100644
--- a/gcc/testsuite/gcc.target/i386/sse-13.c
+++ b/gcc/testsuite/gcc.target/i386/sse-13.c
@@ -855,7 +855,7 @@
#define __builtin_ia32_mpsadbw256_mask(A, B, C, D, E) __builtin_ia32_mpsadbw256_mask (A, B, 1, D, E)
#define __builtin_ia32_mpsadbw128_mask(A, B, C, D, E) __builtin_ia32_mpsadbw128_mask (A, B, 1, D, E)
-/* avx10_2convertintrin.h */
+/* avx10v1auxintrin.h */
#define __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, E) __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, 8)
/* avx10_2bf16intrin.h */
diff --git a/gcc/testsuite/gcc.target/i386/sse-14.c b/gcc/testsuite/gcc.target/i386/sse-14.c
index 1e9ad6bdcf95..600fe9f3ecea 100644
--- a/gcc/testsuite/gcc.target/i386/sse-14.c
+++ b/gcc/testsuite/gcc.target/i386/sse-14.c
@@ -1045,7 +1045,7 @@ test_4 (_mm512_mask_mpsadbw_epu8, __m512i, __m512i, __mmask32, __m512i, __m512i,
test_4 (_mm256_mask_mpsadbw_epu8, __m256i, __m256i, __mmask16, __m256i, __m256i, 1)
test_4 (_mm_mask_mpsadbw_epu8, __m128i, __m128i, __mmask8, __m128i, __m128i, 1)
-/* avx10_2convertintrin.h */
+/* avx10v1auxintrin.h */
test_2 (_mm512_cvtx_round2ps_ph, __m512h, __m512, __m512, 4)
/* avx10_2bf16intrin.h */
diff --git a/gcc/testsuite/gcc.target/i386/sse-22.c b/gcc/testsuite/gcc.target/i386/sse-22.c
index 9e50994946c5..a4f2613131bd 100644
--- a/gcc/testsuite/gcc.target/i386/sse-22.c
+++ b/gcc/testsuite/gcc.target/i386/sse-22.c
@@ -1086,7 +1086,7 @@ test_4 (_mm512_mask_mpsadbw_epu8, __m512i, __m512i, __mmask32, __m512i, __m512i,
test_4 (_mm256_mask_mpsadbw_epu8, __m256i, __m256i, __mmask16, __m256i, __m256i, 1)
test_4 (_mm_mask_mpsadbw_epu8, __m128i, __m128i, __mmask8, __m128i, __m128i, 1)
-/* avx10_2convertintrin.h */
+/* avx10v1auxintrin.h */
test_2 (_mm512_cvtx_round2ps_ph, __m512h, __m512, __m512, 4)
/* avx10_2bf16intrin.h */
diff --git a/gcc/testsuite/gcc.target/i386/sse-23.c b/gcc/testsuite/gcc.target/i386/sse-23.c
index c6cf53b5ed08..509cceb21eaa 100644
--- a/gcc/testsuite/gcc.target/i386/sse-23.c
+++ b/gcc/testsuite/gcc.target/i386/sse-23.c
@@ -830,7 +830,7 @@
#define __builtin_ia32_mpsadbw256_mask(A, B, C, D, E) __builtin_ia32_mpsadbw256_mask (A, B, 1, D, E)
#define __builtin_ia32_mpsadbw128_mask(A, B, C, D, E) __builtin_ia32_mpsadbw128_mask (A, B, 1, D, E)
-/* avx10_2convertintrin.h */
+/* avx10v1auxintrin.h */
#define __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, E) __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, 8)
/* avx10_2bf16intrin.h */
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 1485d1bef81b..d6794c0e8c59 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -11773,7 +11773,9 @@ proc check_effective_target_avx10v1aux { } {
void
foo ()
{
- __asm__ volatile ("vcvt2ph2bf8\t{%%zmm2, %%zmm1, %%zmm1|%%zmm1, %%zmm1, %%zmm2}");
+ __asm__ volatile ("vpdpbssds\t{%%zmm2, %%zmm1, %%zmm0|%%zmm0, %%zmm1, %%zmm2}");
+ __asm__ volatile ("vpdpwsud\t{%%zmm2, %%zmm1, %%zmm0|%%zmm0, %%zmm1, %%zmm2}");
+ __asm__ volatile ("vcvt2ph2bf8\t{%%zmm2, %%zmm1, %%zmm0|%%zmm0, %%zmm1, %%zmm2}");
}
} "-mavx10v1aux" ]
}
--
2.34.1
From Dipesh.Sharma@amd.com Sun Nov 1 13:47:54 2026
From: Dipesh.Sharma@amd.com (Dipesh Sharma)
Date: Sun, 1 Nov 2026 19:17:54 +0530
Subject: [PATCH v3 2/4] [X86]: Move shared AVX10.2 convert intrinsics to
AVX10V1AUX.
In-Reply-To: <20261101134756.351245-1-Dipesh.Sharma@amd.com>
References: <20261101134756.351245-1-Dipesh.Sharma@amd.com>
Message-ID: <20261101134756.351245-3-Dipesh.Sharma@amd.com>
gcc/ChangeLog:
* config.gcc: Add avx10v1auxintrin.h.
* config/i386/avx10_2convertintrin.h: Moved convert intrins to avx10v1auxintrin.h.
* config/i386/i386-builtin.def (BDESC): Updated option mask for convert builtins.
* config/i386/immintrin.h: Include avx10v1auxintrin.h.
* config/i386/sse.md: Retarget avx10.2 subset convert patterns to AVX10V1AUX.
* config/i386/avx10v1auxintrin.h: New file.
gcc/testsuite/ChangeLog:
* gcc.target/i386/funcspec-56.inc: Check for avx10v1aux.
* lib/target-supports.exp: Ditto.
* gcc.target/i386/avx10v1aux-1a.c: New test.
Co-authored-by: Venkataramanan Kumar
---
gcc/config.gcc | 2 +-
gcc/config/i386/avx10_2convertintrin.h | 1376 ----------------
gcc/config/i386/avx10v1auxintrin.h | 1427 +++++++++++++++++
gcc/config/i386/i386-builtin.def | 92 +-
gcc/config/i386/immintrin.h | 2 +
gcc/config/i386/sse.md | 37 +-
gcc/testsuite/gcc.target/i386/avx10v1aux-1a.c | 375 +++++
gcc/testsuite/gcc.target/i386/funcspec-56.inc | 2 +
gcc/testsuite/lib/target-supports.exp | 11 +
9 files changed, 1881 insertions(+), 1443 deletions(-)
create mode 100644 gcc/config/i386/avx10v1auxintrin.h
create mode 100644 gcc/testsuite/gcc.target/i386/avx10v1aux-1a.c
diff --git a/gcc/config.gcc b/gcc/config.gcc
index d651c3aae37e..4369ebd3f6d9 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -489,7 +489,7 @@ i[34567]86-*-* | x86_64-*-*)
avx10_2minmaxintrin.h avx10_2copyintrin.h
amxavx512intrin.h amxfp8intrin.h movrsintrin.h
amxmovrsintrin.h avx512bmmintrin.h avx512bmmvlintrin.h
- avx10v2auxintrin.h acev1intrin.h"
+ avx10v2auxintrin.h avx10v1auxintrin.h acev1intrin.h"
;;
ia64-*-*)
extra_headers=ia64intrin.h
diff --git a/gcc/config/i386/avx10_2convertintrin.h b/gcc/config/i386/avx10_2convertintrin.h
index fad82e75ca39..aebb5cd8d7c2 100644
--- a/gcc/config/i386/avx10_2convertintrin.h
+++ b/gcc/config/i386/avx10_2convertintrin.h
@@ -34,1382 +34,6 @@
#define __DISABLE_AVX10_2__
#endif /* __AVX10_2__ */
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvtx2ps_ph (__m128 __A, __m128 __B)
-{
- return (__m128h) __builtin_ia32_vcvt2ps2phx128_mask ((__v4sf) __A,
- (__v4sf) __B,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) -1);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvtx2ps_ph (__m128h __W, __mmask8 __U, __m128 __A, __m128 __B)
-{
- return (__m128h) __builtin_ia32_vcvt2ps2phx128_mask ((__v4sf) __A,
- (__v4sf) __B,
- (__v8hf) __W,
- (__mmask8) __U);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvtx2ps_ph (__mmask8 __U, __m128 __A, __m128 __B)
-{
- return (__m128h) __builtin_ia32_vcvt2ps2phx128_mask ((__v4sf) __A,
- (__v4sf) __B,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) __U);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtx2ps_ph (__m256 __A, __m256 __B)
-{
- return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask ((__v8sf) __A,
- (__v8sf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) -1);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtx2ps_ph (__m256h __W, __mmask16 __U, __m256 __A, __m256 __B)
-{
- return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask ((__v8sf) __A,
- (__v8sf) __B,
- (__v16hf) __W,
- (__mmask16) __U);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtx2ps_ph ( __mmask16 __U, __m256 __A, __m256 __B)
-{
- return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask ((__v8sf) __A,
- (__v8sf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U);
-}
-
-extern __inline __m512h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvtx2ps_ph (__m512 __A, __m512 __B)
-{
- return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
- (__v16sf) __B,
- (__v32hf)
- _mm512_setzero_ph (),
- (__mmask32) -1,
- _MM_FROUND_CUR_DIRECTION);
-}
-
-extern __inline __m512h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvtx2ps_ph (__m512h __W, __mmask32 __U, __m512 __A,
- __m512 __B)
-{
- return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
- (__v16sf) __B,
- (__v32hf) __W,
- (__mmask32) __U,
- _MM_FROUND_CUR_DIRECTION);
-}
-
-extern __inline __m512h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvtx2ps_ph (__mmask32 __U, __m512 __A, __m512 __B)
-{
- return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
- (__v16sf) __B,
- (__v32hf)
- _mm512_setzero_ph (),
- (__mmask32) __U,
- _MM_FROUND_CUR_DIRECTION);
-}
-
-#ifdef __OPTIMIZE__
-extern __inline __m512h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvtx_round2ps_ph (__m512 __A, __m512 __B, const int __R)
-{
- return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
- (__v16sf) __B,
- (__v32hf)
- _mm512_setzero_ph (),
- (__mmask32) -1,
- __R);
-}
-
-extern __inline __m512h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvtx_round2ps_ph (__m512h __W, __mmask32 __U, __m512 __A,
- __m512 __B, const int __R)
-{
- return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
- (__v16sf) __B,
- (__v32hf) __W,
- (__mmask32) __U,
- __R);
-}
-
-extern __inline __m512h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvtx_round2ps_ph (__mmask32 __U, __m512 __A,
- __m512 __B, const int __R)
-{
- return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
- (__v16sf) __B,
- (__v32hf)
- _mm512_setzero_ph (),
- (__mmask32) __U,
- __R);
-}
-
-#else
-#define _mm512_cvtx_round2ps_ph(A, B, R) \
- ((__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) (A), \
- (__v16sf) (B), \
- (__v32hf) \
- (_mm512_setzero_ph ()), \
- (__mmask32) (-1), \
- (R)))
-#define _mm512_mask_cvtx_round2ps_ph(W, U, A, B, R) \
- ((__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) (A), \
- (__v16sf) (B), \
- (__v32hf) (W), \
- (__mmask32) (U), \
- (R)))
-#define _mm512_maskz_cvtx_round2ps_ph(U, A, B, R) \
- ((__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) (A), \
- (__v16sf) (B), \
- (__v32hf) \
- (_mm512_setzero_ph ()), \
- (__mmask32) (U), \
- (R)))
-#endif /* __OPTIMIZE__ */
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvtbiasph_bf8 (__m128i __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8128 ((__v16qi) __A,
- (__v8hf) __B);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvtbiasph_bf8 (__m128i __W, __mmask8 __U, __m128i __A,
- __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8128_mask ((__v16qi) __A,
- (__v8hf) __B,
- (__v16qi)(__m128i) __W,
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvtbiasph_bf8 (__mmask8 __U, __m128i __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8128_mask ((__v16qi) __A,
- (__v8hf) __B,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtbiasph_bf8 (__m256i __A, __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtbiasph_bf8 (__m128i __W, __mmask16 __U, __m256i __A,
- __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtbiasph_bf8 (__mmask16 __U, __m256i __A, __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvtbiasph_bf8 (__m512i __A, __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2bf8512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i)
- _mm256_undefined_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvtbiasph_bf8 (__m256i __W, __mmask32 __U,
- __m512i __A, __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2bf8512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvtbiasph_bf8 (__mmask32 __U, __m512i __A, __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2bf8512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvts_biasph_bf8 (__m128i __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8s128 ((__v16qi) __A,
- (__v8hf) __B);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvts_biasph_bf8 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8s128_mask ((__v16qi) __A,
- (__v8hf) __B,
- (__v16qi)(__m128i) __W,
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvts_biasph_bf8 (__mmask8 __U, __m128i __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8s128_mask ((__v16qi) __A,
- (__v8hf) __B,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvts_biasph_bf8 (__m256i __A, __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8s256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvts_biasph_bf8 (__m128i __W, __mmask16 __U,
- __m256i __A, __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8s256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvts_biasph_bf8 (__mmask16 __U, __m256i __A, __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2bf8s256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvts_biasph_bf8 (__m512i __A, __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2bf8s512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i)
- _mm256_undefined_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvts_biasph_bf8 (__m256i __W, __mmask32 __U,
- __m512i __A, __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2bf8s512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvts_biasph_bf8 (__mmask32 __U, __m512i __A, __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2bf8s512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvtbiasph_hf8 (__m128i __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8128 ((__v16qi) __A,
- (__v8hf) __B);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvtbiasph_hf8 (__m128i __W, __mmask8 __U, __m128i __A,
- __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8128_mask ((__v16qi) __A,
- (__v8hf) __B,
- (__v16qi)(__m128i) __W,
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvtbiasph_hf8 (__mmask8 __U, __m128i __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8128_mask ((__v16qi) __A,
- (__v8hf) __B,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtbiasph_hf8 (__m256i __A, __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtbiasph_hf8 (__m128i __W, __mmask16 __U,
- __m256i __A, __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtbiasph_hf8 (__mmask16 __U, __m256i __A, __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvtbiasph_hf8 (__m512i __A, __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2hf8512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i)
- _mm256_undefined_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvtbiasph_hf8 (__m256i __W, __mmask32 __U, __m512i __A,
- __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2hf8512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvtbiasph_hf8 (__mmask32 __U, __m512i __A, __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2hf8512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvts_biasph_hf8 (__m128i __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8s128 ((__v16qi) __A,
- (__v8hf) __B);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvts_biasph_hf8 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8s128_mask ((__v16qi) __A,
- (__v8hf) __B,
- (__v16qi)(__m128i) __W,
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvts_biasph_hf8 (__mmask8 __U, __m128i __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8s128_mask ((__v16qi) __A,
- (__v8hf) __B,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvts_biasph_hf8 (__m256i __A, __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8s256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvts_biasph_hf8 (__m128i __W, __mmask16 __U,
- __m256i __A, __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8s256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvts_biasph_hf8 (__mmask16 __U, __m256i __A, __m256h __B)
-{
- return (__m128i) __builtin_ia32_vcvtbiasph2hf8s256_mask ((__v32qi) __A,
- (__v16hf) __B,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvts_biasph_hf8 (__m512i __A, __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2hf8s512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i)
- _mm256_undefined_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvts_biasph_hf8 (__m256i __W, __mmask32 __U,
- __m512i __A, __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2hf8s512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvts_biasph_hf8 (__mmask32 __U, __m512i __A, __m512h __B)
-{
- return (__m256i) __builtin_ia32_vcvtbiasph2hf8s512_mask ((__v64qi) __A,
- (__v32hf) __B,
- (__v32qi)(__m256i)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvt2ph_bf8 (__m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2bf8128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi)
- _mm_setzero_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvt2ph_bf8 (__m128i __W, __mmask16 __U,
- __m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2bf8128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvt2ph_bf8 (__mmask16 __U, __m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2bf8128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt2ph_bf8 (__m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2bf8256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi)
- _mm256_setzero_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt2ph_bf8 (__m256i __W, __mmask32 __U,
- __m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2bf8256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt2ph_bf8 (__mmask32 __U, __m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2bf8256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvt2ph_bf8 (__m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2bf8512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi)
- _mm512_setzero_si512 (),
- (__mmask64) -1);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvt2ph_bf8 (__m512i __W, __mmask64 __U,
- __m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2bf8512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi) __W,
- (__mmask64) __U);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvt2ph_bf8 (__mmask64 __U, __m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2bf8512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi)
- _mm512_setzero_si512 (),
- (__mmask64) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvts_2ph_bf8 (__m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2bf8s128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi)
- _mm_setzero_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvts_2ph_bf8 (__m128i __W, __mmask16 __U,
- __m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2bf8s128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvts_2ph_bf8 (__mmask16 __U, __m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2bf8s128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvts_2ph_bf8 (__m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2bf8s256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi)
- _mm256_setzero_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvts_2ph_bf8 (__m256i __W, __mmask32 __U,
- __m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2bf8s256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvts_2ph_bf8 (__mmask32 __U, __m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2bf8s256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvts_2ph_bf8 (__m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2bf8s512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi)
- _mm512_setzero_si512 (),
- (__mmask64) -1);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvts_2ph_bf8 (__m512i __W, __mmask64 __U,
- __m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2bf8s512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi) __W,
- (__mmask64) __U);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvts_2ph_bf8 (__mmask64 __U, __m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2bf8s512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi)
- _mm512_setzero_si512 (),
- (__mmask64) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvt2ph_hf8 (__m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2hf8128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi)
- _mm_setzero_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvt2ph_hf8 (__m128i __W, __mmask16 __U,
- __m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2hf8128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvt2ph_hf8 (__mmask16 __U, __m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2hf8128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt2ph_hf8 (__m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2hf8256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi)
- _mm256_setzero_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt2ph_hf8 (__m256i __W, __mmask32 __U,
- __m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2hf8256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt2ph_hf8 (__mmask32 __U, __m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2hf8256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvt2ph_hf8 (__m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2hf8512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi)
- _mm512_setzero_si512 (),
- (__mmask64) -1);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvt2ph_hf8 (__m512i __W, __mmask64 __U,
- __m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2hf8512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi) __W,
- (__mmask64) __U);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvt2ph_hf8 (__mmask64 __U, __m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2hf8512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi)
- _mm512_setzero_si512 (),
- (__mmask64) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvts_2ph_hf8 (__m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2hf8s128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi)
- _mm_setzero_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvts_2ph_hf8 (__m128i __W, __mmask16 __U,
- __m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2hf8s128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvts_2ph_hf8 (__mmask16 __U, __m128h __A, __m128h __B)
-{
- return (__m128i) __builtin_ia32_vcvt2ph2hf8s128_mask ((__v8hf) __A,
- (__v8hf) __B,
- (__v16qi)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvts_2ph_hf8 (__m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2hf8s256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi)
- _mm256_setzero_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvts_2ph_hf8 (__m256i __W, __mmask32 __U,
- __m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2hf8s256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvts_2ph_hf8 (__mmask32 __U, __m256h __A, __m256h __B)
-{
- return (__m256i) __builtin_ia32_vcvt2ph2hf8s256_mask ((__v16hf) __A,
- (__v16hf) __B,
- (__v32qi)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvts_2ph_hf8 (__m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2hf8s512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi)
- _mm512_setzero_si512 (),
- (__mmask64) -1);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvts_2ph_hf8 (__m512i __W, __mmask64 __U,
- __m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2hf8s512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi) __W,
- (__mmask64) __U);
-}
-
-extern __inline__ __m512i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvts_2ph_hf8 (__mmask64 __U, __m512h __A, __m512h __B)
-{
- return (__m512i) __builtin_ia32_vcvt2ph2hf8s512_mask ((__v32hf) __A,
- (__v32hf) __B,
- (__v64qi)
- _mm512_setzero_si512 (),
- (__mmask64) __U);
-}
-
-extern __inline__ __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvthf8_ph (__m128i __A)
-{
- return (__m128h) __builtin_ia32_vcvthf82ph128_mask ((__v16qi) __A,
- (__v8hf)(__m128h)
- _mm_undefined_ph (),
- (__mmask8) -1);
-}
-
-extern __inline__ __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvthf8_ph (__m128h __W, __mmask8 __U, __m128i __A)
-{
- return (__m128h) __builtin_ia32_vcvthf82ph128_mask ((__v16qi) __A,
- (__v8hf)(__m128h) __W,
- (__mmask8) __U);
-}
-
-extern __inline__ __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvthf8_ph (__mmask8 __U, __m128i __A)
-{
- return (__m128h) __builtin_ia32_vcvthf82ph128_mask ((__v16qi) __A,
- (__v8hf)(__m128h)
- _mm_setzero_ph (),
- (__mmask8) __U);
-}
-
-extern __inline__ __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvthf8_ph (__m128i __A)
-{
- return (__m256h) __builtin_ia32_vcvthf82ph256_mask ((__v16qi) __A,
- (__v16hf)(__m256h)
- _mm256_undefined_ph (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvthf8_ph (__m256h __W, __mmask16 __U, __m128i __A)
-{
- return (__m256h) __builtin_ia32_vcvthf82ph256_mask ((__v16qi) __A,
- (__v16hf)(__m256h) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvthf8_ph (__mmask16 __U, __m128i __A)
-{
- return (__m256h) __builtin_ia32_vcvthf82ph256_mask ((__v16qi) __A,
- (__v16hf)(__m256h)
- _mm256_setzero_ph (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m512h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvthf8_ph (__m256i __A)
-{
- return (__m512h) __builtin_ia32_vcvthf82ph512_mask ((__v32qi) __A,
- (__v32hf) (__m512h)
- _mm512_undefined_ph (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m512h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvthf8_ph (__m512h __W, __mmask32 __U, __m256i __A)
-{
- return (__m512h) __builtin_ia32_vcvthf82ph512_mask ((__v32qi) __A,
- (__v32hf) (__m512h) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m512h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvthf8_ph (__mmask32 __U, __m256i __A)
-{
- return (__m512h) __builtin_ia32_vcvthf82ph512_mask ((__v32qi) __A,
- (__v32hf) (__m512h)
- _mm512_setzero_ph (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvtph_bf8 (__m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8128_mask ((__v8hf) __A,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask8) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvtph_bf8 (__m128i __W, __mmask8 __U, __m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8128_mask ((__v8hf) __A,
- (__v16qi)(__m128i) __W,
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvtph_bf8 (__mmask8 __U, __m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8128_mask ((__v8hf) __A,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtph_bf8 (__m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8256_mask ((__v16hf) __A,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtph_bf8 (__m128i __W, __mmask16 __U, __m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8256_mask ((__v16hf) __A,
- (__v16qi)(__m128i) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtph_bf8 (__mmask16 __U, __m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8256_mask ((__v16hf) __A,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvtph_bf8 (__m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2bf8512_mask ((__v32hf) __A,
- (__v32qi) (__m256i)
- _mm256_undefined_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvtph_bf8 (__m256i __W, __mmask32 __U, __m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2bf8512_mask ((__v32hf) __A,
- (__v32qi) (__m256i) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvtph_bf8 (__mmask32 __U, __m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2bf8512_mask ((__v32hf) __A,
- (__v32qi) (__m256i)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvts_ph_bf8 (__m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8s128_mask ((__v8hf) __A,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask8) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvts_ph_bf8 (__m128i __W, __mmask8 __U, __m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8s128_mask ((__v8hf) __A,
- (__v16qi)(__m128i) __W,
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvts_ph_bf8 (__mmask8 __U, __m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8s128_mask ((__v8hf) __A,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvts_ph_bf8 (__m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8s256_mask ((__v16hf) __A,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvts_ph_bf8 (__m128i __W, __mmask16 __U, __m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8s256_mask ((__v16hf) __A,
- (__v16qi)(__m128i) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvts_ph_bf8 (__mmask16 __U, __m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2bf8s256_mask ((__v16hf) __A,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvts_ph_bf8 (__m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2bf8s512_mask ((__v32hf) __A,
- (__v32qi) (__m256i)
- _mm256_undefined_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvts_ph_bf8 (__m256i __W, __mmask32 __U, __m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2bf8s512_mask ((__v32hf) __A,
- (__v32qi) (__m256i) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvts_ph_bf8 (__mmask32 __U, __m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2bf8s512_mask ((__v32hf) __A,
- (__v32qi) (__m256i)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvtph_hf8 (__m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8128_mask ((__v8hf) __A,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask8) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvtph_hf8 (__m128i __W, __mmask8 __U, __m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8128_mask ((__v8hf) __A,
- (__v16qi)(__m128i) __W,
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvtph_hf8 (__mmask8 __U, __m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8128_mask ((__v8hf) __A,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtph_hf8 (__m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8256_mask ((__v16hf) __A,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtph_hf8 (__m128i __W, __mmask16 __U, __m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8256_mask ((__v16hf) __A,
- (__v16qi)(__m128i) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtph_hf8 (__mmask16 __U, __m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8256_mask ((__v16hf) __A,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvtph_hf8 (__m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2hf8512_mask ((__v32hf) __A,
- (__v32qi) (__m256i)
- _mm256_undefined_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvtph_hf8 (__m256i __W, __mmask32 __U, __m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2hf8512_mask ((__v32hf) __A,
- (__v32qi)(__m256i) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvtph_hf8 (__mmask32 __U, __m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2hf8512_mask ((__v32hf) __A,
- (__v32qi) (__m256i)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_cvts_ph_hf8 (__m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8s128_mask ((__v8hf) __A,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask8) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_cvts_ph_hf8 (__m128i __W, __mmask8 __U, __m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8s128_mask ((__v8hf) __A,
- (__v16qi)(__m128i) __W,
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_cvts_ph_hf8 (__mmask8 __U, __m128h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8s128_mask ((__v8hf) __A,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask8) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvts_ph_hf8 (__m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8s256_mask ((__v16hf) __A,
- (__v16qi)(__m128i)
- _mm_undefined_si128 (),
- (__mmask16) -1);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvts_ph_hf8 (__m128i __W, __mmask16 __U, __m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8s256_mask ((__v16hf) __A,
- (__v16qi)(__m128i) __W,
- (__mmask16) __U);
-}
-
-extern __inline__ __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvts_ph_hf8 (__mmask16 __U, __m256h __A)
-{
- return (__m128i) __builtin_ia32_vcvtph2hf8s256_mask ((__v16hf) __A,
- (__v16qi)(__m128i)
- _mm_setzero_si128 (),
- (__mmask16) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_cvts_ph_hf8 (__m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2hf8s512_mask ((__v32hf) __A,
- (__v32qi) (__m256i)
- _mm256_undefined_si256 (),
- (__mmask32) -1);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_cvts_ph_hf8 (__m256i __W, __mmask32 __U, __m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2hf8s512_mask ((__v32hf) __A,
- (__v32qi) (__m256i) __W,
- (__mmask32) __U);
-}
-
-extern __inline__ __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_cvts_ph_hf8 (__mmask32 __U, __m512h __A)
-{
- return (__m256i) __builtin_ia32_vcvtph2hf8s512_mask ((__v32hf) __A,
- (__v32qi) (__m256i)
- _mm256_setzero_si256 (),
- (__mmask32) __U);
-}
-
extern __inline __m128h
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtbf8_ph (__m128i __A)
diff --git a/gcc/config/i386/avx10v1auxintrin.h b/gcc/config/i386/avx10v1auxintrin.h
new file mode 100644
index 000000000000..9929e926ba07
--- /dev/null
+++ b/gcc/config/i386/avx10v1auxintrin.h
@@ -0,0 +1,1427 @@
+/* Copyright (C) 2026 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ GCC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ . */
+
+#if !defined _IMMINTRIN_H_INCLUDED
+#error "Never use directly; include instead."
+#endif
+
+#ifndef _AVX10V1AUXINTRIN_H_INCLUDED
+#define _AVX10V1AUXINTRIN_H_INCLUDED
+
+#if !defined(__AVX10V1AUX__)
+#pragma GCC push_options
+#pragma GCC target("avx10v1aux")
+#define __DISABLE_AVX10V1AUX__
+#endif /* __AVX10V1AUX__ */
+
+/* FP16 to FP8 converts(Single-source). */
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvtph_bf8 (__m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask8) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvtph_bf8 (__m128i __W, __mmask8 __U, __m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i) __W,
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvtph_bf8 (__mmask8 __U, __m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvtph_bf8 (__m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvtph_bf8 (__m128i __W, __mmask16 __U, __m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvtph_bf8 (__mmask16 __U, __m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvtph_bf8 (__m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2bf8512_mask ((__v32hf) __A,
+ (__v32qi) (__m256i)
+ _mm256_undefined_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtph_bf8 (__m256i __W, __mmask32 __U, __m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2bf8512_mask ((__v32hf) __A,
+ (__v32qi) (__m256i) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvtph_bf8 (__mmask32 __U, __m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2bf8512_mask ((__v32hf) __A,
+ (__v32qi) (__m256i)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvts_ph_bf8 (__m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8s128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask8) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvts_ph_bf8 (__m128i __W, __mmask8 __U, __m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8s128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i) __W,
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvts_ph_bf8 (__mmask8 __U, __m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8s128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvts_ph_bf8 (__m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8s256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvts_ph_bf8 (__m128i __W, __mmask16 __U, __m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8s256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvts_ph_bf8 (__mmask16 __U, __m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2bf8s256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvts_ph_bf8 (__m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2bf8s512_mask ((__v32hf) __A,
+ (__v32qi) (__m256i)
+ _mm256_undefined_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvts_ph_bf8 (__m256i __W, __mmask32 __U, __m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2bf8s512_mask ((__v32hf) __A,
+ (__v32qi) (__m256i) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvts_ph_bf8 (__mmask32 __U, __m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2bf8s512_mask ((__v32hf) __A,
+ (__v32qi) (__m256i)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvtph_hf8 (__m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask8) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvtph_hf8 (__m128i __W, __mmask8 __U, __m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i) __W,
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvtph_hf8 (__mmask8 __U, __m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvtph_hf8 (__m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvtph_hf8 (__m128i __W, __mmask16 __U, __m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvtph_hf8 (__mmask16 __U, __m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvtph_hf8 (__m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2hf8512_mask ((__v32hf) __A,
+ (__v32qi) (__m256i)
+ _mm256_undefined_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtph_hf8 (__m256i __W, __mmask32 __U, __m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2hf8512_mask ((__v32hf) __A,
+ (__v32qi)(__m256i) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvtph_hf8 (__mmask32 __U, __m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2hf8512_mask ((__v32hf) __A,
+ (__v32qi) (__m256i)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvts_ph_hf8 (__m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8s128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask8) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvts_ph_hf8 (__m128i __W, __mmask8 __U, __m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8s128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i) __W,
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvts_ph_hf8 (__mmask8 __U, __m128h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8s128_mask ((__v8hf) __A,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvts_ph_hf8 (__m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8s256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvts_ph_hf8 (__m128i __W, __mmask16 __U, __m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8s256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvts_ph_hf8 (__mmask16 __U, __m256h __A)
+{
+ return (__m128i) __builtin_ia32_vcvtph2hf8s256_mask ((__v16hf) __A,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvts_ph_hf8 (__m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2hf8s512_mask ((__v32hf) __A,
+ (__v32qi) (__m256i)
+ _mm256_undefined_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvts_ph_hf8 (__m256i __W, __mmask32 __U, __m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2hf8s512_mask ((__v32hf) __A,
+ (__v32qi) (__m256i) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvts_ph_hf8 (__mmask32 __U, __m512h __A)
+{
+ return (__m256i) __builtin_ia32_vcvtph2hf8s512_mask ((__v32hf) __A,
+ (__v32qi) (__m256i)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+/* FP16 to FP8 converts(Two-source). */
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvt2ph_bf8 (__m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2bf8128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi)
+ _mm_setzero_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvt2ph_bf8 (__m128i __W, __mmask16 __U,
+ __m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2bf8128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvt2ph_bf8 (__mmask16 __U, __m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2bf8128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvt2ph_bf8 (__m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2bf8256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi)
+ _mm256_setzero_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvt2ph_bf8 (__m256i __W, __mmask32 __U,
+ __m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2bf8256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvt2ph_bf8 (__mmask32 __U, __m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2bf8256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvt2ph_bf8 (__m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2bf8512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi)
+ _mm512_setzero_si512 (),
+ (__mmask64) -1);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvt2ph_bf8 (__m512i __W, __mmask64 __U,
+ __m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2bf8512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi) __W,
+ (__mmask64) __U);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvt2ph_bf8 (__mmask64 __U, __m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2bf8512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi)
+ _mm512_setzero_si512 (),
+ (__mmask64) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvts_2ph_bf8 (__m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2bf8s128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi)
+ _mm_setzero_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvts_2ph_bf8 (__m128i __W, __mmask16 __U,
+ __m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2bf8s128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvts_2ph_bf8 (__mmask16 __U, __m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2bf8s128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvts_2ph_bf8 (__m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2bf8s256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi)
+ _mm256_setzero_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvts_2ph_bf8 (__m256i __W, __mmask32 __U,
+ __m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2bf8s256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvts_2ph_bf8 (__mmask32 __U, __m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2bf8s256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvts_2ph_bf8 (__m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2bf8s512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi)
+ _mm512_setzero_si512 (),
+ (__mmask64) -1);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvts_2ph_bf8 (__m512i __W, __mmask64 __U,
+ __m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2bf8s512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi) __W,
+ (__mmask64) __U);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvts_2ph_bf8 (__mmask64 __U, __m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2bf8s512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi)
+ _mm512_setzero_si512 (),
+ (__mmask64) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvt2ph_hf8 (__m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2hf8128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi)
+ _mm_setzero_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvt2ph_hf8 (__m128i __W, __mmask16 __U,
+ __m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2hf8128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvt2ph_hf8 (__mmask16 __U, __m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2hf8128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvt2ph_hf8 (__m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2hf8256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi)
+ _mm256_setzero_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvt2ph_hf8 (__m256i __W, __mmask32 __U,
+ __m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2hf8256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvt2ph_hf8 (__mmask32 __U, __m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2hf8256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvt2ph_hf8 (__m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2hf8512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi)
+ _mm512_setzero_si512 (),
+ (__mmask64) -1);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvt2ph_hf8 (__m512i __W, __mmask64 __U,
+ __m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2hf8512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi) __W,
+ (__mmask64) __U);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvt2ph_hf8 (__mmask64 __U, __m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2hf8512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi)
+ _mm512_setzero_si512 (),
+ (__mmask64) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvts_2ph_hf8 (__m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2hf8s128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi)
+ _mm_setzero_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvts_2ph_hf8 (__m128i __W, __mmask16 __U,
+ __m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2hf8s128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvts_2ph_hf8 (__mmask16 __U, __m128h __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvt2ph2hf8s128_mask ((__v8hf) __A,
+ (__v8hf) __B,
+ (__v16qi)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvts_2ph_hf8 (__m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2hf8s256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi)
+ _mm256_setzero_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvts_2ph_hf8 (__m256i __W, __mmask32 __U,
+ __m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2hf8s256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvts_2ph_hf8 (__mmask32 __U, __m256h __A, __m256h __B)
+{
+ return (__m256i) __builtin_ia32_vcvt2ph2hf8s256_mask ((__v16hf) __A,
+ (__v16hf) __B,
+ (__v32qi)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvts_2ph_hf8 (__m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2hf8s512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi)
+ _mm512_setzero_si512 (),
+ (__mmask64) -1);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvts_2ph_hf8 (__m512i __W, __mmask64 __U,
+ __m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2hf8s512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi) __W,
+ (__mmask64) __U);
+}
+
+extern __inline__ __m512i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvts_2ph_hf8 (__mmask64 __U, __m512h __A, __m512h __B)
+{
+ return (__m512i) __builtin_ia32_vcvt2ph2hf8s512_mask ((__v32hf) __A,
+ (__v32hf) __B,
+ (__v64qi)
+ _mm512_setzero_si512 (),
+ (__mmask64) __U);
+}
+
+/* FP16 to FP8 Converts (Biased) */
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvtbiasph_bf8 (__m128i __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8128 ((__v16qi) __A,
+ (__v8hf) __B);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvtbiasph_bf8 (__m128i __W, __mmask8 __U, __m128i __A,
+ __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8128_mask ((__v16qi) __A,
+ (__v8hf) __B,
+ (__v16qi)(__m128i) __W,
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvtbiasph_bf8 (__mmask8 __U, __m128i __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8128_mask ((__v16qi) __A,
+ (__v8hf) __B,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvtbiasph_bf8 (__m256i __A, __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvtbiasph_bf8 (__m128i __W, __mmask16 __U, __m256i __A,
+ __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvtbiasph_bf8 (__mmask16 __U, __m256i __A, __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvtbiasph_bf8 (__m512i __A, __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2bf8512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i)
+ _mm256_undefined_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtbiasph_bf8 (__m256i __W, __mmask32 __U,
+ __m512i __A, __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2bf8512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvtbiasph_bf8 (__mmask32 __U, __m512i __A, __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2bf8512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvts_biasph_bf8 (__m128i __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8s128 ((__v16qi) __A,
+ (__v8hf) __B);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvts_biasph_bf8 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8s128_mask ((__v16qi) __A,
+ (__v8hf) __B,
+ (__v16qi)(__m128i) __W,
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvts_biasph_bf8 (__mmask8 __U, __m128i __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8s128_mask ((__v16qi) __A,
+ (__v8hf) __B,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvts_biasph_bf8 (__m256i __A, __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8s256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvts_biasph_bf8 (__m128i __W, __mmask16 __U,
+ __m256i __A, __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8s256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvts_biasph_bf8 (__mmask16 __U, __m256i __A, __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2bf8s256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvts_biasph_bf8 (__m512i __A, __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2bf8s512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i)
+ _mm256_undefined_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvts_biasph_bf8 (__m256i __W, __mmask32 __U,
+ __m512i __A, __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2bf8s512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvts_biasph_bf8 (__mmask32 __U, __m512i __A, __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2bf8s512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvtbiasph_hf8 (__m128i __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8128 ((__v16qi) __A,
+ (__v8hf) __B);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvtbiasph_hf8 (__m128i __W, __mmask8 __U, __m128i __A,
+ __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8128_mask ((__v16qi) __A,
+ (__v8hf) __B,
+ (__v16qi)(__m128i) __W,
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvtbiasph_hf8 (__mmask8 __U, __m128i __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8128_mask ((__v16qi) __A,
+ (__v8hf) __B,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvtbiasph_hf8 (__m256i __A, __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvtbiasph_hf8 (__m128i __W, __mmask16 __U,
+ __m256i __A, __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvtbiasph_hf8 (__mmask16 __U, __m256i __A, __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvtbiasph_hf8 (__m512i __A, __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2hf8512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i)
+ _mm256_undefined_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtbiasph_hf8 (__m256i __W, __mmask32 __U, __m512i __A,
+ __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2hf8512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvtbiasph_hf8 (__mmask32 __U, __m512i __A, __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2hf8512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvts_biasph_hf8 (__m128i __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8s128 ((__v16qi) __A,
+ (__v8hf) __B);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvts_biasph_hf8 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8s128_mask ((__v16qi) __A,
+ (__v8hf) __B,
+ (__v16qi)(__m128i) __W,
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvts_biasph_hf8 (__mmask8 __U, __m128i __A, __m128h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8s128_mask ((__v16qi) __A,
+ (__v8hf) __B,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvts_biasph_hf8 (__m256i __A, __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8s256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i)
+ _mm_undefined_si128 (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvts_biasph_hf8 (__m128i __W, __mmask16 __U,
+ __m256i __A, __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8s256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m128i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvts_biasph_hf8 (__mmask16 __U, __m256i __A, __m256h __B)
+{
+ return (__m128i) __builtin_ia32_vcvtbiasph2hf8s256_mask ((__v32qi) __A,
+ (__v16hf) __B,
+ (__v16qi)(__m128i)
+ _mm_setzero_si128 (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvts_biasph_hf8 (__m512i __A, __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2hf8s512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i)
+ _mm256_undefined_si256 (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvts_biasph_hf8 (__m256i __W, __mmask32 __U,
+ __m512i __A, __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2hf8s512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m256i
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvts_biasph_hf8 (__mmask32 __U, __m512i __A, __m512h __B)
+{
+ return (__m256i) __builtin_ia32_vcvtbiasph2hf8s512_mask ((__v64qi) __A,
+ (__v32hf) __B,
+ (__v32qi)(__m256i)
+ _mm256_setzero_si256 (),
+ (__mmask32) __U);
+}
+
+/* FP8 to FP16 Converts */
+
+extern __inline__ __m128h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvthf8_ph (__m128i __A)
+{
+ return (__m128h) __builtin_ia32_vcvthf82ph128_mask ((__v16qi) __A,
+ (__v8hf)(__m128h)
+ _mm_undefined_ph (),
+ (__mmask8) -1);
+}
+
+extern __inline__ __m128h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvthf8_ph (__m128h __W, __mmask8 __U, __m128i __A)
+{
+ return (__m128h) __builtin_ia32_vcvthf82ph128_mask ((__v16qi) __A,
+ (__v8hf)(__m128h) __W,
+ (__mmask8) __U);
+}
+
+extern __inline__ __m128h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvthf8_ph (__mmask8 __U, __m128i __A)
+{
+ return (__m128h) __builtin_ia32_vcvthf82ph128_mask ((__v16qi) __A,
+ (__v8hf)(__m128h)
+ _mm_setzero_ph (),
+ (__mmask8) __U);
+}
+
+extern __inline__ __m256h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvthf8_ph (__m128i __A)
+{
+ return (__m256h) __builtin_ia32_vcvthf82ph256_mask ((__v16qi) __A,
+ (__v16hf)(__m256h)
+ _mm256_undefined_ph (),
+ (__mmask16) -1);
+}
+
+extern __inline__ __m256h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvthf8_ph (__m256h __W, __mmask16 __U, __m128i __A)
+{
+ return (__m256h) __builtin_ia32_vcvthf82ph256_mask ((__v16qi) __A,
+ (__v16hf)(__m256h) __W,
+ (__mmask16) __U);
+}
+
+extern __inline__ __m256h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvthf8_ph (__mmask16 __U, __m128i __A)
+{
+ return (__m256h) __builtin_ia32_vcvthf82ph256_mask ((__v16qi) __A,
+ (__v16hf)(__m256h)
+ _mm256_setzero_ph (),
+ (__mmask16) __U);
+}
+
+extern __inline__ __m512h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvthf8_ph (__m256i __A)
+{
+ return (__m512h) __builtin_ia32_vcvthf82ph512_mask ((__v32qi) __A,
+ (__v32hf) (__m512h)
+ _mm512_undefined_ph (),
+ (__mmask32) -1);
+}
+
+extern __inline__ __m512h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvthf8_ph (__m512h __W, __mmask32 __U, __m256i __A)
+{
+ return (__m512h) __builtin_ia32_vcvthf82ph512_mask ((__v32qi) __A,
+ (__v32hf) (__m512h) __W,
+ (__mmask32) __U);
+}
+
+extern __inline__ __m512h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvthf8_ph (__mmask32 __U, __m256i __A)
+{
+ return (__m512h) __builtin_ia32_vcvthf82ph512_mask ((__v32qi) __A,
+ (__v32hf) (__m512h)
+ _mm512_setzero_ph (),
+ (__mmask32) __U);
+}
+
+/* FP32-Pair to FP16 Converts */
+extern __inline __m128h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_cvtx2ps_ph (__m128 __A, __m128 __B)
+{
+ return (__m128h) __builtin_ia32_vcvt2ps2phx128_mask ((__v4sf) __A,
+ (__v4sf) __B,
+ (__v8hf)
+ _mm_setzero_ph (),
+ (__mmask8) -1);
+}
+
+extern __inline __m128h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_cvtx2ps_ph (__m128h __W, __mmask8 __U, __m128 __A, __m128 __B)
+{
+ return (__m128h) __builtin_ia32_vcvt2ps2phx128_mask ((__v4sf) __A,
+ (__v4sf) __B,
+ (__v8hf) __W,
+ (__mmask8) __U);
+}
+
+extern __inline __m128h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_cvtx2ps_ph (__mmask8 __U, __m128 __A, __m128 __B)
+{
+ return (__m128h) __builtin_ia32_vcvt2ps2phx128_mask ((__v4sf) __A,
+ (__v4sf) __B,
+ (__v8hf)
+ _mm_setzero_ph (),
+ (__mmask8) __U);
+}
+
+extern __inline __m256h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_cvtx2ps_ph (__m256 __A, __m256 __B)
+{
+ return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask ((__v8sf) __A,
+ (__v8sf) __B,
+ (__v16hf)
+ _mm256_setzero_ph (),
+ (__mmask16) -1);
+}
+
+extern __inline __m256h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_cvtx2ps_ph (__m256h __W, __mmask16 __U, __m256 __A, __m256 __B)
+{
+ return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask ((__v8sf) __A,
+ (__v8sf) __B,
+ (__v16hf) __W,
+ (__mmask16) __U);
+}
+
+extern __inline __m256h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_cvtx2ps_ph ( __mmask16 __U, __m256 __A, __m256 __B)
+{
+ return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask ((__v8sf) __A,
+ (__v8sf) __B,
+ (__v16hf)
+ _mm256_setzero_ph (),
+ (__mmask16) __U);
+}
+
+extern __inline __m512h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvtx2ps_ph (__m512 __A, __m512 __B)
+{
+ return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
+ (__v16sf) __B,
+ (__v32hf)
+ _mm512_setzero_ph (),
+ (__mmask32) -1,
+ _MM_FROUND_CUR_DIRECTION);
+}
+
+extern __inline __m512h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtx2ps_ph (__m512h __W, __mmask32 __U, __m512 __A,
+ __m512 __B)
+{
+ return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
+ (__v16sf) __B,
+ (__v32hf) __W,
+ (__mmask32) __U,
+ _MM_FROUND_CUR_DIRECTION);
+}
+
+extern __inline __m512h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvtx2ps_ph (__mmask32 __U, __m512 __A, __m512 __B)
+{
+ return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
+ (__v16sf) __B,
+ (__v32hf)
+ _mm512_setzero_ph (),
+ (__mmask32) __U,
+ _MM_FROUND_CUR_DIRECTION);
+}
+
+#ifdef __OPTIMIZE__
+extern __inline __m512h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cvtx_round2ps_ph (__m512 __A, __m512 __B, const int __R)
+{
+ return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
+ (__v16sf) __B,
+ (__v32hf)
+ _mm512_setzero_ph (),
+ (__mmask32) -1,
+ __R);
+}
+
+extern __inline __m512h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtx_round2ps_ph (__m512h __W, __mmask32 __U, __m512 __A,
+ __m512 __B, const int __R)
+{
+ return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
+ (__v16sf) __B,
+ (__v32hf) __W,
+ (__mmask32) __U,
+ __R);
+}
+
+extern __inline __m512h
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_cvtx_round2ps_ph (__mmask32 __U, __m512 __A,
+ __m512 __B, const int __R)
+{
+ return (__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) __A,
+ (__v16sf) __B,
+ (__v32hf)
+ _mm512_setzero_ph (),
+ (__mmask32) __U,
+ __R);
+}
+
+#else
+#define _mm512_cvtx_round2ps_ph(A, B, R) \
+ ((__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) (A), \
+ (__v16sf) (B), \
+ (__v32hf) \
+ (_mm512_setzero_ph ()), \
+ (__mmask32) (-1), \
+ (R)))
+#define _mm512_mask_cvtx_round2ps_ph(W, U, A, B, R) \
+ ((__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) (A), \
+ (__v16sf) (B), \
+ (__v32hf) (W), \
+ (__mmask32) (U), \
+ (R)))
+#define _mm512_maskz_cvtx_round2ps_ph(U, A, B, R) \
+ ((__m512h) __builtin_ia32_vcvt2ps2phx512_mask_round ((__v16sf) (A), \
+ (__v16sf) (B), \
+ (__v32hf) \
+ (_mm512_setzero_ph ()), \
+ (__mmask32) (U), \
+ (R)))
+#endif /* __OPTIMIZE__ */
+
+#ifdef __DISABLE_AVX10V1AUX__
+#undef __DISABLE_AVX10V1AUX__
+#pragma GCC pop_options
+#endif /* __DISABLE_AVX10V1AUX__ */
+
+#endif /* __AVX10V1AUXINTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/i386-builtin.def b/gcc/config/i386/i386-builtin.def
index e2b7714d4c3e..fc8475b3e6a7 100644
--- a/gcc/config/i386/i386-builtin.def
+++ b/gcc/config/i386/i386-builtin.def
@@ -3148,51 +3148,51 @@ BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_mpsadbw, "__builtin_ia32_mp
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_mpsadbw_mask, "__builtin_ia32_mpsadbw512_mask", IX86_BUILTIN_VMPSADBW_V32HI_MASK, UNKNOWN, (int) V32HI_FTYPE_V64QI_V64QI_INT_V32HI_USI)
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx2_mpsadbw_mask, "__builtin_ia32_mpsadbw256_mask", IX86_BUILTIN_VMPSADBW_V16HI_MASK, UNKNOWN, (int) V16HI_FTYPE_V32QI_V32QI_INT_V16HI_UHI)
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_sse4_1_mpsadbw_mask, "__builtin_ia32_mpsadbw128_mask", IX86_BUILTIN_VMPSADBW_V8HI_MASK, UNKNOWN, (int) V8HI_FTYPE_V16QI_V16QI_INT_V8HI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvt2ps2phx_v16hf_mask, "__builtin_ia32_vcvt2ps2phx256_mask", IX86_BUILTIN_VCVT2PS2PHX_V16HF_MASK, UNKNOWN, (int) V16HF_FTYPE_V8SF_V8SF_V16HF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvt2ps2phx_v8hf_mask, "__builtin_ia32_vcvt2ps2phx128_mask", IX86_BUILTIN_VCVT2PS2PHX_V8HF_MASK, UNKNOWN, (int) V8HF_FTYPE_V4SF_V4SF_V8HF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8v8hf, "__builtin_ia32_vcvtbiasph2bf8128", IX86_BUILTIN_VCVTBIASPH2BF8128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8v8hf_mask, "__builtin_ia32_vcvtbiasph2bf8128_mask", IX86_BUILTIN_VCVTBIASPH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8v16hf_mask, "__builtin_ia32_vcvtbiasph2bf8256_mask", IX86_BUILTIN_VCVTBIASPH2BF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8v32hf_mask, "__builtin_ia32_vcvtbiasph2bf8512_mask", IX86_BUILTIN_VCVTBIASPH2BF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8sv8hf, "__builtin_ia32_vcvtbiasph2bf8s128", IX86_BUILTIN_VCVTBIASPH2BF8S128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8sv8hf_mask, "__builtin_ia32_vcvtbiasph2bf8s128_mask", IX86_BUILTIN_VCVTBIASPH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8sv16hf_mask, "__builtin_ia32_vcvtbiasph2bf8s256_mask", IX86_BUILTIN_VCVTBIASPH2BF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8sv32hf_mask, "__builtin_ia32_vcvtbiasph2bf8s512_mask", IX86_BUILTIN_VCVTBIASPH2BF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8v8hf, "__builtin_ia32_vcvtbiasph2hf8128", IX86_BUILTIN_VCVTBIASPH2HF8128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8v8hf_mask, "__builtin_ia32_vcvtbiasph2hf8128_mask", IX86_BUILTIN_VCVTBIASPH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8v16hf_mask, "__builtin_ia32_vcvtbiasph2hf8256_mask", IX86_BUILTIN_VCVTBIASPH2HF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8v32hf_mask, "__builtin_ia32_vcvtbiasph2hf8512_mask", IX86_BUILTIN_VCVTBIASPH2HF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8sv8hf, "__builtin_ia32_vcvtbiasph2hf8s128", IX86_BUILTIN_VCVTBIASPH2HF8S128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8sv8hf_mask, "__builtin_ia32_vcvtbiasph2hf8s128_mask", IX86_BUILTIN_VCVTBIASPH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8sv16hf_mask, "__builtin_ia32_vcvtbiasph2hf8s256_mask", IX86_BUILTIN_VCVTBIASPH2HF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8sv32hf_mask, "__builtin_ia32_vcvtbiasph2hf8s512_mask", IX86_BUILTIN_VCVTBIASPH2HF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8v8hf_mask, "__builtin_ia32_vcvt2ph2bf8128_mask", IX86_BUILTIN_VCVT2PH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8v16hf_mask, "__builtin_ia32_vcvt2ph2bf8256_mask", IX86_BUILTIN_VCVT2PH2BF8256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8v32hf_mask, "__builtin_ia32_vcvt2ph2bf8512_mask", IX86_BUILTIN_VCVT2PH2BF8512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8sv8hf_mask, "__builtin_ia32_vcvt2ph2bf8s128_mask", IX86_BUILTIN_VCVT2PH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8sv16hf_mask, "__builtin_ia32_vcvt2ph2bf8s256_mask", IX86_BUILTIN_VCVT2PH2BF8S256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8sv32hf_mask, "__builtin_ia32_vcvt2ph2bf8s512_mask", IX86_BUILTIN_VCVT2PH2BF8S512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8v8hf_mask, "__builtin_ia32_vcvt2ph2hf8128_mask", IX86_BUILTIN_VCVT2PH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8v16hf_mask, "__builtin_ia32_vcvt2ph2hf8256_mask", IX86_BUILTIN_VCVT2PH2HF8256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8v32hf_mask, "__builtin_ia32_vcvt2ph2hf8512_mask", IX86_BUILTIN_VCVT2PH2HF8512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8sv8hf_mask, "__builtin_ia32_vcvt2ph2hf8s128_mask", IX86_BUILTIN_VCVT2PH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8sv16hf_mask, "__builtin_ia32_vcvt2ph2hf8s256_mask", IX86_BUILTIN_VCVT2PH2HF8S256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8sv32hf_mask, "__builtin_ia32_vcvt2ph2hf8s512_mask", IX86_BUILTIN_VCVT2PH2HF8S512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8v8hf_mask, "__builtin_ia32_vcvtph2bf8128_mask", IX86_BUILTIN_VCVTPH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8v16hf_mask, "__builtin_ia32_vcvtph2bf8256_mask", IX86_BUILTIN_VCVTPH2BF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8v32hf_mask, "__builtin_ia32_vcvtph2bf8512_mask", IX86_BUILTIN_VCVTPH2BF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8sv8hf_mask, "__builtin_ia32_vcvtph2bf8s128_mask", IX86_BUILTIN_VCVTPH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8sv16hf_mask, "__builtin_ia32_vcvtph2bf8s256_mask", IX86_BUILTIN_VCVTPH2BF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8sv32hf_mask, "__builtin_ia32_vcvtph2bf8s512_mask", IX86_BUILTIN_VCVTPH2BF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8v8hf_mask, "__builtin_ia32_vcvtph2hf8128_mask", IX86_BUILTIN_VCVTPH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8v16hf_mask, "__builtin_ia32_vcvtph2hf8256_mask", IX86_BUILTIN_VCVTPH2HF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8v32hf_mask, "__builtin_ia32_vcvtph2hf8512_mask", IX86_BUILTIN_VCVTPH2HF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8sv8hf_mask, "__builtin_ia32_vcvtph2hf8s128_mask", IX86_BUILTIN_VCVTPH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8sv16hf_mask, "__builtin_ia32_vcvtph2hf8s256_mask", IX86_BUILTIN_VCVTPH2HF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8sv32hf_mask, "__builtin_ia32_vcvtph2hf8s512_mask", IX86_BUILTIN_VCVTPH2HF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvthf82phv8hf_mask, "__builtin_ia32_vcvthf82ph128_mask", IX86_BUILTIN_VCVTHF82PH128_MASK, UNKNOWN, (int) V8HF_FTYPE_V16QI_V8HF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvthf82phv16hf_mask, "__builtin_ia32_vcvthf82ph256_mask", IX86_BUILTIN_VCVTHF82PH256_MASK, UNKNOWN, (int) V16HF_FTYPE_V16QI_V16HF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvthf82phv32hf_mask, "__builtin_ia32_vcvthf82ph512_mask", IX86_BUILTIN_VCVTHF82PH512_MASK, UNKNOWN, (int) V32HF_FTYPE_V32QI_V32HF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_avx10v1aux_cvt2ps2phx_v16hf_mask, "__builtin_ia32_vcvt2ps2phx256_mask", IX86_BUILTIN_VCVT2PS2PHX_V16HF_MASK, UNKNOWN, (int) V16HF_FTYPE_V8SF_V8SF_V16HF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_avx10v1aux_cvt2ps2phx_v8hf_mask, "__builtin_ia32_vcvt2ps2phx128_mask", IX86_BUILTIN_VCVT2PS2PHX_V8HF_MASK, UNKNOWN, (int) V8HF_FTYPE_V4SF_V4SF_V8HF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2bf8v8hf, "__builtin_ia32_vcvtbiasph2bf8128", IX86_BUILTIN_VCVTBIASPH2BF8128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2bf8v8hf_mask, "__builtin_ia32_vcvtbiasph2bf8128_mask", IX86_BUILTIN_VCVTBIASPH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2bf8v16hf_mask, "__builtin_ia32_vcvtbiasph2bf8256_mask", IX86_BUILTIN_VCVTBIASPH2BF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2bf8v32hf_mask, "__builtin_ia32_vcvtbiasph2bf8512_mask", IX86_BUILTIN_VCVTBIASPH2BF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2bf8sv8hf, "__builtin_ia32_vcvtbiasph2bf8s128", IX86_BUILTIN_VCVTBIASPH2BF8S128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2bf8sv8hf_mask, "__builtin_ia32_vcvtbiasph2bf8s128_mask", IX86_BUILTIN_VCVTBIASPH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2bf8sv16hf_mask, "__builtin_ia32_vcvtbiasph2bf8s256_mask", IX86_BUILTIN_VCVTBIASPH2BF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2bf8sv32hf_mask, "__builtin_ia32_vcvtbiasph2bf8s512_mask", IX86_BUILTIN_VCVTBIASPH2BF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2hf8v8hf, "__builtin_ia32_vcvtbiasph2hf8128", IX86_BUILTIN_VCVTBIASPH2HF8128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2hf8v8hf_mask, "__builtin_ia32_vcvtbiasph2hf8128_mask", IX86_BUILTIN_VCVTBIASPH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2hf8v16hf_mask, "__builtin_ia32_vcvtbiasph2hf8256_mask", IX86_BUILTIN_VCVTBIASPH2HF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2hf8v32hf_mask, "__builtin_ia32_vcvtbiasph2hf8512_mask", IX86_BUILTIN_VCVTBIASPH2HF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2hf8sv8hf, "__builtin_ia32_vcvtbiasph2hf8s128", IX86_BUILTIN_VCVTBIASPH2HF8S128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2hf8sv8hf_mask, "__builtin_ia32_vcvtbiasph2hf8s128_mask", IX86_BUILTIN_VCVTBIASPH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2hf8sv16hf_mask, "__builtin_ia32_vcvtbiasph2hf8s256_mask", IX86_BUILTIN_VCVTBIASPH2HF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtbiasph2hf8sv32hf_mask, "__builtin_ia32_vcvtbiasph2hf8s512_mask", IX86_BUILTIN_VCVTBIASPH2HF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2bf8v8hf_mask, "__builtin_ia32_vcvt2ph2bf8128_mask", IX86_BUILTIN_VCVT2PH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2bf8v16hf_mask, "__builtin_ia32_vcvt2ph2bf8256_mask", IX86_BUILTIN_VCVT2PH2BF8256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2bf8v32hf_mask, "__builtin_ia32_vcvt2ph2bf8512_mask", IX86_BUILTIN_VCVT2PH2BF8512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2bf8sv8hf_mask, "__builtin_ia32_vcvt2ph2bf8s128_mask", IX86_BUILTIN_VCVT2PH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2bf8sv16hf_mask, "__builtin_ia32_vcvt2ph2bf8s256_mask", IX86_BUILTIN_VCVT2PH2BF8S256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2bf8sv32hf_mask, "__builtin_ia32_vcvt2ph2bf8s512_mask", IX86_BUILTIN_VCVT2PH2BF8S512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2hf8v8hf_mask, "__builtin_ia32_vcvt2ph2hf8128_mask", IX86_BUILTIN_VCVT2PH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2hf8v16hf_mask, "__builtin_ia32_vcvt2ph2hf8256_mask", IX86_BUILTIN_VCVT2PH2HF8256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2hf8v32hf_mask, "__builtin_ia32_vcvt2ph2hf8512_mask", IX86_BUILTIN_VCVT2PH2HF8512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2hf8sv8hf_mask, "__builtin_ia32_vcvt2ph2hf8s128_mask", IX86_BUILTIN_VCVT2PH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2hf8sv16hf_mask, "__builtin_ia32_vcvt2ph2hf8s256_mask", IX86_BUILTIN_VCVT2PH2HF8S256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvt2ph2hf8sv32hf_mask, "__builtin_ia32_vcvt2ph2hf8s512_mask", IX86_BUILTIN_VCVT2PH2HF8S512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2bf8v8hf_mask, "__builtin_ia32_vcvtph2bf8128_mask", IX86_BUILTIN_VCVTPH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2bf8v16hf_mask, "__builtin_ia32_vcvtph2bf8256_mask", IX86_BUILTIN_VCVTPH2BF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2bf8v32hf_mask, "__builtin_ia32_vcvtph2bf8512_mask", IX86_BUILTIN_VCVTPH2BF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2bf8sv8hf_mask, "__builtin_ia32_vcvtph2bf8s128_mask", IX86_BUILTIN_VCVTPH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2bf8sv16hf_mask, "__builtin_ia32_vcvtph2bf8s256_mask", IX86_BUILTIN_VCVTPH2BF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2bf8sv32hf_mask, "__builtin_ia32_vcvtph2bf8s512_mask", IX86_BUILTIN_VCVTPH2BF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2hf8v8hf_mask, "__builtin_ia32_vcvtph2hf8128_mask", IX86_BUILTIN_VCVTPH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2hf8v16hf_mask, "__builtin_ia32_vcvtph2hf8256_mask", IX86_BUILTIN_VCVTPH2HF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2hf8v32hf_mask, "__builtin_ia32_vcvtph2hf8512_mask", IX86_BUILTIN_VCVTPH2HF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2hf8sv8hf_mask, "__builtin_ia32_vcvtph2hf8s128_mask", IX86_BUILTIN_VCVTPH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2hf8sv16hf_mask, "__builtin_ia32_vcvtph2hf8s256_mask", IX86_BUILTIN_VCVTPH2HF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvtph2hf8sv32hf_mask, "__builtin_ia32_vcvtph2hf8s512_mask", IX86_BUILTIN_VCVTPH2HF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvthf82phv8hf_mask, "__builtin_ia32_vcvthf82ph128_mask", IX86_BUILTIN_VCVTHF82PH128_MASK, UNKNOWN, (int) V8HF_FTYPE_V16QI_V8HF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvthf82phv16hf_mask, "__builtin_ia32_vcvthf82ph256_mask", IX86_BUILTIN_VCVTHF82PH256_MASK, UNKNOWN, (int) V16HF_FTYPE_V16QI_V16HF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vcvthf82phv32hf_mask, "__builtin_ia32_vcvthf82ph512_mask", IX86_BUILTIN_VCVTHF82PH512_MASK, UNKNOWN, (int) V32HF_FTYPE_V32QI_V32HF_USI)
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_addbf16_v32bf, "__builtin_ia32_addbf16512", IX86_BUILTIN_ADDBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_addbf16_v32bf_mask, "__builtin_ia32_addbf16512_mask", IX86_BUILTIN_ADDBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_addbf16_v16bf, "__builtin_ia32_addbf16256", IX86_BUILTIN_ADDBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
@@ -3738,7 +3738,7 @@ BDESC (0, OPTION_MASK_ISA2_AVX512FP16, CODE_FOR_avx512fp16_fmulcsh_v8hf_round, "
BDESC (0, OPTION_MASK_ISA2_AVX512FP16, CODE_FOR_avx512fp16_fmulcsh_v8hf_mask_round, "__builtin_ia32_vfmulcsh_mask_round", IX86_BUILTIN_VFMULCSH_MASK_ROUND, UNKNOWN, (int) V8HF_FTYPE_V8HF_V8HF_V8HF_UQI_INT)
/* AVX10.2. */
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvt2ps2phx_v32hf_mask_round, "__builtin_ia32_vcvt2ps2phx512_mask_round", IX86_BUILTIN_VCVT2PS2PHX_V32HF_MASK_ROUND, UNKNOWN, (int) V32HF_FTYPE_V16SF_V16SF_V32HF_USI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_avx10v1aux_cvt2ps2phx_v32hf_mask_round, "__builtin_ia32_vcvt2ps2phx512_mask_round", IX86_BUILTIN_VCVT2PS2PHX_V32HF_MASK_ROUND, UNKNOWN, (int) V32HF_FTYPE_V16SF_V16SF_V32HF_USI_INT)
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtph2ibsv32hf_mask_round, "__builtin_ia32_cvtph2ibs512_mask_round", IX86_BUILTIN_CVTPH2IBS512_MASK_ROUND, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI_INT)
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtph2iubsv32hf_mask_round, "__builtin_ia32_cvtph2iubs512_mask_round", IX86_BUILTIN_CVTPH2IUBS512_MASK_ROUND, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI_INT)
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtps2ibsv16sf_mask_round, "__builtin_ia32_cvtps2ibs512_mask_round", IX86_BUILTIN_CVTPS2IBS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI_INT)
diff --git a/gcc/config/i386/immintrin.h b/gcc/config/i386/immintrin.h
index 63db4fddca65..74063ee40532 100644
--- a/gcc/config/i386/immintrin.h
+++ b/gcc/config/i386/immintrin.h
@@ -148,6 +148,8 @@
#include
+#include
+
#include
#include
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index c1e8b2562958..a223acc606d7 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -33436,14 +33436,14 @@
(set_attr "addr" "gpr16")
(set_attr "mode" "")])
-(define_insn "avx10_2_cvt2ps2phx_"
+(define_insn "avx10v1aux_cvt2ps2phx_"
[(set (match_operand:VHF_AVX512VL 0 "register_operand" "=v")
(vec_concat:VHF_AVX512VL
(float_truncate:
(match_operand: 2 "" ""))
(float_truncate:
(match_operand: 1 "register_operand" "v"))))]
- "TARGET_AVX10_2 && "
+ "TARGET_AVX10V1AUX && "
"vcvt2ps2phx\t{%2, %1, %0|%0, %1, %2}")
(define_mode_attr ssebvecmode
@@ -33465,7 +33465,7 @@
[(match_operand:VHF_AVX512VL 1 "register_operand" "v")
(match_operand:VHF_AVX512VL 2 "nonimmediate_operand" "vm")]
UNSPEC_CONVERTFP8_PACK))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vcvt\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "prefix" "evex")])
@@ -33494,7 +33494,7 @@
(match_operand:V8HF 2 "nonimmediate_operand")]
UNSPEC_VCVTBIASPH2FP8_PACK)
(match_dup 3)))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"operands[3] = CONST0_RTX (V8QImode);")
(define_insn "*vcvtv8hf"
@@ -33505,7 +33505,7 @@
(match_operand:V8HF 2 "nonimmediate_operand" "vm")]
UNSPEC_VCVTBIASPH2FP8_PACK)
(match_operand:V8QI 3 "const0_operand")))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vcvt\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "prefix" "evex")
(set_attr "mode" "HF")])
@@ -33526,7 +33526,7 @@
(const_int 6) (const_int 7)]))
(match_operand:QI 4 "register_operand" "C"))
(match_dup 5)))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"operands[5] = CONST0_RTX (V8QImode);")
(define_insn "*vcvtv8hf_mask"
@@ -33545,26 +33545,23 @@
(const_int 6) (const_int 7)]))
(match_operand:QI 4 "register_operand" "Yk"))
(match_operand:V8QI 5 "const0_operand")))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vcvt\t{%2, %1, %0%{%4%}%N3|%0%{%4%}%N3, %1, %2}"
[(set_attr "prefix" "evex")])
-(define_mode_iterator VHF_AVX10_2_2
- [V32HF V16HF])
+(define_mode_iterator VHF_256_512
+ [V16HF (V32HF "TARGET_AVX10V1AUX")])
(define_insn "vcvt"
[(set (match_operand: 0 "register_operand" "=v")
(unspec:
[(match_operand: 1 "register_operand" "v")
- (match_operand:VHF_AVX10_2_2 2 "nonimmediate_operand" "vm")]
+ (match_operand:VHF_256_512 2 "nonimmediate_operand" "vm")]
UNSPEC_VCVTBIASPH2FP8_PACK))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vcvt\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "prefix" "evex")])
-(define_mode_iterator VHF_256_512
- [V16HF (V32HF "TARGET_AVX10_2")])
-
(define_mode_attr ph2fp8suff
[(V32HF "") (V16HF "{y}") (V8HF "{x}")])
@@ -33585,7 +33582,7 @@
[(match_operand:V8HF 1 "nonimmediate_operand")]
UNSPEC_CONVERTPH2FP8)
(match_dup 2)))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"operands[2] = CONST0_RTX (V8QImode);")
(define_insn "*vcvtv8hf"
@@ -33595,7 +33592,7 @@
[(match_operand:V8HF 1 "nonimmediate_operand" "vm")]
UNSPEC_CONVERTPH2FP8)
(match_operand:V8QI 2 "const0_operand")))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vcvt{x}\t{%1, %0|%0, %1}"
[(set_attr "prefix" "evex")
(set_attr "mode" "HF")])
@@ -33615,7 +33612,7 @@
(const_int 6) (const_int 7)]))
(match_operand:QI 3 "register_operand"))
(match_dup 4)))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"operands[4] = CONST0_RTX (V8QImode);")
(define_insn "*vcvtv8hf_mask"
@@ -33633,7 +33630,7 @@
(const_int 6) (const_int 7)]))
(match_operand:QI 3 "register_operand" "Yk"))
(match_operand:V8QI 4 "const0_operand")))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vcvt{x}\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"
[(set_attr "prefix" "evex")])
@@ -33642,7 +33639,7 @@
(unspec:
[(match_operand:VHF_256_512 1 "nonimmediate_operand" "vm")]
UNSPEC_CONVERTPH2FP8))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vcvt\t{%1, %0|%0, %1}"
[(set_attr "prefix" "evex")])
@@ -33651,7 +33648,7 @@
(unspec:VHF_AVX512VL
[(match_operand: 1 "nonimmediate_operand" "vm")]
UNSPEC_VCVTHF82PH))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vcvthf82ph\t{%1, %0|%0, %1}"
[(set_attr "prefix" "evex")])
diff --git a/gcc/testsuite/gcc.target/i386/avx10v1aux-1a.c b/gcc/testsuite/gcc.target/i386/avx10v1aux-1a.c
new file mode 100644
index 000000000000..369ec969dde5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10v1aux-1a.c
@@ -0,0 +1,375 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx10v1aux -O2 -fno-fuse-ops-with-volatile-access" } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2bf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtbiasph2hf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2bf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8s\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8s\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvt2ph2hf8s\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvthf82ph\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvthf82ph\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvthf82ph\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvthf82ph\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvthf82ph\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvthf82ph\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvthf82ph\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvthf82ph\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvthf82ph\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8x\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8x\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8x\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8y\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8y\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8y\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8sx\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8sx\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8sx\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8sy\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8sy\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8sy\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8s\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8s\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2bf8s\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8x\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8x\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8x\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8y\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8y\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8y\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8sx\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8sx\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8sx\[ \\t\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8sy\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8sy\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8sy\[ \\t\]*%ymm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8s\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8s\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2hf8s\[ \\t\]*%zmm\[0-9\]+,\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include
+
+volatile __m128 a1,b1;
+volatile __m256 a2,b2;
+volatile __m512 a3,b3;
+volatile __m128h y,x128h,z;
+volatile __m256h y2,x256h,z2;
+volatile __m512h y3,x512h,z4;
+volatile __m128i x128i,z3;
+volatile __m256i x256i,z1;
+volatile __m512i x512i;
+volatile __mmask8 m8;
+volatile __mmask16 m16;
+volatile __mmask32 m32;
+volatile __mmask64 m64;
+
+void extern
+avx10v1aux_test (void)
+{
+ y = _mm_cvtx2ps_ph (a1, b1);
+ y = _mm_mask_cvtx2ps_ph (y, m8, a1, b1);
+ y = _mm_maskz_cvtx2ps_ph (m8, a1, b1);
+
+ y2 = _mm256_cvtx2ps_ph (a2, b2);
+ y2 = _mm256_mask_cvtx2ps_ph (y2, m16, a2, b2);
+ y2 = _mm256_maskz_cvtx2ps_ph (m16, a2, b2);
+
+ y3 = _mm512_cvtx2ps_ph (a3, b3);
+ y3 = _mm512_mask_cvtx2ps_ph (y3, m32, a3, b3);
+ y3 = _mm512_maskz_cvtx2ps_ph (m32, a3, b3);
+
+ y3 = _mm512_cvtx_round2ps_ph (a3, b3, 8);
+ y3 = _mm512_mask_cvtx_round2ps_ph (y3, m32, a3, b3, 8);
+ y3 = _mm512_maskz_cvtx_round2ps_ph (m32, a3, b3, 8);
+}
+
+void extern
+avx10v1aux_vcvtbiasph2bf8_test (void)
+{
+ x128i = _mm_cvtbiasph_bf8 (x128i, x128h);
+ x128i = _mm_mask_cvtbiasph_bf8 (x128i, m8, x128i, x128h);
+ x128i = _mm_maskz_cvtbiasph_bf8 (m8, x128i, x128h);
+
+ x128i = _mm256_cvtbiasph_bf8 (x256i, x256h);
+ x128i = _mm256_mask_cvtbiasph_bf8 (x128i, m16, x256i, x256h);
+ x128i = _mm256_maskz_cvtbiasph_bf8 (m16, x256i, x256h);
+
+ x256i = _mm512_cvtbiasph_bf8 (x512i, x512h);
+ x256i = _mm512_mask_cvtbiasph_bf8 (x256i, m32, x512i, x512h);
+ x256i = _mm512_maskz_cvtbiasph_bf8 (m32, x512i, x512h);
+}
+
+void extern
+avx10v1aux_vcvtbiasph2bf8s_test (void)
+{
+ x128i = _mm_cvts_biasph_bf8 (x128i, x128h);
+ x128i = _mm_mask_cvts_biasph_bf8 (x128i, m8, x128i, x128h);
+ x128i = _mm_maskz_cvts_biasph_bf8 (m8, x128i, x128h);
+
+ x128i = _mm256_cvts_biasph_bf8 (x256i, x256h);
+ x128i = _mm256_mask_cvts_biasph_bf8 (x128i, m16, x256i, x256h);
+ x128i = _mm256_maskz_cvts_biasph_bf8 (m16, x256i, x256h);
+
+ x256i = _mm512_cvts_biasph_bf8 (x512i, x512h);
+ x256i = _mm512_mask_cvts_biasph_bf8 (x256i, m32, x512i, x512h);
+ x256i = _mm512_maskz_cvts_biasph_bf8 (m32, x512i, x512h);
+}
+
+void extern
+avx10v1aux_vcvtbiasph2hf8_test (void)
+{
+ x128i = _mm_cvtbiasph_hf8 (x128i, x128h);
+ x128i = _mm_mask_cvtbiasph_hf8 (x128i, m8, x128i, x128h);
+ x128i = _mm_maskz_cvtbiasph_hf8 (m8, x128i, x128h);
+
+ x128i = _mm256_cvtbiasph_hf8 (x256i, x256h);
+ x128i = _mm256_mask_cvtbiasph_hf8 (x128i, m16, x256i, x256h);
+ x128i = _mm256_maskz_cvtbiasph_hf8 (m16, x256i, x256h);
+
+ x256i = _mm512_cvtbiasph_hf8 (x512i, x512h);
+ x256i = _mm512_mask_cvtbiasph_hf8 (x256i, m32, x512i, x512h);
+ x256i = _mm512_maskz_cvtbiasph_hf8 (m32, x512i, x512h);
+}
+
+void extern
+avx10v1aux_vcvtbiasph2hf8s_test (void)
+{
+ x128i = _mm_cvts_biasph_hf8 (x128i, x128h);
+ x128i = _mm_mask_cvts_biasph_hf8 (x128i, m8, x128i, x128h);
+ x128i = _mm_maskz_cvts_biasph_hf8 (m8, x128i, x128h);
+
+ x128i = _mm256_cvts_biasph_hf8 (x256i, x256h);
+ x128i = _mm256_mask_cvts_biasph_hf8 (x128i, m16, x256i, x256h);
+ x128i = _mm256_maskz_cvts_biasph_hf8 (m16, x256i, x256h);
+
+ x256i = _mm512_cvts_biasph_hf8 (x512i, x512h);
+ x256i = _mm512_mask_cvts_biasph_hf8 (x256i, m32, x512i, x512h);
+ x256i = _mm512_maskz_cvts_biasph_hf8 (m32, x512i, x512h);
+}
+
+void extern
+avx10v1aux_vcvt2ph2bf8_test (void)
+{
+ x128i = _mm_cvt2ph_bf8 (x128h, x128h);
+ x128i = _mm_mask_cvt2ph_bf8 (x128i, m16, x128h, x128h);
+ x128i = _mm_maskz_cvt2ph_bf8 (m16, x128h, x128h);
+
+ x256i = _mm256_cvt2ph_bf8 (x256h, x256h);
+ x256i = _mm256_mask_cvt2ph_bf8 (x256i, m32, x256h, x256h);
+ x256i = _mm256_maskz_cvt2ph_bf8 (m32, x256h, x256h);
+
+ x512i = _mm512_cvt2ph_bf8 (x512h, x512h);
+ x512i = _mm512_mask_cvt2ph_bf8 (x512i, m64, x512h, x512h);
+ x512i = _mm512_maskz_cvt2ph_bf8 (m64, x512h, x512h);
+}
+
+void extern
+avx10v1aux_vcvt2ph2bf8s_test (void)
+{
+ x128i = _mm_cvts_2ph_bf8 (x128h, x128h);
+ x128i = _mm_mask_cvts_2ph_bf8 (x128i, m16, x128h, x128h);
+ x128i = _mm_maskz_cvts_2ph_bf8 (m16, x128h, x128h);
+
+ x256i = _mm256_cvts_2ph_bf8 (x256h, x256h);
+ x256i = _mm256_mask_cvts_2ph_bf8 (x256i, m32, x256h, x256h);
+ x256i = _mm256_maskz_cvts_2ph_bf8 (m32, x256h, x256h);
+
+ x512i = _mm512_cvts_2ph_bf8 (x512h, x512h);
+ x512i = _mm512_mask_cvts_2ph_bf8 (x512i, m64, x512h, x512h);
+ x512i = _mm512_maskz_cvts_2ph_bf8 (m64, x512h, x512h);
+}
+
+void extern
+avx10v1aux_vcvt2ph2hf8_test (void)
+{
+ x128i = _mm_cvt2ph_hf8 (x128h, x128h);
+ x128i = _mm_mask_cvt2ph_hf8 (x128i, m16, x128h, x128h);
+ x128i = _mm_maskz_cvt2ph_hf8 (m16, x128h, x128h);
+
+ x256i = _mm256_cvt2ph_hf8 (x256h, x256h);
+ x256i = _mm256_mask_cvt2ph_hf8 (x256i, m32, x256h, x256h);
+ x256i = _mm256_maskz_cvt2ph_hf8 (m32, x256h, x256h);
+
+ x512i = _mm512_cvt2ph_hf8 (x512h, x512h);
+ x512i = _mm512_mask_cvt2ph_hf8 (x512i, m64, x512h, x512h);
+ x512i = _mm512_maskz_cvt2ph_hf8 (m64, x512h, x512h);
+}
+
+void extern
+avx10v1aux_vcvt2ph2hf8s_test (void)
+{
+ x128i = _mm_cvts_2ph_hf8 (x128h, x128h);
+ x128i = _mm_mask_cvts_2ph_hf8 (x128i, m16, x128h, x128h);
+ x128i = _mm_maskz_cvts_2ph_hf8 (m16, x128h, x128h);
+
+ x256i = _mm256_cvts_2ph_hf8 (x256h, x256h);
+ x256i = _mm256_mask_cvts_2ph_hf8 (x256i, m32, x256h, x256h);
+ x256i = _mm256_maskz_cvts_2ph_hf8 (m32, x256h, x256h);
+
+ x512i = _mm512_cvts_2ph_hf8 (x512h, x512h);
+ x512i = _mm512_mask_cvts_2ph_hf8 (x512i, m64, x512h, x512h);
+ x512i = _mm512_maskz_cvts_2ph_hf8 (m64, x512h, x512h);
+}
+
+void extern
+avx10v1aux_vcvthf82ph_test (void)
+{
+ x128h = _mm_cvthf8_ph (x128i);
+ x128h = _mm_mask_cvthf8_ph (x128h, m8, x128i);
+ x128h = _mm_maskz_cvthf8_ph (m8, x128i);
+
+ x256h = _mm256_cvthf8_ph (x128i);
+ x256h = _mm256_mask_cvthf8_ph (x256h, m16, x128i);
+ x256h = _mm256_maskz_cvthf8_ph (m16, x128i);
+
+ x512h = _mm512_cvthf8_ph (x256i);
+ x512h = _mm512_mask_cvthf8_ph (x512h, m32, x256i);
+ x512h = _mm512_maskz_cvthf8_ph (m32, x256i);
+}
+
+void extern
+avx10v1aux_vcvtph2bf8_test (void)
+{
+ x128i = _mm_cvtph_bf8 (x128h);
+ x128i = _mm_mask_cvtph_bf8 (x128i, m8, x128h);
+ x128i = _mm_maskz_cvtph_bf8 (m8, x128h);
+
+ x128i = _mm256_cvtph_bf8 (x256h);
+ x128i = _mm256_mask_cvtph_bf8 (x128i, m16, x256h);
+ x128i = _mm256_maskz_cvtph_bf8 (m16, x256h);
+
+ x256i = _mm512_cvtph_bf8 (x512h);
+ x256i = _mm512_mask_cvtph_bf8 (x256i, m32, x512h);
+ x256i = _mm512_maskz_cvtph_bf8 (m32, x512h);
+}
+
+void extern
+avx10v1aux_vcvtph2bf8s_test (void)
+{
+ x128i = _mm_cvts_ph_bf8 (x128h);
+ x128i = _mm_mask_cvts_ph_bf8 (x128i, m8, x128h);
+ x128i = _mm_maskz_cvts_ph_bf8 (m8, x128h);
+
+ x128i = _mm256_cvts_ph_bf8 (x256h);
+ x128i = _mm256_mask_cvts_ph_bf8 (x128i, m16, x256h);
+ x128i = _mm256_maskz_cvts_ph_bf8 (m16, x256h);
+
+ x256i = _mm512_cvts_ph_bf8 (x512h);
+ x256i = _mm512_mask_cvts_ph_bf8 (x256i, m32, x512h);
+ x256i = _mm512_maskz_cvts_ph_bf8 (m32, x512h);
+}
+
+void extern
+avx10v1aux_vcvtph2hf8_test (void)
+{
+ x128i = _mm_cvtph_hf8 (x128h);
+ x128i = _mm_mask_cvtph_hf8 (x128i, m8, x128h);
+ x128i = _mm_maskz_cvtph_hf8 (m8, x128h);
+
+ x128i = _mm256_cvtph_hf8 (x256h);
+ x128i = _mm256_mask_cvtph_hf8 (x128i, m16, x256h);
+ x128i = _mm256_maskz_cvtph_hf8 (m16, x256h);
+
+ x256i = _mm512_cvtph_hf8 (x512h);
+ x256i = _mm512_mask_cvtph_hf8 (x256i, m32, x512h);
+ x256i = _mm512_maskz_cvtph_hf8 (m32, x512h);
+}
+
+void extern
+avx10v1aux_vcvtph2hf8s_test (void)
+{
+ x128i = _mm_cvts_ph_hf8 (x128h);
+ x128i = _mm_mask_cvts_ph_hf8 (x128i, m8, x128h);
+ x128i = _mm_maskz_cvts_ph_hf8 (m8, x128h);
+
+ x128i = _mm256_cvts_ph_hf8 (x256h);
+ x128i = _mm256_mask_cvts_ph_hf8 (x128i, m16, x256h);
+ x128i = _mm256_maskz_cvts_ph_hf8 (m16, x256h);
+
+ x256i = _mm512_cvts_ph_hf8 (x512h);
+ x256i = _mm512_mask_cvts_ph_hf8 (x256i, m32, x512h);
+ x256i = _mm512_maskz_cvts_ph_hf8 (m32, x512h);
+}
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-56.inc b/gcc/testsuite/gcc.target/i386/funcspec-56.inc
index f18778025753..0a364ff43d3a 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-56.inc
+++ b/gcc/testsuite/gcc.target/i386/funcspec-56.inc
@@ -94,6 +94,7 @@ extern void test_movrs (void) __attribute__((__target__("movrs")));
extern void test_amx_movrs (void) __attribute__((__target__("amx-movrs")));
extern void test_avx10v2aux (void) __attribute__((__target__("avx10v2aux")));
extern void test_acev1 (void) __attribute__((__target__("acev1")));
+extern void test_avx10v1aux (void) __attribute__((__target__("avx10v1aux")));
extern void test_no_sgx (void) __attribute__((__target__("no-sgx")));
extern void test_no_avx512vpopcntdq(void) __attribute__((__target__("no-avx512vpopcntdq")));
@@ -189,6 +190,7 @@ extern void test_no_movrs (void) __attribute__((__target__("no-movrs")));
extern void test_no_amx_movrs (void) __attribute__((__target__("no-amx-movrs")));
extern void test_no_avx10v2aux (void) __attribute__((__target__("no-avx10v2aux")));
extern void test_no_acev1 (void) __attribute__((__target__("no-acev1")));
+extern void test_no_avx10v1aux (void) __attribute__((__target__("no-avx10v1aux")));
extern void test_arch_nocona (void) __attribute__((__target__("arch=nocona")));
extern void test_arch_core2 (void) __attribute__((__target__("arch=core2")));
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index ae04b6a8daa1..1485d1bef81b 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -11767,6 +11767,17 @@ proc check_effective_target_avx10v2aux { } {
} "-mavx10v2aux" ]
}
+# Return 1 if avx10v1aux instructions can be compiled.
+proc check_effective_target_avx10v1aux { } {
+ return [check_no_compiler_messages avx10v1aux object {
+ void
+ foo ()
+ {
+ __asm__ volatile ("vcvt2ph2bf8\t{%%zmm2, %%zmm1, %%zmm1|%%zmm1, %%zmm1, %%zmm2}");
+ }
+ } "-mavx10v1aux" ]
+}
+
# Return 1 if amx-avx512 instructions can be compiled.
proc check_effective_target_amx_avx512 { } {
return [check_no_compiler_messages amx_avx512 object {
--
2.34.1
From Dipesh.Sharma@amd.com Sun Nov 1 13:47:55 2026
From: Dipesh.Sharma@amd.com (Dipesh Sharma)
Date: Sun, 1 Nov 2026 19:17:55 +0530
Subject: [PATCH v3 3/4] [X86]: Move shared AVX10.2 and VNNI byte and word
intrinsics to AVX10V1AUX.
In-Reply-To: <20261101134756.351245-1-Dipesh.Sharma@amd.com>
References: <20261101134756.351245-1-Dipesh.Sharma@amd.com>
Message-ID: <20261101134756.351245-4-Dipesh.Sharma@amd.com>
gcc/ChangeLog:
* config/i386/avx10_2mediaintrin.h: Moved VNNI byte and word
intrinsics to avx10v1auxintrin.h.
* config/i386/avx10v1auxintrin.h: Added VNNI byte and word intrinsics.
* config/i386/i386-builtin.def (BDESC): Updated option mask for
VNNIINT{8,16} and 10.2 builtins.
* config/i386/i386.md: Add target avx10v1aux.
* config/i386/i386-expand.cc (ix86_check_builtin_isa_match): Share builtins between
VNNIINT{8,16} and AVX10V1AUX.
* config/i386/i386.cc (ix86_vector_costs::add_stmt_cost): Update target guard
from AVX10_2 to AVX10V1AUX.
* config/i386/sse.md: Retarget avx10.2 subset VNNI
byte and word patterns to AVX10V1AUX.
Co-authored-by: Venkataramanan Kumar
---
gcc/config/i386/avx10_2mediaintrin.h | 1032 --------------------------
gcc/config/i386/avx10v1auxintrin.h | 1032 ++++++++++++++++++++++++++
gcc/config/i386/i386-builtin.def | 216 +++---
gcc/config/i386/i386-expand.cc | 8 +-
gcc/config/i386/i386.cc | 4 +-
gcc/config/i386/i386.md | 4 +-
gcc/config/i386/sse.md | 125 ++--
7 files changed, 1213 insertions(+), 1208 deletions(-)
diff --git a/gcc/config/i386/avx10_2mediaintrin.h b/gcc/config/i386/avx10_2mediaintrin.h
index 24af37954166..ffc1cbf66a56 100644
--- a/gcc/config/i386/avx10_2mediaintrin.h
+++ b/gcc/config/i386/avx10_2mediaintrin.h
@@ -34,1038 +34,6 @@
#define __DISABLE_AVX10_2__
#endif /* __AVX10_2__ */
-#define _mm_dpbssd_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpbssd128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm_dpbssds_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpbssds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm_dpbsud_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpbsud128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm_dpbsuds_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpbsuds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm_dpbuud_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpbuud128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm_dpbuuds_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpbuuds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm256_dpbssd_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpbssd256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-#define _mm256_dpbssds_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpbssds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-#define _mm256_dpbsud_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpbsud256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-#define _mm256_dpbsuds_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpbsuds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-#define _mm256_dpbuud_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpbuud256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-#define _mm256_dpbuuds_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpbuuds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-#define _mm_dpwsud_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpwsud128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm_dpwsuds_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpwsuds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm_dpwusd_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpwusd128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm_dpwusds_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpwusds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm_dpwuud_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpwuud128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm_dpwuuds_epi32(W, A, B) \
- (__m128i) __builtin_ia32_vpdpwuuds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
-
-#define _mm256_dpwsud_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpwsud256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-#define _mm256_dpwsuds_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpwsuds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-#define _mm256_dpwusd_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpwusd256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-#define _mm256_dpwusds_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpwusds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-#define _mm256_dpwuud_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpwuud256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-#define _mm256_dpwuuds_epi32(W, A, B) \
- (__m256i) __builtin_ia32_vpdpwuuds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpbssd_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbssd_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpbssd_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbssd_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpbssds_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbssds_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpbssds_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbssds_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpbsud_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbsud_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpbsud_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbsud_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpbsuds_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbsuds_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpbsuds_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbsuds_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpbuud_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbuud_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpbuud_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbuud_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpbuuds_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbuuds_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpbuuds_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpbuuds_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpbssd_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbssd_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpbssd_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbssd_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpbssds_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbssds_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpbssds_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbssds_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpbsud_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbsud_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpbsud_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbsud_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpbsuds_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbsuds_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpbsuds_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbsuds_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpbuud_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbuud_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpbuud_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbuud_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpbuuds_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbuuds_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpbuuds_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpbuuds_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpbssd_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbssd512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpbssd_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbssd_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpbssd_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbssd_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpbssds_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbssds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpbssds_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbssds_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpbssds_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbssds_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpbsud_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbsud512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpbsud_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbsud_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpbsud_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbsud_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpbsuds_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbsuds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpbsuds_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbsuds_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpbsuds_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbsuds_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpbuud_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbuud512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpbuud_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbuud_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpbuud_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbuud_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpbuuds_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbuuds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpbuuds_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbuuds_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpbuuds_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpbuuds_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpwsud_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwsud_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpwsud_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwsud_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpwsuds_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwsuds_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpwsuds_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwsuds_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpwusd_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwusd_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpwusd_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwusd_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpwusds_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwusds_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpwusds_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwusds_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpwuud_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwuud_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpwuud_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwuud_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_dpwuuds_epi32 (__m128i __W, __mmask8 __U,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwuuds_v4si_mask ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m128i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_maskz_dpwuuds_epi32 (__mmask8 __U, __m128i __W,
- __m128i __A, __m128i __B)
-{
- return (__m128i)
- __builtin_ia32_vpdpwuuds_v4si_maskz ((__v4si) __W,
- (__v4si) __A,
- (__v4si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpwsud_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwsud_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpwsud_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwsud_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpwsuds_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwsuds_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpwsuds_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwsuds_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpwusd_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwusd_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpwusd_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwusd_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpwusds_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwusds_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpwusds_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwusds_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpwuud_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwuud_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpwuud_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwuud_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_dpwuuds_epi32 (__m256i __W, __mmask8 __U,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwuuds_v8si_mask ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m256i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_dpwuuds_epi32 (__mmask8 __U, __m256i __W,
- __m256i __A, __m256i __B)
-{
- return (__m256i)
- __builtin_ia32_vpdpwuuds_v8si_maskz ((__v8si) __W,
- (__v8si) __A,
- (__v8si) __B,
- (__mmask8) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpwsud_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwsud512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpwsud_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwsud_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpwsud_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwsud_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpwsuds_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwsuds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpwsuds_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwsuds_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpwsuds_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwsuds_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpwusd_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwusd512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpwusd_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwusd_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpwusd_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwusd_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpwusds_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwusds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpwusds_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwusds_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpwusds_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwusds_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpwuud_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwuud512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpwuud_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwuud_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpwuud_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwuud_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_dpwuuds_epi32 (__m512i __W, __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwuuds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_dpwuuds_epi32 (__m512i __W, __mmask16 __U,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwuuds_v16si_mask ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
-extern __inline __m512i
-__attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_maskz_dpwuuds_epi32 (__mmask16 __U, __m512i __W,
- __m512i __A, __m512i __B)
-{
- return (__m512i)
- __builtin_ia32_vpdpwuuds_v16si_maskz ((__v16si) __W,
- (__v16si) __A,
- (__v16si) __B,
- (__mmask16) __U);
-}
-
extern __inline __m512
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm512_dpph_ps (__m512 __W, __m512h __A, __m512h __B)
diff --git a/gcc/config/i386/avx10v1auxintrin.h b/gcc/config/i386/avx10v1auxintrin.h
index 9929e926ba07..61bf6c02e60e 100644
--- a/gcc/config/i386/avx10v1auxintrin.h
+++ b/gcc/config/i386/avx10v1auxintrin.h
@@ -1419,6 +1419,1038 @@ _mm512_maskz_cvtx_round2ps_ph (__mmask32 __U, __m512 __A,
(R)))
#endif /* __OPTIMIZE__ */
+#define _mm_dpbssd_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpbssd128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm_dpbssds_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpbssds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm_dpbsud_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpbsud128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm_dpbsuds_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpbsuds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm_dpbuud_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpbuud128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm_dpbuuds_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpbuuds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm256_dpbssd_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpbssd256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+#define _mm256_dpbssds_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpbssds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+#define _mm256_dpbsud_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpbsud256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+#define _mm256_dpbsuds_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpbsuds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+#define _mm256_dpbuud_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpbuud256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+#define _mm256_dpbuuds_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpbuuds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+#define _mm_dpwsud_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpwsud128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm_dpwsuds_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpwsuds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm_dpwusd_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpwusd128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm_dpwusds_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpwusds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm_dpwuud_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpwuud128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm_dpwuuds_epi32(W, A, B) \
+ (__m128i) __builtin_ia32_vpdpwuuds128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
+
+#define _mm256_dpwsud_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpwsud256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+#define _mm256_dpwsuds_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpwsuds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+#define _mm256_dpwusd_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpwusd256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+#define _mm256_dpwusds_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpwusds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+#define _mm256_dpwuud_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpwuud256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+#define _mm256_dpwuuds_epi32(W, A, B) \
+ (__m256i) __builtin_ia32_vpdpwuuds256 ((__v8si) (W), (__v8si) (A), (__v8si) (B))
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpbssd_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbssd_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpbssd_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbssd_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpbssds_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbssds_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpbssds_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbssds_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpbsud_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbsud_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpbsud_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbsud_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpbsuds_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbsuds_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpbsuds_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbsuds_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpbuud_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbuud_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpbuud_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbuud_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpbuuds_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbuuds_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpbuuds_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpbuuds_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpbssd_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbssd_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpbssd_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbssd_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpbssds_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbssds_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpbssds_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbssds_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpbsud_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbsud_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpbsud_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbsud_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpbsuds_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbsuds_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpbsuds_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbsuds_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpbuud_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbuud_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpbuud_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbuud_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpbuuds_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbuuds_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpbuuds_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpbuuds_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpbssd_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbssd512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpbssd_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbssd_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpbssd_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbssd_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpbssds_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbssds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpbssds_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbssds_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpbssds_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbssds_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpbsud_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbsud512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpbsud_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbsud_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpbsud_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbsud_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpbsuds_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbsuds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpbsuds_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbsuds_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpbsuds_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbsuds_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpbuud_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbuud512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpbuud_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbuud_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpbuud_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbuud_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpbuuds_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbuuds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpbuuds_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbuuds_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpbuuds_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpbuuds_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpwsud_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwsud_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpwsud_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwsud_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpwsuds_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwsuds_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpwsuds_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwsuds_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpwusd_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwusd_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpwusd_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwusd_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpwusds_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwusds_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpwusds_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwusds_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpwuud_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwuud_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpwuud_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwuud_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_dpwuuds_epi32 (__m128i __W, __mmask8 __U,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwuuds_v4si_mask ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m128i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_dpwuuds_epi32 (__mmask8 __U, __m128i __W,
+ __m128i __A, __m128i __B)
+{
+ return (__m128i)
+ __builtin_ia32_vpdpwuuds_v4si_maskz ((__v4si) __W,
+ (__v4si) __A,
+ (__v4si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpwsud_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwsud_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpwsud_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwsud_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpwsuds_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwsuds_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpwsuds_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwsuds_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpwusd_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwusd_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpwusd_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwusd_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpwusds_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwusds_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpwusds_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwusds_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpwuud_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwuud_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpwuud_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwuud_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_mask_dpwuuds_epi32 (__m256i __W, __mmask8 __U,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwuuds_v8si_mask ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m256i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm256_maskz_dpwuuds_epi32 (__mmask8 __U, __m256i __W,
+ __m256i __A, __m256i __B)
+{
+ return (__m256i)
+ __builtin_ia32_vpdpwuuds_v8si_maskz ((__v8si) __W,
+ (__v8si) __A,
+ (__v8si) __B,
+ (__mmask8) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpwsud_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwsud512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpwsud_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwsud_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpwsud_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwsud_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpwsuds_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwsuds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpwsuds_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwsuds_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpwsuds_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwsuds_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpwusd_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwusd512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpwusd_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwusd_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpwusd_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwusd_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpwusds_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwusds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpwusds_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwusds_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpwusds_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwusds_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpwuud_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwuud512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpwuud_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwuud_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpwuud_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwuud_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_dpwuuds_epi32 (__m512i __W, __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwuuds512 ((__v16si) __W, (__v16si) __A, (__v16si) __B);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_dpwuuds_epi32 (__m512i __W, __mmask16 __U,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwuuds_v16si_mask ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+extern __inline __m512i
+__attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_maskz_dpwuuds_epi32 (__mmask16 __U, __m512i __W,
+ __m512i __A, __m512i __B)
+{
+ return (__m512i)
+ __builtin_ia32_vpdpwuuds_v16si_maskz ((__v16si) __W,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
#ifdef __DISABLE_AVX10V1AUX__
#undef __DISABLE_AVX10V1AUX__
#pragma GCC pop_options
diff --git a/gcc/config/i386/i386-builtin.def b/gcc/config/i386/i386-builtin.def
index fc8475b3e6a7..6afae026040e 100644
--- a/gcc/config/i386/i386-builtin.def
+++ b/gcc/config/i386/i386-builtin.def
@@ -2773,32 +2773,32 @@ BDESC (OPTION_MASK_ISA_AVX512VNNI | OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_vpdpws
BDESC (OPTION_MASK_ISA_AVX512VNNI | OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_vpdpwssds_v4si_maskz, "__builtin_ia32_vpdpwssds_v4si_maskz", IX86_BUILTIN_VPDPWSSDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
/* AVXVNNIINT8 */
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v8si, "__builtin_ia32_vpdpbssd256", IX86_BUILTIN_VPDPBSSDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v8si, "__builtin_ia32_vpdpbssds256", IX86_BUILTIN_VPDPBSSDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v8si, "__builtin_ia32_vpdpbsud256", IX86_BUILTIN_VPDPBSUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v8si, "__builtin_ia32_vpdpbsuds256", IX86_BUILTIN_VPDPBSUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v8si, "__builtin_ia32_vpdpbuud256", IX86_BUILTIN_VPDPBUUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v8si, "__builtin_ia32_vpdpbuuds256", IX86_BUILTIN_VPDPBUUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v4si, "__builtin_ia32_vpdpbssd128", IX86_BUILTIN_VPDPBSSDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v4si, "__builtin_ia32_vpdpbssds128", IX86_BUILTIN_VPDPBSSDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v4si, "__builtin_ia32_vpdpbsud128", IX86_BUILTIN_VPDPBSUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v4si, "__builtin_ia32_vpdpbsuds128", IX86_BUILTIN_VPDPBSUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v4si, "__builtin_ia32_vpdpbuud128", IX86_BUILTIN_VPDPBUUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v4si, "__builtin_ia32_vpdpbuuds128", IX86_BUILTIN_VPDPBUUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssd_v8si, "__builtin_ia32_vpdpbssd256", IX86_BUILTIN_VPDPBSSDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssds_v8si, "__builtin_ia32_vpdpbssds256", IX86_BUILTIN_VPDPBSSDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsud_v8si, "__builtin_ia32_vpdpbsud256", IX86_BUILTIN_VPDPBSUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsuds_v8si, "__builtin_ia32_vpdpbsuds256", IX86_BUILTIN_VPDPBSUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuud_v8si, "__builtin_ia32_vpdpbuud256", IX86_BUILTIN_VPDPBUUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuuds_v8si, "__builtin_ia32_vpdpbuuds256", IX86_BUILTIN_VPDPBUUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssd_v4si, "__builtin_ia32_vpdpbssd128", IX86_BUILTIN_VPDPBSSDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssds_v4si, "__builtin_ia32_vpdpbssds128", IX86_BUILTIN_VPDPBSSDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsud_v4si, "__builtin_ia32_vpdpbsud128", IX86_BUILTIN_VPDPBSUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsuds_v4si, "__builtin_ia32_vpdpbsuds128", IX86_BUILTIN_VPDPBSUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuud_v4si, "__builtin_ia32_vpdpbuud128", IX86_BUILTIN_VPDPBUUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuuds_v4si, "__builtin_ia32_vpdpbuuds128", IX86_BUILTIN_VPDPBUUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
/* AVXVNNIINT16 */
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v8si, "__builtin_ia32_vpdpwusd256", IX86_BUILTIN_VPDPWUSDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v8si, "__builtin_ia32_vpdpwusds256", IX86_BUILTIN_VPDPWUSDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v8si, "__builtin_ia32_vpdpwsud256", IX86_BUILTIN_VPDPWSUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v8si, "__builtin_ia32_vpdpwsuds256", IX86_BUILTIN_VPDPWSUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v8si, "__builtin_ia32_vpdpwuud256", IX86_BUILTIN_VPDPWUUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v8si, "__builtin_ia32_vpdpwuuds256", IX86_BUILTIN_VPDPWUUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v4si, "__builtin_ia32_vpdpwusd128", IX86_BUILTIN_VPDPWUSDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v4si, "__builtin_ia32_vpdpwusds128", IX86_BUILTIN_VPDPWUSDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v4si, "__builtin_ia32_vpdpwsud128", IX86_BUILTIN_VPDPWSUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v4si, "__builtin_ia32_vpdpwsuds128", IX86_BUILTIN_VPDPWSUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v4si, "__builtin_ia32_vpdpwuud128", IX86_BUILTIN_VPDPWUUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v4si, "__builtin_ia32_vpdpwuuds128", IX86_BUILTIN_VPDPWUUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusd_v8si, "__builtin_ia32_vpdpwusd256", IX86_BUILTIN_VPDPWUSDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusds_v8si, "__builtin_ia32_vpdpwusds256", IX86_BUILTIN_VPDPWUSDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsud_v8si, "__builtin_ia32_vpdpwsud256", IX86_BUILTIN_VPDPWSUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsuds_v8si, "__builtin_ia32_vpdpwsuds256", IX86_BUILTIN_VPDPWSUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuud_v8si, "__builtin_ia32_vpdpwuud256", IX86_BUILTIN_VPDPWUUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuuds_v8si, "__builtin_ia32_vpdpwuuds256", IX86_BUILTIN_VPDPWUUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusd_v4si, "__builtin_ia32_vpdpwusd128", IX86_BUILTIN_VPDPWUSDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusds_v4si, "__builtin_ia32_vpdpwusds128", IX86_BUILTIN_VPDPWUSDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsud_v4si, "__builtin_ia32_vpdpwsud128", IX86_BUILTIN_VPDPWSUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsuds_v4si, "__builtin_ia32_vpdpwsuds128", IX86_BUILTIN_VPDPWSUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuud_v4si, "__builtin_ia32_vpdpwuud128", IX86_BUILTIN_VPDPWUUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuuds_v4si, "__builtin_ia32_vpdpwuuds128", IX86_BUILTIN_VPDPWUUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
/* VPCLMULQDQ */
BDESC (OPTION_MASK_ISA_VPCLMULQDQ | OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_vpclmulqdq_v2di, "__builtin_ia32_vpclmulqdq_v2di", IX86_BUILTIN_VPCLMULQDQ2, UNKNOWN, (int) V2DI_FTYPE_V2DI_V2DI_INT)
@@ -3054,90 +3054,90 @@ BDESC (OPTION_MASK_ISA_AVX512VL, OPTION_MASK_ISA2_AVX512FP16, CODE_FOR_avx512vl_
BDESC (OPTION_MASK_ISA_AVX512VL, OPTION_MASK_ISA2_AVX512FP16, CODE_FOR_avx512vl_fmulc_v16hf_mask, "__builtin_ia32_vfmulcph256_mask", IX86_BUILTIN_VFMULCPH256_MASK, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UQI)
/* AVX10.2. */
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v16si, "__builtin_ia32_vpdpbssd512", IX86_BUILTIN_VPDPBSSDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v16si, "__builtin_ia32_vpdpbssds512", IX86_BUILTIN_VPDPBSSDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v16si, "__builtin_ia32_vpdpbsud512", IX86_BUILTIN_VPDPBSUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v16si, "__builtin_ia32_vpdpbsuds512", IX86_BUILTIN_VPDPBSUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v16si, "__builtin_ia32_vpdpbuud512", IX86_BUILTIN_VPDPBUUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v16si, "__builtin_ia32_vpdpbuuds512", IX86_BUILTIN_VPDPBUUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v16si_mask, "__builtin_ia32_vpdpbssd_v16si_mask", IX86_BUILTIN_VPDPBSSDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v16si_maskz, "__builtin_ia32_vpdpbssd_v16si_maskz", IX86_BUILTIN_VPDPBSSDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v16si_mask, "__builtin_ia32_vpdpbssds_v16si_mask", IX86_BUILTIN_VPDPBSSDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v16si_maskz, "__builtin_ia32_vpdpbssds_v16si_maskz", IX86_BUILTIN_VPDPBSSDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v16si_mask, "__builtin_ia32_vpdpbsud_v16si_mask", IX86_BUILTIN_VPDPBSUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v16si_maskz, "__builtin_ia32_vpdpbsud_v16si_maskz", IX86_BUILTIN_VPDPBSUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v16si_mask, "__builtin_ia32_vpdpbsuds_v16si_mask", IX86_BUILTIN_VPDPBSUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v16si_maskz, "__builtin_ia32_vpdpbsuds_v16si_maskz", IX86_BUILTIN_VPDPBSUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v16si_mask, "__builtin_ia32_vpdpbuud_v16si_mask", IX86_BUILTIN_VPDPBUUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v16si_maskz, "__builtin_ia32_vpdpbuud_v16si_maskz", IX86_BUILTIN_VPDPBUUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v16si_mask, "__builtin_ia32_vpdpbuuds_v16si_mask", IX86_BUILTIN_VPDPBUUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v16si_maskz, "__builtin_ia32_vpdpbuuds_v16si_maskz", IX86_BUILTIN_VPDPBUUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v8si_mask, "__builtin_ia32_vpdpbssd_v8si_mask", IX86_BUILTIN_VPDPBSSDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v8si_maskz, "__builtin_ia32_vpdpbssd_v8si_maskz", IX86_BUILTIN_VPDPBSSDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v8si_mask, "__builtin_ia32_vpdpbssds_v8si_mask", IX86_BUILTIN_VPDPBSSDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v8si_maskz, "__builtin_ia32_vpdpbssds_v8si_maskz", IX86_BUILTIN_VPDPBSSDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v8si_mask, "__builtin_ia32_vpdpbsud_v8si_mask", IX86_BUILTIN_VPDPBSUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v8si_maskz, "__builtin_ia32_vpdpbsud_v8si_maskz", IX86_BUILTIN_VPDPBSUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v8si_mask, "__builtin_ia32_vpdpbsuds_v8si_mask", IX86_BUILTIN_VPDPBSUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v8si_maskz, "__builtin_ia32_vpdpbsuds_v8si_maskz", IX86_BUILTIN_VPDPBSUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v8si_mask, "__builtin_ia32_vpdpbuud_v8si_mask", IX86_BUILTIN_VPDPBUUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v8si_maskz, "__builtin_ia32_vpdpbuud_v8si_maskz", IX86_BUILTIN_VPDPBUUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v8si_mask, "__builtin_ia32_vpdpbuuds_v8si_mask", IX86_BUILTIN_VPDPBUUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v8si_maskz, "__builtin_ia32_vpdpbuuds_v8si_maskz", IX86_BUILTIN_VPDPBUUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v4si_mask, "__builtin_ia32_vpdpbssd_v4si_mask", IX86_BUILTIN_VPDPBSSDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v4si_maskz, "__builtin_ia32_vpdpbssd_v4si_maskz", IX86_BUILTIN_VPDPBSSDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v4si_mask, "__builtin_ia32_vpdpbssds_v4si_mask", IX86_BUILTIN_VPDPBSSDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v4si_maskz, "__builtin_ia32_vpdpbssds_v4si_maskz", IX86_BUILTIN_VPDPBSSDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v4si_mask, "__builtin_ia32_vpdpbsud_v4si_mask", IX86_BUILTIN_VPDPBSUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v4si_maskz, "__builtin_ia32_vpdpbsud_v4si_maskz", IX86_BUILTIN_VPDPBSUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v4si_mask, "__builtin_ia32_vpdpbsuds_v4si_mask", IX86_BUILTIN_VPDPBSUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v4si_maskz, "__builtin_ia32_vpdpbsuds_v4si_maskz", IX86_BUILTIN_VPDPBSUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v4si_mask, "__builtin_ia32_vpdpbuud_v4si_mask", IX86_BUILTIN_VPDPBUUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v4si_maskz, "__builtin_ia32_vpdpbuud_v4si_maskz", IX86_BUILTIN_VPDPBUUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v4si_mask, "__builtin_ia32_vpdpbuuds_v4si_mask", IX86_BUILTIN_VPDPBUUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v4si_maskz, "__builtin_ia32_vpdpbuuds_v4si_maskz", IX86_BUILTIN_VPDPBUUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v16si, "__builtin_ia32_vpdpwsud512", IX86_BUILTIN_VPDPWSUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v16si, "__builtin_ia32_vpdpwsuds512", IX86_BUILTIN_VPDPWSUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v16si, "__builtin_ia32_vpdpwusd512", IX86_BUILTIN_VPDPWUSDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v16si, "__builtin_ia32_vpdpwusds512", IX86_BUILTIN_VPDPWUSDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v16si, "__builtin_ia32_vpdpwuud512", IX86_BUILTIN_VPDPWUUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v16si, "__builtin_ia32_vpdpwuuds512", IX86_BUILTIN_VPDPWUUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v16si_mask, "__builtin_ia32_vpdpwsud_v16si_mask", IX86_BUILTIN_VPDPWSUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v16si_maskz, "__builtin_ia32_vpdpwsud_v16si_maskz", IX86_BUILTIN_VPDPWSUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v16si_mask, "__builtin_ia32_vpdpwsuds_v16si_mask", IX86_BUILTIN_VPDPWSUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v16si_maskz, "__builtin_ia32_vpdpwsuds_v16si_maskz", IX86_BUILTIN_VPDPWSUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v16si_mask, "__builtin_ia32_vpdpwusd_v16si_mask", IX86_BUILTIN_VPDPWUSDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v16si_maskz, "__builtin_ia32_vpdpwusd_v16si_maskz", IX86_BUILTIN_VPDPWUSDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v16si_mask, "__builtin_ia32_vpdpwusds_v16si_mask", IX86_BUILTIN_VPDPWUSDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v16si_maskz, "__builtin_ia32_vpdpwusds_v16si_maskz", IX86_BUILTIN_VPDPWUSDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v16si_mask, "__builtin_ia32_vpdpwuud_v16si_mask", IX86_BUILTIN_VPDPWUUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v16si_maskz, "__builtin_ia32_vpdpwuud_v16si_maskz", IX86_BUILTIN_VPDPWUUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v16si_mask, "__builtin_ia32_vpdpwuuds_v16si_mask", IX86_BUILTIN_VPDPWUUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v16si_maskz, "__builtin_ia32_vpdpwuuds_v16si_maskz", IX86_BUILTIN_VPDPWUUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v8si_mask, "__builtin_ia32_vpdpwsud_v8si_mask", IX86_BUILTIN_VPDPWSUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v8si_maskz, "__builtin_ia32_vpdpwsud_v8si_maskz", IX86_BUILTIN_VPDPWSUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v8si_mask, "__builtin_ia32_vpdpwsuds_v8si_mask", IX86_BUILTIN_VPDPWSUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v8si_maskz, "__builtin_ia32_vpdpwsuds_v8si_maskz", IX86_BUILTIN_VPDPWSUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v8si_mask, "__builtin_ia32_vpdpwusd_v8si_mask", IX86_BUILTIN_VPDPWUSDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v8si_maskz, "__builtin_ia32_vpdpwusd_v8si_maskz", IX86_BUILTIN_VPDPWUSDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v8si_mask, "__builtin_ia32_vpdpwusds_v8si_mask", IX86_BUILTIN_VPDPWUSDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v8si_maskz, "__builtin_ia32_vpdpwusds_v8si_maskz", IX86_BUILTIN_VPDPWUSDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v8si_mask, "__builtin_ia32_vpdpwuud_v8si_mask", IX86_BUILTIN_VPDPWUUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v8si_maskz, "__builtin_ia32_vpdpwuud_v8si_maskz", IX86_BUILTIN_VPDPWUUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v8si_mask, "__builtin_ia32_vpdpwuuds_v8si_mask", IX86_BUILTIN_VPDPWUUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v8si_maskz, "__builtin_ia32_vpdpwuuds_v8si_maskz", IX86_BUILTIN_VPDPWUUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v4si_mask, "__builtin_ia32_vpdpwsud_v4si_mask", IX86_BUILTIN_VPDPWSUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v4si_maskz, "__builtin_ia32_vpdpwsud_v4si_maskz", IX86_BUILTIN_VPDPWSUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v4si_mask, "__builtin_ia32_vpdpwsuds_v4si_mask", IX86_BUILTIN_VPDPWSUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v4si_maskz, "__builtin_ia32_vpdpwsuds_v4si_maskz", IX86_BUILTIN_VPDPWSUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v4si_mask, "__builtin_ia32_vpdpwusd_v4si_mask", IX86_BUILTIN_VPDPWUSDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v4si_maskz, "__builtin_ia32_vpdpwusd_v4si_maskz", IX86_BUILTIN_VPDPWUSDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v4si_mask, "__builtin_ia32_vpdpwusds_v4si_mask", IX86_BUILTIN_VPDPWUSDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v4si_maskz, "__builtin_ia32_vpdpwusds_v4si_maskz", IX86_BUILTIN_VPDPWUSDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v4si_mask, "__builtin_ia32_vpdpwuud_v4si_mask", IX86_BUILTIN_VPDPWUUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v4si_maskz, "__builtin_ia32_vpdpwuud_v4si_maskz", IX86_BUILTIN_VPDPWUUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v4si_mask, "__builtin_ia32_vpdpwuuds_v4si_mask", IX86_BUILTIN_VPDPWUUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v4si_maskz, "__builtin_ia32_vpdpwuuds_v4si_maskz", IX86_BUILTIN_VPDPWUUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssd_v16si, "__builtin_ia32_vpdpbssd512", IX86_BUILTIN_VPDPBSSDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssds_v16si, "__builtin_ia32_vpdpbssds512", IX86_BUILTIN_VPDPBSSDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsud_v16si, "__builtin_ia32_vpdpbsud512", IX86_BUILTIN_VPDPBSUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsuds_v16si, "__builtin_ia32_vpdpbsuds512", IX86_BUILTIN_VPDPBSUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuud_v16si, "__builtin_ia32_vpdpbuud512", IX86_BUILTIN_VPDPBUUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuuds_v16si, "__builtin_ia32_vpdpbuuds512", IX86_BUILTIN_VPDPBUUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssd_v16si_mask, "__builtin_ia32_vpdpbssd_v16si_mask", IX86_BUILTIN_VPDPBSSDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssd_v16si_maskz, "__builtin_ia32_vpdpbssd_v16si_maskz", IX86_BUILTIN_VPDPBSSDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssds_v16si_mask, "__builtin_ia32_vpdpbssds_v16si_mask", IX86_BUILTIN_VPDPBSSDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssds_v16si_maskz, "__builtin_ia32_vpdpbssds_v16si_maskz", IX86_BUILTIN_VPDPBSSDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsud_v16si_mask, "__builtin_ia32_vpdpbsud_v16si_mask", IX86_BUILTIN_VPDPBSUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsud_v16si_maskz, "__builtin_ia32_vpdpbsud_v16si_maskz", IX86_BUILTIN_VPDPBSUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsuds_v16si_mask, "__builtin_ia32_vpdpbsuds_v16si_mask", IX86_BUILTIN_VPDPBSUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsuds_v16si_maskz, "__builtin_ia32_vpdpbsuds_v16si_maskz", IX86_BUILTIN_VPDPBSUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuud_v16si_mask, "__builtin_ia32_vpdpbuud_v16si_mask", IX86_BUILTIN_VPDPBUUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuud_v16si_maskz, "__builtin_ia32_vpdpbuud_v16si_maskz", IX86_BUILTIN_VPDPBUUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuuds_v16si_mask, "__builtin_ia32_vpdpbuuds_v16si_mask", IX86_BUILTIN_VPDPBUUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuuds_v16si_maskz, "__builtin_ia32_vpdpbuuds_v16si_maskz", IX86_BUILTIN_VPDPBUUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssd_v8si_mask, "__builtin_ia32_vpdpbssd_v8si_mask", IX86_BUILTIN_VPDPBSSDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssd_v8si_maskz, "__builtin_ia32_vpdpbssd_v8si_maskz", IX86_BUILTIN_VPDPBSSDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssds_v8si_mask, "__builtin_ia32_vpdpbssds_v8si_mask", IX86_BUILTIN_VPDPBSSDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssds_v8si_maskz, "__builtin_ia32_vpdpbssds_v8si_maskz", IX86_BUILTIN_VPDPBSSDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsud_v8si_mask, "__builtin_ia32_vpdpbsud_v8si_mask", IX86_BUILTIN_VPDPBSUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsud_v8si_maskz, "__builtin_ia32_vpdpbsud_v8si_maskz", IX86_BUILTIN_VPDPBSUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsuds_v8si_mask, "__builtin_ia32_vpdpbsuds_v8si_mask", IX86_BUILTIN_VPDPBSUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsuds_v8si_maskz, "__builtin_ia32_vpdpbsuds_v8si_maskz", IX86_BUILTIN_VPDPBSUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuud_v8si_mask, "__builtin_ia32_vpdpbuud_v8si_mask", IX86_BUILTIN_VPDPBUUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuud_v8si_maskz, "__builtin_ia32_vpdpbuud_v8si_maskz", IX86_BUILTIN_VPDPBUUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuuds_v8si_mask, "__builtin_ia32_vpdpbuuds_v8si_mask", IX86_BUILTIN_VPDPBUUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuuds_v8si_maskz, "__builtin_ia32_vpdpbuuds_v8si_maskz", IX86_BUILTIN_VPDPBUUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssd_v4si_mask, "__builtin_ia32_vpdpbssd_v4si_mask", IX86_BUILTIN_VPDPBSSDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssd_v4si_maskz, "__builtin_ia32_vpdpbssd_v4si_maskz", IX86_BUILTIN_VPDPBSSDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssds_v4si_mask, "__builtin_ia32_vpdpbssds_v4si_mask", IX86_BUILTIN_VPDPBSSDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbssds_v4si_maskz, "__builtin_ia32_vpdpbssds_v4si_maskz", IX86_BUILTIN_VPDPBSSDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsud_v4si_mask, "__builtin_ia32_vpdpbsud_v4si_mask", IX86_BUILTIN_VPDPBSUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsud_v4si_maskz, "__builtin_ia32_vpdpbsud_v4si_maskz", IX86_BUILTIN_VPDPBSUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsuds_v4si_mask, "__builtin_ia32_vpdpbsuds_v4si_mask", IX86_BUILTIN_VPDPBSUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbsuds_v4si_maskz, "__builtin_ia32_vpdpbsuds_v4si_maskz", IX86_BUILTIN_VPDPBSUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuud_v4si_mask, "__builtin_ia32_vpdpbuud_v4si_mask", IX86_BUILTIN_VPDPBUUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuud_v4si_maskz, "__builtin_ia32_vpdpbuud_v4si_maskz", IX86_BUILTIN_VPDPBUUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuuds_v4si_mask, "__builtin_ia32_vpdpbuuds_v4si_mask", IX86_BUILTIN_VPDPBUUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpbuuds_v4si_maskz, "__builtin_ia32_vpdpbuuds_v4si_maskz", IX86_BUILTIN_VPDPBUUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsud_v16si, "__builtin_ia32_vpdpwsud512", IX86_BUILTIN_VPDPWSUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsuds_v16si, "__builtin_ia32_vpdpwsuds512", IX86_BUILTIN_VPDPWSUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusd_v16si, "__builtin_ia32_vpdpwusd512", IX86_BUILTIN_VPDPWUSDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusds_v16si, "__builtin_ia32_vpdpwusds512", IX86_BUILTIN_VPDPWUSDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuud_v16si, "__builtin_ia32_vpdpwuud512", IX86_BUILTIN_VPDPWUUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuuds_v16si, "__builtin_ia32_vpdpwuuds512", IX86_BUILTIN_VPDPWUUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsud_v16si_mask, "__builtin_ia32_vpdpwsud_v16si_mask", IX86_BUILTIN_VPDPWSUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsud_v16si_maskz, "__builtin_ia32_vpdpwsud_v16si_maskz", IX86_BUILTIN_VPDPWSUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsuds_v16si_mask, "__builtin_ia32_vpdpwsuds_v16si_mask", IX86_BUILTIN_VPDPWSUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsuds_v16si_maskz, "__builtin_ia32_vpdpwsuds_v16si_maskz", IX86_BUILTIN_VPDPWSUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusd_v16si_mask, "__builtin_ia32_vpdpwusd_v16si_mask", IX86_BUILTIN_VPDPWUSDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusd_v16si_maskz, "__builtin_ia32_vpdpwusd_v16si_maskz", IX86_BUILTIN_VPDPWUSDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusds_v16si_mask, "__builtin_ia32_vpdpwusds_v16si_mask", IX86_BUILTIN_VPDPWUSDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusds_v16si_maskz, "__builtin_ia32_vpdpwusds_v16si_maskz", IX86_BUILTIN_VPDPWUSDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuud_v16si_mask, "__builtin_ia32_vpdpwuud_v16si_mask", IX86_BUILTIN_VPDPWUUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuud_v16si_maskz, "__builtin_ia32_vpdpwuud_v16si_maskz", IX86_BUILTIN_VPDPWUUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuuds_v16si_mask, "__builtin_ia32_vpdpwuuds_v16si_mask", IX86_BUILTIN_VPDPWUUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuuds_v16si_maskz, "__builtin_ia32_vpdpwuuds_v16si_maskz", IX86_BUILTIN_VPDPWUUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsud_v8si_mask, "__builtin_ia32_vpdpwsud_v8si_mask", IX86_BUILTIN_VPDPWSUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsud_v8si_maskz, "__builtin_ia32_vpdpwsud_v8si_maskz", IX86_BUILTIN_VPDPWSUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsuds_v8si_mask, "__builtin_ia32_vpdpwsuds_v8si_mask", IX86_BUILTIN_VPDPWSUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsuds_v8si_maskz, "__builtin_ia32_vpdpwsuds_v8si_maskz", IX86_BUILTIN_VPDPWSUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusd_v8si_mask, "__builtin_ia32_vpdpwusd_v8si_mask", IX86_BUILTIN_VPDPWUSDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusd_v8si_maskz, "__builtin_ia32_vpdpwusd_v8si_maskz", IX86_BUILTIN_VPDPWUSDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusds_v8si_mask, "__builtin_ia32_vpdpwusds_v8si_mask", IX86_BUILTIN_VPDPWUSDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusds_v8si_maskz, "__builtin_ia32_vpdpwusds_v8si_maskz", IX86_BUILTIN_VPDPWUSDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuud_v8si_mask, "__builtin_ia32_vpdpwuud_v8si_mask", IX86_BUILTIN_VPDPWUUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuud_v8si_maskz, "__builtin_ia32_vpdpwuud_v8si_maskz", IX86_BUILTIN_VPDPWUUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuuds_v8si_mask, "__builtin_ia32_vpdpwuuds_v8si_mask", IX86_BUILTIN_VPDPWUUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuuds_v8si_maskz, "__builtin_ia32_vpdpwuuds_v8si_maskz", IX86_BUILTIN_VPDPWUUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsud_v4si_mask, "__builtin_ia32_vpdpwsud_v4si_mask", IX86_BUILTIN_VPDPWSUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsud_v4si_maskz, "__builtin_ia32_vpdpwsud_v4si_maskz", IX86_BUILTIN_VPDPWSUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsuds_v4si_mask, "__builtin_ia32_vpdpwsuds_v4si_mask", IX86_BUILTIN_VPDPWSUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwsuds_v4si_maskz, "__builtin_ia32_vpdpwsuds_v4si_maskz", IX86_BUILTIN_VPDPWSUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusd_v4si_mask, "__builtin_ia32_vpdpwusd_v4si_mask", IX86_BUILTIN_VPDPWUSDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusd_v4si_maskz, "__builtin_ia32_vpdpwusd_v4si_maskz", IX86_BUILTIN_VPDPWUSDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusds_v4si_mask, "__builtin_ia32_vpdpwusds_v4si_mask", IX86_BUILTIN_VPDPWUSDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwusds_v4si_maskz, "__builtin_ia32_vpdpwusds_v4si_maskz", IX86_BUILTIN_VPDPWUSDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuud_v4si_mask, "__builtin_ia32_vpdpwuud_v4si_mask", IX86_BUILTIN_VPDPWUUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuud_v4si_maskz, "__builtin_ia32_vpdpwuud_v4si_maskz", IX86_BUILTIN_VPDPWUUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuuds_v4si_mask, "__builtin_ia32_vpdpwuuds_v4si_mask", IX86_BUILTIN_VPDPWUUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10V1AUX, CODE_FOR_vpdpwuuds_v4si_maskz, "__builtin_ia32_vpdpwuuds_v4si_maskz", IX86_BUILTIN_VPDPWUUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vdpphps_v16sf_mask, "__builtin_ia32_vdpphps512_mask", IX86_BUILTIN_VDPPHPS512_MASK, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_V16SF_UHI)
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vdpphps_v16sf_maskz, "__builtin_ia32_vdpphps512_maskz", IX86_BUILTIN_VDPPHPS512_MASKZ, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_V16SF_UHI)
BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vdpphps_v8sf_mask, "__builtin_ia32_vdpphps256_mask", IX86_BUILTIN_VDPPHPS256_MASK, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI)
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
index a81993c29c52..285227a3f943 100644
--- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc
@@ -14995,8 +14995,8 @@ ix86_check_builtin_isa_match (unsigned int fcode,
(OPTION_MASK_ISA_AVX512VL | OPTION_MASK_ISA2_AVX512BF16) or
OPTION_MASK_ISA2_AVXNECONVERT
OPTION_MASK_ISA_AES or (OPTION_MASK_ISA_AVX512VL | OPTION_MASK_ISA2_VAES)
- OPTION_MASK_ISA2_AVX10_2 or OPTION_MASK_ISA2_AVXVNNIINT8
- OPTION_MASK_ISA2_AVX10_2 or OPTION_MASK_ISA2_AVXVNNIINT16
+ OPTION_MASK_ISA2_AVX10V1AUX or OPTION_MASK_ISA2_AVXVNNIINT8
+ OPTION_MASK_ISA2_AVX10V1AUX or OPTION_MASK_ISA2_AVXVNNIINT16
OPTION_MASK_ISA2_AMX_TILE or OPTION_MASK_ISA2_ACEV1
where for each such pair it is sufficient if either of the ISAs is
enabled, plus if it is ored with other options also those others.
@@ -15024,9 +15024,9 @@ ix86_check_builtin_isa_match (unsigned int fcode,
SHARE_BUILTIN (OPTION_MASK_ISA_AES, 0, OPTION_MASK_ISA_AVX512VL,
OPTION_MASK_ISA2_VAES);
SHARE_BUILTIN (0, OPTION_MASK_ISA2_AVXVNNIINT8, 0,
- OPTION_MASK_ISA2_AVX10_2);
+ OPTION_MASK_ISA2_AVX10V1AUX);
SHARE_BUILTIN (0, OPTION_MASK_ISA2_AVXVNNIINT16, 0,
- OPTION_MASK_ISA2_AVX10_2);
+ OPTION_MASK_ISA2_AVX10V1AUX);
SHARE_BUILTIN (0, OPTION_MASK_ISA2_AMX_TILE, 0, OPTION_MASK_ISA2_ACEV1);
isa = tmp_isa;
isa2 = tmp_isa2;
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index 2aad91ecf46e..21ef8d5b4b13 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -27092,8 +27092,8 @@ ix86_vector_costs::add_stmt_cost (int count, vect_cost_for_stmt kind,
/* vpdpbssd. */
native_vnni_p
= (GET_MODE_SIZE (mode) == 64
- ? TARGET_AVX10_2
- : (TARGET_AVXVNNIINT8 || TARGET_AVX10_2));
+ ? TARGET_AVX10V1AUX
+ : (TARGET_AVXVNNIINT8 || TARGET_AVX10V1AUX));
}
m_num_reduc[X86_REDUC_DOT_PROD] += count * scale;
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index d5b90291fc9c..1fff2f0a277c 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -613,7 +613,8 @@
avx512bw,noavx512bw,avx512dq,noavx512dq,fma_or_avx512vl,
avx512vl,noavx512vl,avxvnni,avxvnniint8,avx512vnnivl,avx512fp16,avxifma,
avx512ifmavl,avxneconvert,avx512bf16vl,vpclmulqdqvl,
- avx_noavx512f,avx_noavx512vl,vaes_avx512vl,noapx_nf,avx10_2"
+ avx_noavx512f,avx_noavx512vl,vaes_avx512vl,noapx_nf,avx10_2,
+ avx10v1aux"
(const_string "base"))
;; The (bounding maximum) length of an instruction immediate.
@@ -1015,6 +1016,7 @@
(eq_attr "isa" "vaes_avx512vl")
(symbol_ref "TARGET_VAES && TARGET_AVX512VL")
(eq_attr "isa" "avx10_2") (symbol_ref "TARGET_AVX10_2")
+ (eq_attr "isa" "avx10v1aux") (symbol_ref "TARGET_AVX10V1AUX")
(eq_attr "mmx_isa" "native")
(symbol_ref "!TARGET_MMX_WITH_SSE")
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index a223acc606d7..b4a41d7abd53 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -695,8 +695,8 @@
(define_mode_iterator VI2_AVX512F
[(V32HI "TARGET_AVX512F") (V16HI "TARGET_AVX2") V8HI])
-(define_mode_iterator VI2_AVX10_2
- [(V32HI "TARGET_AVX10_2") (V16HI "TARGET_AVX2") V8HI])
+(define_mode_iterator VI2_AVX10V1AUX
+ [(V32HI "TARGET_AVX10V1AUX") (V16HI "TARGET_AVX2") V8HI])
(define_mode_iterator VI2_AVX512VNNIBW
[(V32HI "TARGET_AVX512BW || TARGET_AVX512VNNI")
@@ -717,6 +717,9 @@
(define_mode_iterator VI4_AVX10_2
[(V16SI "TARGET_AVX10_2") V8SI V4SI])
+(define_mode_iterator VI4_AVX10V1AUX
+ [(V16SI "TARGET_AVX10V1AUX") V8SI V4SI])
+
(define_mode_iterator VI48_AVX512F_AVX512VL
[V4SI V8SI (V16SI "TARGET_AVX512F")
(V2DI "TARGET_AVX512VL") (V4DI "TARGET_AVX512VL")
@@ -33200,8 +33203,8 @@
(match_operand: 3 "register_operand")]
"TARGET_SSE2"
{
- if (( == 64 && TARGET_AVX10_2)
- || ( < 64 && (TARGET_AVXVNNIINT8 || TARGET_AVX10_2)))
+ if (( == 64 && TARGET_AVX10V1AUX)
+ || ( < 64 && (TARGET_AVXVNNIINT8 || TARGET_AVX10V1AUX)))
{
operands[1] = lowpart_subreg (mode,
force_reg (mode, operands[1]),
@@ -33248,8 +33251,8 @@
(match_operand: 3 "register_operand")]
"TARGET_SSE2"
{
- if (( == 64 && TARGET_AVX10_2)
- || ( < 64 && (TARGET_AVXVNNIINT8 || TARGET_AVX10_2)))
+ if (( == 64 && TARGET_AVX10V1AUX)
+ || ( < 64 && (TARGET_AVXVNNIINT8 || TARGET_AVX10V1AUX)))
{
operands[1] = lowpart_subreg (mode,
force_reg (mode, operands[1]),
@@ -33296,11 +33299,11 @@
(match_operand:VI4_AVX 2 "register_operand" "x,v")
(match_operand:VI4_AVX 3 "nonimmediate_operand" "xjm,vm")]
VPDOTPROD))]
- "TARGET_AVXVNNIINT8 || TARGET_AVX10_2"
+ "TARGET_AVXVNNIINT8 || TARGET_AVX10V1AUX"
"vpdp\t{%3, %2, %0|%0, %2, %3}"
[(set_attr "prefix" "maybe_evex")
(set_attr "addr" "gpr16,*")
- (set_attr "isa" "avxvnniint8,avx10_2")])
+ (set_attr "isa" "avxvnniint8,avx10v1aux")])
(define_insn "vpdp_v16si"
[(set (match_operand:V16SI 0 "register_operand" "=v")
@@ -33309,48 +33312,48 @@
(match_operand:V16SI 2 "register_operand" "v")
(match_operand:V16SI 3 "nonimmediate_operand" "vm")]
VPDOTPROD))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vpdp\t{%3, %2, %0|%0, %2, %3}"
[(set_attr "prefix" "evex")])
(define_insn "vpdp__mask"
- [(set (match_operand:VI4_AVX10_2 0 "register_operand" "=v")
- (vec_merge:VI4_AVX10_2
- (unspec:VI4_AVX10_2
- [(match_operand:VI4_AVX10_2 1 "register_operand" "0")
- (match_operand:VI4_AVX10_2 2 "register_operand" "v")
- (match_operand:VI4_AVX10_2 3 "nonimmediate_operand" "vm")]
+ [(set (match_operand:VI4_AVX10V1AUX 0 "register_operand" "=v")
+ (vec_merge:VI4_AVX10V1AUX
+ (unspec:VI4_AVX10V1AUX
+ [(match_operand:VI4_AVX10V1AUX 1 "register_operand" "0")
+ (match_operand:VI4_AVX10V1AUX 2 "register_operand" "v")
+ (match_operand:VI4_AVX10V1AUX 3 "nonimmediate_operand" "vm")]
VPDOTPROD)
(match_dup 1)
(match_operand: 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vpdp\t{%3, %2, %0%{%4%}|%0%{%4%}, %2, %3}"
[(set_attr "prefix" "evex")])
(define_expand "vpdp__maskz"
- [(set (match_operand:VI4_AVX10_2 0 "register_operand")
- (vec_merge:VI4_AVX10_2
- (unspec:VI4_AVX10_2
- [(match_operand:VI4_AVX10_2 1 "register_operand")
- (match_operand:VI4_AVX10_2 2 "register_operand")
- (match_operand:VI4_AVX10_2 3 "nonimmediate_operand")]
+ [(set (match_operand:VI4_AVX10V1AUX 0 "register_operand")
+ (vec_merge:VI4_AVX10V1AUX
+ (unspec:VI4_AVX10V1AUX
+ [(match_operand:VI4_AVX10V1AUX 1 "register_operand")
+ (match_operand:VI4_AVX10V1AUX 2 "register_operand")
+ (match_operand:VI4_AVX10V1AUX 3 "nonimmediate_operand")]
VPDOTPROD)
(match_dup 5)
(match_operand: 4 "register_operand")))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"operands[5] = CONST0_RTX (mode);")
(define_insn "*vpdp__maskz"
- [(set (match_operand:VI4_AVX10_2 0 "register_operand" "=v")
- (vec_merge:VI4_AVX10_2
- (unspec:VI4_AVX10_2
- [(match_operand:VI4_AVX10_2 1 "register_operand" "0")
- (match_operand:VI4_AVX10_2 2 "register_operand" "v")
- (match_operand:VI4_AVX10_2 3 "nonimmediate_operand" "vm")]
+ [(set (match_operand:VI4_AVX10V1AUX 0 "register_operand" "=v")
+ (vec_merge:VI4_AVX10V1AUX
+ (unspec:VI4_AVX10V1AUX
+ [(match_operand:VI4_AVX10V1AUX 1 "register_operand" "0")
+ (match_operand:VI4_AVX10V1AUX 2 "register_operand" "v")
+ (match_operand:VI4_AVX10V1AUX 3 "nonimmediate_operand" "vm")]
VPDOTPROD)
- (match_operand:VI4_AVX10_2 5 "const0_operand" "C")
+ (match_operand:VI4_AVX10V1AUX 5 "const0_operand" "C")
(match_operand: 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vpdp\t{%3, %2, %0%{%4%}%N5|%0%{%4%}%N5, %2, %3}"
[(set_attr "prefix" "evex")])
@@ -33667,10 +33670,10 @@
(define_expand "usdot_prod"
[(match_operand: 0 "register_operand")
- (match_operand:VI2_AVX10_2 1 "register_operand")
- (match_operand:VI2_AVX10_2 2 "register_operand")
+ (match_operand:VI2_AVX10V1AUX 1 "register_operand")
+ (match_operand:VI2_AVX10V1AUX 2 "register_operand")
(match_operand: 3 "register_operand")]
- "TARGET_AVXVNNIINT16 || TARGET_AVX10_2"
+ "TARGET_AVXVNNIINT16 || TARGET_AVX10V1AUX"
{
operands[1] = lowpart_subreg (mode,
force_reg (mode, operands[1]),
@@ -33685,10 +33688,10 @@
(define_expand "udot_prod"
[(match_operand: 0 "register_operand")
- (match_operand:VI2_AVX10_2 1 "register_operand")
- (match_operand:VI2_AVX10_2 2 "register_operand")
+ (match_operand:VI2_AVX10V1AUX 1 "register_operand")
+ (match_operand:VI2_AVX10V1AUX 2 "register_operand")
(match_operand: 3 "register_operand")]
- "TARGET_AVXVNNIINT16 || TARGET_AVX10_2"
+ "TARGET_AVXVNNIINT16 || TARGET_AVX10V1AUX"
{
operands[1] = lowpart_subreg (mode,
force_reg (mode, operands[1]),
@@ -33708,7 +33711,7 @@
(match_operand:VI4_AVX 2 "register_operand" "v")
(match_operand:VI4_AVX 3 "nonimmediate_operand" "vm")]
VPDPWPROD))]
- "TARGET_AVXVNNIINT16 || TARGET_AVX10_2"
+ "TARGET_AVXVNNIINT16 || TARGET_AVX10V1AUX"
"vpdp\t{%3, %2, %0|%0, %2, %3}"
[(set_attr "prefix" "maybe_evex")])
@@ -33719,48 +33722,48 @@
(match_operand:V16SI 2 "register_operand" "v")
(match_operand:V16SI 3 "nonimmediate_operand" "vm")]
VPDPWPROD))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vpdp\t{%3, %2, %0|%0, %2, %3}"
[(set_attr "prefix" "evex")])
(define_insn "vpdp__mask"
- [(set (match_operand:VI4_AVX10_2 0 "register_operand" "=v")
- (vec_merge:VI4_AVX10_2
- (unspec:VI4_AVX10_2
- [(match_operand:VI4_AVX10_2 1 "register_operand" "0")
- (match_operand:VI4_AVX10_2 2 "register_operand" "v")
- (match_operand:VI4_AVX10_2 3 "nonimmediate_operand" "vm")]
+ [(set (match_operand:VI4_AVX10V1AUX 0 "register_operand" "=v")
+ (vec_merge:VI4_AVX10V1AUX
+ (unspec:VI4_AVX10V1AUX
+ [(match_operand:VI4_AVX10V1AUX 1 "register_operand" "0")
+ (match_operand:VI4_AVX10V1AUX 2 "register_operand" "v")
+ (match_operand:VI4_AVX10V1AUX 3 "nonimmediate_operand" "vm")]
VPDPWPROD)
(match_dup 1)
(match_operand: 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vpdp\t{%3, %2, %0%{%4%}|%0%{%4%}, %2, %3}"
[(set_attr "prefix" "evex")])
(define_expand "vpdp__maskz"
- [(set (match_operand:VI4_AVX10_2 0 "register_operand")
- (vec_merge:VI4_AVX10_2
- (unspec:VI4_AVX10_2
- [(match_operand:VI4_AVX10_2 1 "register_operand")
- (match_operand:VI4_AVX10_2 2 "register_operand")
- (match_operand:VI4_AVX10_2 3 "nonimmediate_operand")]
+ [(set (match_operand:VI4_AVX10V1AUX 0 "register_operand")
+ (vec_merge:VI4_AVX10V1AUX
+ (unspec:VI4_AVX10V1AUX
+ [(match_operand:VI4_AVX10V1AUX 1 "register_operand")
+ (match_operand:VI4_AVX10V1AUX 2 "register_operand")
+ (match_operand:VI4_AVX10V1AUX 3 "nonimmediate_operand")]
VPDPWPROD)
(match_dup 5)
(match_operand: 4 "register_operand")))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"operands[5] = CONST0_RTX (mode);")
(define_insn "*vpdp__maskz"
- [(set (match_operand:VI4_AVX10_2 0 "register_operand" "=v")
- (vec_merge:VI4_AVX10_2
- (unspec:VI4_AVX10_2
- [(match_operand:VI4_AVX10_2 1 "register_operand" "0")
- (match_operand:VI4_AVX10_2 2 "register_operand" "v")
- (match_operand:VI4_AVX10_2 3 "nonimmediate_operand" "vm")]
+ [(set (match_operand:VI4_AVX10V1AUX 0 "register_operand" "=v")
+ (vec_merge:VI4_AVX10V1AUX
+ (unspec:VI4_AVX10V1AUX
+ [(match_operand:VI4_AVX10V1AUX 1 "register_operand" "0")
+ (match_operand:VI4_AVX10V1AUX 2 "register_operand" "v")
+ (match_operand:VI4_AVX10V1AUX 3 "nonimmediate_operand" "vm")]
VPDPWPROD)
- (match_operand:VI4_AVX10_2 5 "const0_operand" "C")
+ (match_operand:VI4_AVX10V1AUX 5 "const0_operand" "C")
(match_operand: 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2"
+ "TARGET_AVX10V1AUX"
"vpdp\t{%3, %2, %0%{%4%}%N5|%0%{%4%}%N5, %2, %3}"
[(set_attr "prefix" "evex")])
--
2.34.1
From jeffrey.law@oss.qualcomm.com Sun Nov 1 14:01:42 2026
From: jeffrey.law@oss.qualcomm.com (Jeff Law)
Date: Sun, 1 Nov 2026 07:01:42 -0700
Subject: [PATCH] testsuite: XFAIL pr125734.c on targets without CLZ support
In-Reply-To: <20261101092433.1988785-1-torbjorn.svensson@foss.st.com>
References: <20261101092433.1988785-1-torbjorn.svensson@foss.st.com>
Message-ID: <7d6e00ea-c16f-4abf-a5e3-41f4603b83f9@oss.qualcomm.com>
On 11/1/26 2:19 AM, Torbj?rn SVENSSON wrote:
> Hi,
>
> The test fails for Cortex-M0 (arm-none-eabi) for, what I belive, the same reason as
> the xfail on hppa*-*-hpux* in r17-4470-ge741ce45698e48.
>
> spawn -ignore SIGHUP /build/r17-5743-ge33129b871c302/bin/arm-none-eabi-gcc /build/gcc_src/gcc/testsuite/gcc.dg/tree-ssa/pr125734.c -mthumb -march=armv6s-m -mcpu=cortex-m0 -mfloat-abi=soft -mfpu=auto -fdiagnostics-plain-output -O2 -fdump-tree-optimized -S -o pr125734.s
> ...
> PASS: gcc.dg/tree-ssa/pr125734.c (test for excess errors)
> gcc.dg/tree-ssa/pr125734.c: pattern found 0 times
> FAIL: gcc.dg/tree-ssa/pr125734.c scan-tree-dump-times optimized "\\.CLZ" 1
>
> Ok for trunk?
>
> --
>
> The test fails on targets without CLZ support.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/tree-ssa/pr125734.c: XFAIl on !clz.
OK
jeff
From torbjorn.svensson@foss.st.com Sun Nov 1 14:15:05 2026
From: torbjorn.svensson@foss.st.com (=?UTF-8?q?Torbj=C3=B6rn=20SVENSSON?=)
Date: Sun, 1 Nov 2026 15:15:05 +0100
Subject: [PATCH] testsuite: Use gcc-nm for symbol scans
Message-ID: <20261101141813.2019428-1-torbjorn.svensson@foss.st.com>
Hi,
This fixes the following error for arm-none-eabi (probably other targets too):
ERROR: gcc.dg/builtin-pi-linkage.c: error executing dg-final: arm-none-eabi-nm: builtin-pi-linkage.o: plugin needed to handle lto object
Ok for trunk?
Kind regards,
Torbj?rn
--
Find gcc-nm alongside the compiler under test instead of searching
the build tree for nm. This ensures that liblto_plugin.so is found
automatically when available, fixing the "plugin needed to handle
lto object" error for LTO tests like gcc.dg/builtin-pi-linkage.c.
Allow GCC_NM_UNDER_TEST to override the tool.
This follows the approach used for gcc-ar in r16-7327-gc9addbc79ac0f9.
gcc/testsuite/ChangeLog:
* lib/gcc-dg.exp (scan-symbol-common): Use gcc-nm and honor
GCC_NM_UNDER_TEST.
Signed-off-by: Torbj?rn SVENSSON
---
gcc/testsuite/lib/gcc-dg.exp | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 9f183259257..bdd74d132c1 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -1394,8 +1394,8 @@ proc gdb-exists { args } {
# Argument 0 is the regexp to match.
# Argument 1 handles expected failures and the like
proc scan-symbol-common { scan_directive args } {
- global nm
- global base_dir
+ global GCC_UNDER_TEST
+ global GCC_NM_UNDER_TEST
# Access variable from gcc-dg-test-1 or lto-execute.
upvar 3 output_file output_file
@@ -1409,15 +1409,20 @@ proc scan-symbol-common { scan_directive args } {
}
}
- # Find nm like we find g++ in g++.exp.
- if ![info exists nm] {
- set nm [findfile $base_dir/../../../binutils/nm \
- $base_dir/../../../binutils/nm \
- [findfile $base_dir/../../nm $base_dir/../../nm \
- [findfile $base_dir/nm $base_dir/nm \
- [transform nm]]]]
- verbose -log "nm is $nm"
+ # For now find gcc-nm in the same directory as $GCC_UNDER_TEST, unless
+ # GCC_NM_UNDER_TEST is defined.
+
+ if ![info exists GCC_NM_UNDER_TEST] {
+ if { ![is_remote host] && [string match "*/*" [lindex $GCC_UNDER_TEST 0]] } {
+ set nm_cmd [file dirname [lindex $GCC_UNDER_TEST 0]]/[gcc-transform-out-of-tree gcc-nm]
+ } else {
+ set nm_cmd [gcc-transform-out-of-tree gcc-nm]
+ }
+ set nm_cmd "$nm_cmd [lrange $GCC_UNDER_TEST 1 end]"
+ } else {
+ set nm_cmd $GCC_NM_UNDER_TEST
}
+ verbose -log "nm is $nm_cmd"
set output_file "[glob -nocomplain $output_file]"
if { $output_file == "" } {
@@ -1425,7 +1430,7 @@ proc scan-symbol-common { scan_directive args } {
return
}
- set fd [open "| $nm $output_file" r]
+ set fd [open "| $nm_cmd $output_file" r]
set text [read $fd]
close $fd
--
2.43.0
From gerald@pfeifer.com Sun Nov 1 14:32:27 2026
From: gerald@pfeifer.com (Gerald Pfeifer)
Date: Sun, 1 Nov 2026 15:32:27 +0100 (CET)
Subject: [pushed] wwwdocs: readings: Drop ISO Modula-2 standards at TU
Delft
Message-ID: <20261101143229.9EB0719BFCA@hamza.pair.com>
Pushed.
Gaius, if you have an alternate link, absolutely feel free to add that (or
let me know). I did not find a good alternative, just the official ISO
standards site which asks for 200+ CHF.
Gerald
The subdomain sc22wg13.twi.tudelft.nl no longer resolves.
---
htdocs/readings.html | 2 --
1 file changed, 2 deletions(-)
diff --git a/htdocs/readings.html b/htdocs/readings.html
index 31c75d050..1902c391a 100644
--- a/htdocs/readings.html
+++ b/htdocs/readings.html
@@ -558,8 +558,6 @@ names.
in Modula-2 (Edition 2)
Programming
in Modula-2 (Edition 4)
- ISO Modula-2 standards
- (base language, OO and generic language extensions)
--
2.56.0
From iains.gcc@gmail.com Sun Nov 1 14:55:15 2026
From: iains.gcc@gmail.com (Iain Sandoe)
Date: Sun, 1 Nov 2026 14:55:15 +0000
Subject: [PATCH] c++, middle-end: Avoid an undefined C4 [125359]
Message-ID: <20261101145544.39238-1-iain@sandoe.co.uk>
Tested on x86_64-darwin, Windows (by the OP) and x86_64/aarch64-linux, OK for
trunk / 16?
thanks
Iain
--- 8< ---
At -Os, -fdeclone-ctor-dtor is enabled, which splits a cdtor into a unified
body (C4) plus C1/C2 thunks.
A TU that inlines a thunk therefore materialises a call to a C4 whose own
offline body is DECL_EXTERNAL (but emitted by nobody), and the link fails with
an undefined reference.
This fires on targets without support for COMDAT or where ONE_ONLY decls are
not marked as DECL_WEAK. The solution is to decline the inline of such thunks
if they would leave a reference to an un-emitted C4.
Some testcase input from an LLM.
Assisted-by: Claude Opus 5.5
PR c++/125359
gcc/ChangeLog:
* cgraph.h: Add flag for no external decl.
* ipa-inline.cc (can_inline_edge_p): Refuse to inline thunks that point
to an absent target.
* lto-cgraph.cc (lto_output_node): Handle no_external_definition.
(lto_output_varpool_node): Likewise.
(input_overwrite_node): Likewise.
(input_varpool_node): Likewise.
gcc/cp/ChangeLog:
* optimize.cc (maybe_thunk_body): Mark cases where a thunkee will
have no availabile def, and therefore the thunk should not be inlined.
gcc/testsuite/ChangeLog:
* g++.dg/opt/declone6-aux.cc: New test.
* g++.dg/opt/declone6.C: New test.
* g++.dg/opt/declone6.h: New test.
Signed-off-by: Iain Sandoe
---
gcc/cgraph.h | 6 +-
gcc/cp/optimize.cc | 12 ++++
gcc/ipa-inline.cc | 14 ++++
gcc/lto-cgraph.cc | 4 ++
gcc/testsuite/g++.dg/opt/declone-cdtor-lto.C | 69 ++++++++++++++++++++
gcc/testsuite/g++.dg/opt/declone6-aux.cc | 8 +++
gcc/testsuite/g++.dg/opt/declone6.C | 61 +++++++++++++++++
gcc/testsuite/g++.dg/opt/declone6.h | 26 ++++++++
8 files changed, 199 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/g++.dg/opt/declone-cdtor-lto.C
create mode 100644 gcc/testsuite/g++.dg/opt/declone6-aux.cc
create mode 100644 gcc/testsuite/g++.dg/opt/declone6.C
create mode 100644 gcc/testsuite/g++.dg/opt/declone6.h
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index cad7fb3c127..2bed061b3ff 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -149,7 +149,8 @@ public:
must_remain_in_tu_name (false), must_remain_in_tu_body (false),
unique_name (false), implicit_section (false), body_removed (false),
semantic_interposition (flag_semantic_interposition),
- used_from_other_partition (false), in_other_partition (false),
+ used_from_other_partition (false), no_external_definition (false),
+ in_other_partition (false),
address_taken (false), in_init_priority_hash (false),
need_lto_streaming (false), offloadable (false), ifunc_resolver (false),
next_sharing_asm_name (NULL),
@@ -622,6 +623,9 @@ public:
/* Set when variable is used from other LTRANS partition. */
unsigned used_from_other_partition : 1;
+ /* Set when no definition of this symbol is guaranteed to exist in any
+ translation unit. */
+ unsigned no_external_definition : 1;
/* Set when function is available in the other LTRANS partition.
During WPA output it is used to mark nodes that are present in
multiple partitions. */
diff --git a/gcc/cp/optimize.cc b/gcc/cp/optimize.cc
index 0afeefd5704..83a3d7ba804 100644
--- a/gcc/cp/optimize.cc
+++ b/gcc/cp/optimize.cc
@@ -295,6 +295,8 @@ maybe_thunk_body (tree fn, bool force)
DECL_ABSTRACT_P (fn) = false;
if (!DECL_WEAK (fn))
{
+ if (DECL_ONE_ONLY (fn))
+ symtab_node::get_create (fn)->no_external_definition = true;
TREE_PUBLIC (fn) = false;
DECL_EXTERNAL (fn) = false;
DECL_INTERFACE_KNOWN (fn) = true;
@@ -327,6 +329,16 @@ maybe_thunk_body (tree fn, bool force)
DECL_WEAK (fn) = false;
DECL_COMDAT (fn) = false;
}
+ else
+ {
+ /* Neither case above could claim the unified body for this TU, so keep
+ vague linkage and may end up DECL_EXTERNAL. However, no other TU
+ will necessarily emit it. */
+ symtab_node::get_create (fn)->no_external_definition = true;
+ /* It is an implementation detail of this TU. */
+ DECL_VISIBILITY (fn) = VISIBILITY_HIDDEN;
+ DECL_VISIBILITY_SPECIFIED (fn) = 1;
+ }
/* Find the vtt_parm, if present. */
for (vtt_parmno = -1, parmno = 0, fn_parm = DECL_ARGUMENTS (fn);
diff --git a/gcc/ipa-inline.cc b/gcc/ipa-inline.cc
index ba8bf11b66e..012c5f4301a 100644
--- a/gcc/ipa-inline.cc
+++ b/gcc/ipa-inline.cc
@@ -463,6 +463,20 @@ can_inline_edge_p (struct cgraph_edge *e, bool report,
e->inline_failed = CIF_MUST_REMAIN_IN_TU;
inlinable = false;
}
+ /* Do not inline a body that still calls a target with no guaranteed
+ definition: the call would be duplicated into the caller, while the
+ callee's own body is DECL_EXTERNAL and so emitted by nobody.
+ However, allow always-inline. */
+ if (inlinable && !DECL_DISREGARD_INLINE_LIMITS (callee->decl))
+ for (cgraph_edge *e2 = callee->callees; e2; e2 = e2->next_callee)
+ if (e2->callee->no_external_definition
+ && DECL_EXTERNAL (e2->callee->decl))
+ {
+ e->inline_failed = CIF_BODY_NOT_AVAILABLE;
+ inlinable = false;
+ break;
+ }
+
if (!inlinable && report)
report_inline_failed_reason (e);
return inlinable;
diff --git a/gcc/lto-cgraph.cc b/gcc/lto-cgraph.cc
index b3644e47bec..f3b0d9ecd65 100644
--- a/gcc/lto-cgraph.cc
+++ b/gcc/lto-cgraph.cc
@@ -542,6 +542,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node,
bp_pack_value (&bp, node->must_remain_in_tu_body, 1);
bp_pack_value (&bp, node->unique_name, 1);
bp_pack_value (&bp, node->body_removed, 1);
+ bp_pack_value (&bp, node->no_external_definition, 1);
bp_pack_value (&bp, node->semantic_interposition, 1);
bp_pack_value (&bp, node->implicit_section, 1);
bp_pack_value (&bp, node->address_taken, 1);
@@ -636,6 +637,7 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, varpool_node *node,
node->body_removed
|| (!encode_initializer_p && !node->alias && node->definition),
1);
+ bp_pack_value (&bp, node->no_external_definition, 1);
bp_pack_value (&bp, node->semantic_interposition, 1);
bp_pack_value (&bp, node->implicit_section, 1);
bp_pack_value (&bp, node->writeonly, 1);
@@ -1269,6 +1271,7 @@ input_overwrite_node (struct lto_file_decl_data *file_data,
node->must_remain_in_tu_body = bp_unpack_value (bp, 1);
node->unique_name = bp_unpack_value (bp, 1);
node->body_removed = bp_unpack_value (bp, 1);
+ node->no_external_definition = bp_unpack_value (bp, 1);
node->semantic_interposition = bp_unpack_value (bp, 1);
node->implicit_section = bp_unpack_value (bp, 1);
node->address_taken = bp_unpack_value (bp, 1);
@@ -1479,6 +1482,7 @@ input_varpool_node (struct lto_file_decl_data *file_data,
node->must_remain_in_tu_body = bp_unpack_value (&bp, 1);
node->unique_name = bp_unpack_value (&bp, 1);
node->body_removed = bp_unpack_value (&bp, 1);
+ node->no_external_definition = bp_unpack_value (&bp, 1);
node->semantic_interposition = bp_unpack_value (&bp, 1);
node->implicit_section = bp_unpack_value (&bp, 1);
node->writeonly = bp_unpack_value (&bp, 1);
diff --git a/gcc/testsuite/g++.dg/opt/declone-cdtor-lto.C b/gcc/testsuite/g++.dg/opt/declone-cdtor-lto.C
new file mode 100644
index 00000000000..59ad5e698f6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/declone-cdtor-lto.C
@@ -0,0 +1,69 @@
+// PR c++/125359
+
+// Check that we do not leave a call to a unified cdtor in an LTO build.
+// { dg-do run { target c++14 } }
+// { dg-require-effective-target lto }
+// { dg-options "-Os -flto -fstrict-aliasing" }
+// { dg-skip-if "requires hosted libstdc++ for cassert" { ! hostedlib } }
+
+#include
+#include
+#include
+
+class Base
+{
+public:
+ Base* previous = nullptr;
+ Base* next = nullptr;
+ Base* target = nullptr;
+};
+
+class Target : public Base
+{
+public:
+ __attribute__((always_inline)) ~Target()
+ {
+ while (this->next)
+ {
+ Base* n = this->next;
+
+ if (n->previous)
+ n->previous->next = n->next;
+ if (n->next)
+ n->next->previous = n->previous;
+ n->previous = nullptr;
+ n->next = nullptr;
+ n->target = nullptr;
+ }
+ }
+};
+
+template
+class TargetWithData final : public Target
+{
+public:
+ TargetWithData(T data)
+ : data(data)
+ {}
+ T data;
+};
+
+void test()
+{
+ Base ptr;
+ {
+ auto data = std::make_unique>(std::string("asdf"));
+ ptr.target = &*data;
+ ptr.previous = &*data;
+ data->next = &ptr;
+
+ assert(ptr.target != nullptr);
+ }
+ assert(ptr.target == nullptr);
+}
+
+int main(int, char**)
+{
+ test();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/opt/declone6-aux.cc b/gcc/testsuite/g++.dg/opt/declone6-aux.cc
new file mode 100644
index 00000000000..3cbe4de1234
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/declone6-aux.cc
@@ -0,0 +1,8 @@
+// Emitter for declone6.C. It includes the same header, so it sees
+// the `extern template' declaration, and then overrides it with an explicit
+// instantiation def -- which [temp.explicit] permits provided the
+// definition follows the declaration, as it does here.
+
+#include "declone6.h"
+
+template struct B; // the override: emit them HERE
diff --git a/gcc/testsuite/g++.dg/opt/declone6.C b/gcc/testsuite/g++.dg/opt/declone6.C
new file mode 100644
index 00000000000..a81188f911b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/declone6.C
@@ -0,0 +1,61 @@
+// PR c++/125359
+
+// declone6.h holds inline definitions plus `extern template struct B;', so the
+// bodies are VISIBLE in both TUs while neither is told to emit them.
+// declone6-aux.cc overrides that with an explicit instantiation DEFINITION, which
+// [temp.explicit] permits after the declaration, making it the one designated
+// emitter. The program is therefore exactly what the standard asks for.
+//
+// At -Os the clones become forwarding thunks to a unified C4 body; if a thunk is
+// inlined here, the call to that C4 must not be left behind, because nothing in the
+// source can name a C4 and so no TU can be asked to export one.
+//
+// { dg-do run { target c++20 } }
+// { dg-options "-Os" }
+// { dg-additional-sources "declone6-aux.cc" }
+
+#include "declone6.h"
+
+struct D : B // derived: uses B::C2 (base-object ctor)
+{
+ D (int x) : B (x) {}
+};
+
+struct Sink
+{
+ __attribute__((always_inline)) ~Sink () { total += v; }
+ static int total;
+ int v;
+};
+int Sink::total;
+
+template
+struct Holder : Sink
+{
+ T held;
+ Holder (const T &x) : held (x) { v = held.n; }
+};
+
+B *p;
+D *q;
+
+__attribute__((noinline)) static int
+use (int x)
+{
+ p = new B (x); // uses B::C1 (complete-object ctor)
+ q = new D (x);
+ {
+ B t (x);
+ Holder > h (t); // needs B's copy cdtor HERE, by value
+ (void) h;
+ }
+ return p->n + q->n;
+}
+
+int
+main ()
+{
+ int a = use (2);
+ int b = use (2);
+ return !(a == b && Sink::total != 0);
+}
diff --git a/gcc/testsuite/g++.dg/opt/declone6.h b/gcc/testsuite/g++.dg/opt/declone6.h
new file mode 100644
index 00000000000..d2e210005af
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/declone6.h
@@ -0,0 +1,26 @@
+// Shared "header" for declone6.C and declone6-aux.cc. The definitions must be
+// inline to live here, which is the point: the explicit instantiation decl
+// below tells every includer not to emit them, and exactly one TU overrides it with
+// an explicit instantiation def to become the designated emitter,
+// declone6-aux.cc
+//
+// Shaped after std::basic_string, which triggered this case.
+
+template
+struct B
+{
+ T n;
+
+ constexpr B (T x) : n (x)
+ {
+ for (int i = 0; i < 16; i++)
+ n += (x ^ i) + (n >> 1);
+ }
+
+ constexpr B (const B &o) : n (o.n) { n += 1; }
+
+ constexpr ~B () { n = 0; }
+};
+
+// The declaration: "do not instantiate the definitions here."
+extern template struct B;
--
2.50.1 (Apple Git-155)
From iains.gcc@gmail.com Sun Nov 1 15:28:01 2026
From: iains.gcc@gmail.com (Iain Sandoe)
Date: Sun, 1 Nov 2026 15:28:01 +0000
Subject: [PATCH] dwarf2out: Allow for an empty cie_cfi_vec.
Message-ID: <20261101152819.43397-1-iain@sandoe.co.uk>
This shows up on aarch64-darwin but can be repeated with -fno-cfi-asm on
Linux, tested on x86_64, aarch64-linux, aarch64-darwin, OK for trunk?
thanks
Iain
--- 8< ---
The RTL front end can start at a pass later than the initialisation of
the cie/cfi vector and so we must cater for it being unset.
This fires for RTL testcases on platform which do not use cfi instructions.
gcc/ChangeLog:
* dwarf2out.cc (output_call_frame_info): Check for unset cie/cfi
vector before iteration.
Signed-off-by: Iain Sandoe
---
gcc/dwarf2out.cc | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index e8a6019f72e..4e8a2ddfc75 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -943,8 +943,12 @@ output_call_frame_info (int for_eh)
eh_data_format_name (fde_encoding));
}
- FOR_EACH_VEC_ELT (*cie_cfi_vec, i, cfi)
- output_cfi (cfi, NULL, for_eh);
+ /* cie_cfi_vec is created lazily by the dwarf2 frame pass.
+ The RTL front end allows for starting from a pass after that so that
+ this can be absent. */
+ if (cie_cfi_vec)
+ FOR_EACH_VEC_ELT (*cie_cfi_vec, i, cfi)
+ output_cfi (cfi, NULL, for_eh);
/* Pad the CIE out to an address sized boundary. */
ASM_OUTPUT_ALIGN (asm_out_file,
--
2.50.1 (Apple Git-155)
From jeffrey.law@oss.qualcomm.com Sun Nov 1 16:06:05 2026
From: jeffrey.law@oss.qualcomm.com (Jeff Law)
Date: Sun, 1 Nov 2026 09:06:05 -0700
Subject: [PATCH] tree-cfg: Ignore debug stmts when checking coverage nops
[PR128346]
In-Reply-To: <20261101120911.70954-1-yqtian668@gmail.com>
References: <20261101120911.70954-1-yqtian668@gmail.com>
Message-ID: <75fc93f1-c4d9-4eb9-9797-e790fc62ccd4@oss.qualcomm.com>
On 11/1/26 5:09 AM, Yongqiang Tian wrote:
> gimple_can_merge_blocks_p checks the final statement of a block for the
> compiler-inserted nop that marks a coverage-suppression boundary. A trailing
> DEBUG_BEGIN_STMT hides that nop under -g, allows the blocks to be merged, and
> changes the gcov CFG checksum even though the generated code is unchanged.
>
> Use gsi_last_nondebug_bb so debug markers do not affect the merge decision.
> Add a focused regression test.
>
> The test case was found by a non-AI automated testing tool.
> Assisted-by: OpenAI Codex 5.6 Sol.
>
> Bootstrapped and regression tested on x86_64-pc-linux-gnu. The focused
> test fails before the change and passes after it.
>
> PR gcov-profile/128346
>
> gcc/ChangeLog:
>
> * tree-cfg.cc (gimple_can_merge_blocks_p): Ignore debug statements
> when examining the end of a block.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.misc-tests/gcov-45.c: New test.
>
> Signed-off-by: Yongqiang Tian
Thanks.? Looks good to me.? No issues in Sashiko.? Pushed to the trunk.
Thanks again for all the fixes in this space!
jeff
From jeffrey.law@oss.qualcomm.com Sun Nov 1 16:07:43 2026
From: jeffrey.law@oss.qualcomm.com (Jeff Law)
Date: Sun, 1 Nov 2026 09:07:43 -0700
Subject: [PATCH v1 0/2] Add non overlap test for rest rvv widen tenary insn
In-Reply-To: <20261031125415.2311363-1-pan2.li@intel.com>
References: <20261031125415.2311363-1-pan2.li@intel.com>
Message-ID: <126b1330-6608-404f-a9bb-cc187aab1369@oss.qualcomm.com>
On 10/31/26 6:50 AM, pan2.li@intel.com wrote:
> From: Pan Li
>
> To make sure there is no overlap for all rvv widen tenary insns.
>
> The below test suites are passed for this patch:
> 1. The rv64gcv fully regression tests.
>
> Pan Li (2):
> RISC-V: Add tests for no reg overlap of int widen ternary [PR target/128162]
> RISC-V: Add tests for no reg overlap of fp widen ternary [PR target/128162]
OK.? Thanks again!
jeff
From jeffrey.law@oss.qualcomm.com Sun Nov 1 16:18:38 2026
From: jeffrey.law@oss.qualcomm.com (Jeff Law)
Date: Sun, 1 Nov 2026 09:18:38 -0700
Subject: [PATCH v2] match.pd: (X ^ Y) & (X | Y) -> X ^ Y patterns
[PR115547]
In-Reply-To: <20261030120514.650823-1-daniel.barboza@oss.qualcomm.com>
References: <20261030120514.650823-1-daniel.barboza@oss.qualcomm.com>
Message-ID:
On 10/30/26 6:05 AM, Daniel Barboza wrote:
> Add a couple of match.pd patterns that simplifies a bit_and using a
> bit_xor and a bit_ior with the same operands:
>
> (X ^ Y) & (X | Y) -> X ^ Y
>
> For boolean values there is also a NE variant:
>
> (X NE Y) & (X | Y) -> X NE Y
>
> Also, for boolean values, we're also handling chained bit_iors:
>
> (X ^ Y) & (Z | X | Y) -> (X ^ Y)
> (X NE Y) & (Z | X | Y) -> (X NE Y)
>
> The takeaway is that if we know that X != Y then X != Y & (X | Y | ...)
> is always going to be the same as X != Y.
>
> The remaining PR115547 patterns that uses "&&" generate chained ifconds
> that can't be handled via match.pd. We'll try our luck handling those
> inside one of the passes at a later date.
>
> Bootstrapped and regression tested in x86_64.
>
> PR tree-optimization/115547
>
> gcc/ChangeLog:
>
> * match.pd(`(X ^ Y) & (X | Y)`): New pattern.
> (`(X NE Y) & (X | Y)`): New pattern.
> (`(X NE Y) & (Z | X | Y)`): New pattern.
> (`(X ^ Y) & (Z | X | Y)`): New pattern.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/tree-ssa/pr115547.c: New test.
> ---
>
> Changes from v1:
> - re-use bit_xor patterns;
> - remove redudant inner ":c" qualifiers
> - v1 link:https://gcc.gnu.org/pipermail/gcc-patches/2026-October/736840.html
Sashiko called out the lack of :c, but that's clearly an implementation
decision based on feedback from Andrea.
It does seem to think restricting to 0/1 values it not necessary for the
|(X^Y) & (Z|X|Y) ? X^Y| ?case, which seems right to me.? Seems like a
trivial follow-up to me.
OK for the trunk.
jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jeffrey.law@oss.qualcomm.com Sun Nov 1 16:23:18 2026
From: jeffrey.law@oss.qualcomm.com (Jeff Law)
Date: Sun, 1 Nov 2026 09:23:18 -0700
Subject: [PATCH v3] match.pd: (A << N) >> N -> A for signed type A
[PR126644]
In-Reply-To: <20261028083827.836-1-daniel.barboza@oss.qualcomm.com>
References: <20261028083827.836-1-daniel.barboza@oss.qualcomm.com>
Message-ID: <7ed87df6-1a92-4545-ae9e-f989475de9ea@oss.qualcomm.com>
On 10/28/26 2:38 AM, Daniel Barboza wrote:
> This is done during RTL. Do it earlier in Gimple to potentially allow
> more optimizations opportunities.
>
> For signed types we need to consider that the rshift will preserve the
> original sign of its operand, thus if there's a sign change in A during
> the lshift we can no longer do the simplification since the end result is
> no longer equal to A. E.g:
>
> - for signed type A = 0x001.. and N = 2:
> (0x001.. << 2) >> 2 --> 0x1.. >> 2 --> 0x111.., which is not A;
>
> - Likewise, for signed type A = 0x110.. and N = 2:
> (0x110.. << 2) >> 2 --> 0x0.. >> 2 --> 0x000.., also not A.
>
> We're ignoring unsigned types because there are match.pd optimizations
> like "(x << c) >> c -> x & ((unsigned)-1 >> c)" that already optimizes
> them.
>
> Bootstrapped and regression tested in x86_64.
>
> PR tree-optimization/126644
>
> gcc/ChangeLog:
>
> * match.pd(`((A << N) >> N) -> N`): New pattern.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/tree-ssa/pr126644.c: New test.
> ---
>
> Changes from v2:
> - removed the TYPE_UNSIGNED pattern since match.pd already had patterns
> handling it;
> - use get_nonzero_bits() and get_known_nonzero_bits() to detect if the
> lshift might change the sign bit.
> - v2 link: https://gcc.gnu.org/pipermail/gcc-patches/2026-October/734172.html
LGTM and Sashiko clean.? OK for the trunk.
jeff
From jeffrey.law@oss.qualcomm.com Sun Nov 1 16:47:32 2026
From: jeffrey.law@oss.qualcomm.com (Jeff Law)
Date: Sun, 1 Nov 2026 09:47:32 -0700
Subject: [PATCH v2 1/2] simplify-rtx: Name the bits of the comparison masks
In-Reply-To:
References:
Message-ID: <9127a0a7-9507-41cd-a11b-cf194de98a5c@oss.qualcomm.com>
On 10/27/26 12:05 PM, Igor Shevlyakov wrote:
> Use named bits instead of numbers for the comparison masks of
> simplify_logical_relational_operation. No functional change.
>
> Assisted-by: Claude Opus 5.5
>
> gcc/ChangeLog:
>
> * simplify-rtx.cc (enum comparison_mask): New.
> (unsigned_inequality_p): New function.
> (unsigned_comparison_to_mask, mask_to_unsigned_comparison)
> (comparison_to_mask, mask_to_comparison)
> (simplify_context::simplify_logical_relational_operation): Use them.
>
> Signed-off-by: Igor Shevlyakov
For reasons unknown, this didn't get a Sashiko review.? But it's also
quite trivial, so no real loss.
OK for the trunk.
jeff
From iains.gcc@gmail.com Sun Nov 1 17:26:47 2026
From: iains.gcc@gmail.com (Iain Sandoe)
Date: Sun, 1 Nov 2026 17:26:47 +0000
Subject: [PATCH] D: Correct vector compares for targets with mask types
different from data size.
Message-ID: <20261101172719.59602-1-iain@sandoe.co.uk>
This shows, for example, on cascadelake.
Tested on x86_64-linux (cfarm151) and darwin both with cascadelake CPUs.
OK for trunk?
thanks
Iain
--- 8< ---
build_boolop types the VEC_COND_EXPR result with the comparison's mask type
instead of a same-width integral vector. Where the target has AVX512 mask registers
(avx512vl) that type is 32x narrower than the operands, and D's same-size rule then
rejects the reinterpretation.
The solution is to copy the approach used in the C/C++ frontends, where a separate
return type is computed, the patch here essentially duplicates those actions.
gcc/d/ChangeLog:
* d-codegen.cc (build_vec_cmp): New.
(build_boolop): Where required compute a separate return type for vector
boolean ops.
gcc/testsuite/ChangeLog:
* gdc.dg/pr108945.d: Actully test for the absence of the floating
point constant, instead of using VEC_COND_EXPR; the latter is now
validly emitted.
Signed-off-by: Iain Sandoe
---
gcc/d/d-codegen.cc | 46 +++++++++++++++++++++++----------
gcc/testsuite/gdc.dg/pr108945.d | 2 +-
2 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc
index 0f51fd70eb6..ff4b006fb26 100644
--- a/gcc/d/d-codegen.cc
+++ b/gcc/d/d-codegen.cc
@@ -1514,41 +1514,61 @@ warn_for_null_address (tree arg)
TREE_OPERAND (arg, 0));
}
+static tree
+build_vec_cmp (location_t loc, tree_code code, tree type,
+ tree arg0, tree arg1)
+{
+ tree zero_vec = build_zero_cst (type);
+ tree minus_one_vec = build_minus_one_cst (type);
+ tree cmp_type = truth_type_for (TREE_TYPE (arg0));
+ tree cmp = fold_build2_loc (loc, code, cmp_type, arg0, arg1);
+ return fold_build3_loc (loc, VEC_COND_EXPR, type, cmp, minus_one_vec, zero_vec);
+}
+
/* Build a boolean ARG0 op ARG1 expression. */
tree
build_boolop (tree_code code, tree arg0, tree arg1)
{
+ tree type0 = TREE_TYPE (arg0);
+ tree type1 = TREE_TYPE (arg1);
/* Aggregate comparisons may get lowered to a call to builtin memcmp,
so need to remove all side effects in case its address is taken. */
- if (AGGREGATE_TYPE_P (TREE_TYPE (arg0)))
+ if (AGGREGATE_TYPE_P (type0))
arg0 = d_save_expr (arg0);
- if (AGGREGATE_TYPE_P (TREE_TYPE (arg1)))
+ if (AGGREGATE_TYPE_P (type1))
arg1 = d_save_expr (arg1);
- if (VECTOR_TYPE_P (TREE_TYPE (arg0)) && VECTOR_TYPE_P (TREE_TYPE (arg1)))
+ tree res_type = type0;
+ if (VECTOR_TYPE_P (type0) && VECTOR_TYPE_P (type1))
{
- /* Build a vector comparison.
- VEC_COND_EXPR ; */
- tree cmptype = truth_type_for (TREE_TYPE (arg0));
- tree cmp = fold_build2_loc (input_location, code, cmptype, arg0, arg1);
-
- return fold_build3_loc (input_location, VEC_COND_EXPR, cmptype, cmp,
- build_minus_one_cst (cmptype),
- build_zero_cst (cmptype));
+ if (!VECTOR_BOOLEAN_TYPE_P (type0) || !VECTOR_BOOLEAN_TYPE_P (type1))
+ {
+ tree intt = lang_hooks.types.type_for_size
+ (GET_MODE_BITSIZE (SCALAR_TYPE_MODE (TREE_TYPE (type0))), 0);
+ if (intt == NULL_TREE)
+ {
+ error_at (input_location, "could not find an integer type "
+ "of the same size as %qT", TREE_TYPE (type0));
+ return error_mark_node;
+ }
+ res_type
+ = build_opaque_vector_type (intt, TYPE_VECTOR_SUBPARTS (type0));
+ }
+ return build_vec_cmp (input_location, code, res_type, arg0, arg1);
}
if (code == EQ_EXPR || code == NE_EXPR)
{
/* Check if comparing the address of a variable to null. */
- if (POINTER_TYPE_P (TREE_TYPE (arg0)) && integer_zerop (arg1))
+ if (POINTER_TYPE_P (type0) && integer_zerop (arg1))
warn_for_null_address (arg0);
if (POINTER_TYPE_P (TREE_TYPE (arg1)) && integer_zerop (arg0))
warn_for_null_address (arg1);
}
return fold_build2_loc (input_location, code, d_bool_type,
- arg0, d_convert (TREE_TYPE (arg0), arg1));
+ arg0, d_convert (type0, arg1));
}
/* Return a COND_EXPR. ARG0, ARG1, and ARG2 are the three
diff --git a/gcc/testsuite/gdc.dg/pr108945.d b/gcc/testsuite/gdc.dg/pr108945.d
index 03b9de8e758..837cc3f34c3 100644
--- a/gcc/testsuite/gdc.dg/pr108945.d
+++ b/gcc/testsuite/gdc.dg/pr108945.d
@@ -9,4 +9,4 @@ auto pr108945(f4 a, f4 b)
return a < b;
}
-// { dg-final { scan-tree-dump-not "VEC_COND_EXPR" "gimple" } }
+// { dg-final { scan-tree-dump-not "1\.0e\+0" "gimple" } }
--
2.50.1 (Apple Git-155)
From jeffrey.law@oss.qualcomm.com Sun Nov 1 17:55:07 2026
From: jeffrey.law@oss.qualcomm.com (Jeff Law)
Date: Sun, 1 Nov 2026 10:55:07 -0700
Subject: [committed][RISC-V][PR target/127908] Properly recognize additional
UNSPECs that may trap for RISC-v
Message-ID:
As noted in the BZ the RISC-V port has several UNSPECs with integer
modes, but which can trigger FE_INVALID or other similar exceptions.
Because the UNSPECs have an integer mode, the standard may-trap hooks
return false and that allows the scheduler to move things around too
aggressively speculate a trapping insn up past its controlling condition.
This patch introduces a suitable target override which will detect the
potentially trapping UNSPECs with integer modes which in turn avoids the
invalid speculation.
Tested on riscv32-elf and riscv64-elf.? Bootstrap on the K3 and c920 is
in flight.? K1 is queued.? Pushing to the trunk.
-------------- next part --------------
commit 02018d606e8ae483cdf2f5ea3f222fc582ce3090
Author: Jeff Law
Date: Sun Nov 1 10:01:00 2026 -0700
[RISC-V][PR target/127908] Properly recognize additional UNSPECs that may trap for RISC-v
As noted in the BZ the RISC-V port has several UNSPECs with integer modes, but
which can trigger FE_INVALID or other similar exceptions.
Because the UNSPECs have an integer mode, the standard may-trap hooks return
false and that allows the scheduler to move things around too aggressively
speculate a trapping insn up past its controlling condition.
This patch introduces a suitable target override which will detect the
potentially trapping UNSPECs with integer modes which in turn avoids the
invalid speculation.
Tested on riscv32-elf and riscv64-elf. Bootstrap on the K3 and c920 is in
flight. K1 is queued. Pushing to the trunk.
PR target/127908
gcc/
* config/riscv/riscv.cc (riscv_unspec_may_trap_p): New function.
(TARGET_UNSPEC_MAY_TRAP_P): Define.
gcc/testsuite
* gcc.target/riscv/pr127908.c: New test.
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index bed695ccae4..ab9354162fa 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -16984,6 +16984,38 @@ riscv_can_tag_addresses ()
return TARGET_64BIT && target_has_pointer_masking_p;
}
+/* Implement TARGET_UNSPEC_MAY_TRAP_P. */
+
+static int
+riscv_unspec_may_trap_p (const_rtx x, unsigned flags)
+{
+ /* The default implementation catches things with an FP mode on the UNSPEC.
+ Thus we don't need to list all those. We can focus on cases where the
+ UNSPEC has no mode or an integer/vector mode. */
+ switch (XINT (x, 1))
+ {
+ case UNSPEC_LRINT:
+ case UNSPEC_ROUND:
+ case UNSPEC_FLOOR:
+ case UNSPEC_CEIL:
+ case UNSPEC_BTRUNC:
+ case UNSPEC_ROUNDEVEN:
+ case UNSPEC_NEARBYINT:
+ case UNSPEC_FLT_QUIET:
+ case UNSPEC_FLE_QUIET:
+ case UNSPEC_VFCVT:
+ case UNSPEC_UNSIGNED_VFCVT:
+ /* If FLAG_TRAPPING_MATH is active, then these potentially trap, otherwise
+ fall into the default case. */
+ if (flag_trapping_math)
+ return 1;
+ default:
+ break;
+ }
+
+ return default_unspec_may_trap_p (x, flags);
+}
+
/* libsanitizer expects 8 tag bits. */
@@ -17437,6 +17469,9 @@ riscv_memtag_tag_bitsize ()
#undef TARGET_MEMTAG_TAG_BITSIZE
#define TARGET_MEMTAG_TAG_BITSIZE riscv_memtag_tag_bitsize
+#undef TARGET_UNSPEC_MAY_TRAP_P
+#define TARGET_UNSPEC_MAY_TRAP_P riscv_unspec_may_trap_p
+
#undef TARGET_DOCUMENTATION_NAME
#define TARGET_DOCUMENTATION_NAME "RISC-V"
diff --git a/gcc/testsuite/gcc.target/riscv/pr127908.c b/gcc/testsuite/gcc.target/riscv/pr127908.c
new file mode 100644
index 00000000000..a67d276d7cb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/pr127908.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-additional-options "-std=c11" } */
+
+#include
+#include
+
+#define DEF(NAME, FN, T) \
+ __attribute__((noipa)) void \
+ NAME (const T *s, T *d, long n) \
+ { \
+ for (; n > 0; --n, ++s, ++d) \
+ *d = FN (*s); \
+ }
+
+DEF (ceil_d, ceil, double)
+DEF (floor_d, floor, double)
+DEF (trunc_d, trunc, double)
+DEF (ceil_f, ceilf, float)
+DEF (floor_f, floorf, float)
+DEF (trunc_f, truncf, float)
+
+#define CHECK(NAME, T, IN) \
+ do \
+ for (int i = 0; i < 4; i++) \
+ { \
+ T out; \
+ feclearexcept (FE_ALL_EXCEPT); \
+ NAME (&(IN)[i], &out, 1); \
+ if (fetestexcept (FE_INVALID)) \
+ __builtin_abort (); \
+ } \
+ while (0)
+
+int
+main (void)
+{
+ const double in_d[] = { INFINITY, -INFINITY, 1e300, 2.5 };
+ const float in_f[] = { INFINITY, -INFINITY, 1e30f, 2.5f };
+
+ CHECK (ceil_d, double, in_d);
+ CHECK (floor_d, double, in_d);
+ CHECK (trunc_d, double, in_d);
+ CHECK (ceil_f, float, in_f);
+ CHECK (floor_f, float, in_f);
+ CHECK (trunc_f, float, in_f);
+
+ __builtin_exit (0);
+}
From jeffrey.law@oss.qualcomm.com Sun Nov 1 17:56:24 2026
From: jeffrey.law@oss.qualcomm.com (Jeff Law)
Date: Sun, 1 Nov 2026 10:56:24 -0700
Subject: [PATCH] testsuite: Add -fno-signed-zeros to more FMA tests
[PR124820]
In-Reply-To: <20261030113102.2084217-1-merlin.warner-huish@embecosm.com>
References:
<20261030113102.2084217-1-merlin.warner-huish@embecosm.com>
Message-ID:
On 10/30/26 5:31 AM, Merlin Warner-Huish wrote:
> r17-5664 restricted the negated FMA folds in match.pd to
> !HONOR_SIGNED_ZEROS. These tests expect those folds to apply with the
> default options, so they started failing on aarch64. Add
> -fno-signed-zeros to them, as that commit did for the i386 FMA tests.
>
> PR middle-end/124820
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/fma-5.c: Add -fno-signed-zeros.
> * gcc.dg/fma-6.c: Likewise.
> * gcc.dg/fma-7.c: Likewise.
> * gcc.target/aarch64/sve/unpacked_cond_fnmla_1.c: Likewise.
> * gcc.target/aarch64/sve/unpacked_cond_fnmla_2.c: Likewise.
> * gcc.target/aarch64/sve/unpacked_cond_fnmls_1.c: Likewise.
> * gcc.target/aarch64/sve/unpacked_cond_fnmls_2.c: Likewise.
> * gcc.target/aarch64/sve/unpacked_fnmla_1.c: Likewise.
> * gcc.target/aarch64/sve/unpacked_fnmla_2.c: Likewise.
> * gcc.target/aarch64/sve/unpacked_fnmls_1.c: Likewise.
> * gcc.target/aarch64/sve/unpacked_fnmls_2.c: Likewise.
> * gcc.target/aarch64/sve/vcond_13.c: Likewise.
> * gcc.target/aarch64/sve/vcond_14.c: Likewise.
> * gcc.target/aarch64/sve/vcond_15.c: Likewise.
> * gcc.target/aarch64/sve/vcond_16.c: Likewise.
> ---
> These are the 65 aarch64 failures reported by the Linaro CI after
> r17-5664. Tested with an aarch64-linux-gnu cross compiler (they are
> all compile-only tests): all of them fail before this patch and pass
> after it. Also checked gcc.dg/fma-[567].c on x86_64-pc-linux-gnu.
>
> The unpacked_cond_* and vcond_* tests cover the IFN_COND_* folds the
> original patch changed, so those changes are tested after all.
>
> My write access request is still pending, so I'd be grateful if
> someone could commit this once approved.
OK.? I also ack'd your account request over the weekend, so hopefully
you'll be set up Monday US time.? I'll push this patch since it's a
regression and it's good to see the state go from reg back to green in
my tester :-)
jeff
From mikestump@comcast.net Sun Nov 1 18:02:02 2026
From: mikestump@comcast.net (Mike Stump)
Date: Sun, 1 Nov 2026 10:02:02 -0800
Subject: [PATCH] testsuite: Use gcc-nm for symbol scans
In-Reply-To: <20261101141813.2019428-1-torbjorn.svensson@foss.st.com>
References: <20261101141813.2019428-1-torbjorn.svensson@foss.st.com>
Message-ID:
On Nov 1, 2026, at 6:15?AM, Torbj?rn SVENSSON wrote:
> This fixes the following error for arm-none-eabi (probably other targets too):
>
> ERROR: gcc.dg/builtin-pi-linkage.c: error executing dg-final: arm-none-eabi-nm: builtin-pi-linkage.o: plugin needed to handle lto object
>
> Ok for trunk?
Ok.
From andrew.pinski@oss.qualcomm.com Sun Nov 1 18:28:30 2026
From: andrew.pinski@oss.qualcomm.com (Andrea Pinski)
Date: Sun, 1 Nov 2026 10:28:30 -0800
Subject: [PATCH] tree-ssa-forwprop.cc: reorder_ior_chain [PR115547]
In-Reply-To: <20261031001936.837141-1-daniel.barboza@oss.qualcomm.com>
References: <20261031001936.837141-1-daniel.barboza@oss.qualcomm.com>
Message-ID:
On Fri, Oct 30, 2026 at 5:19?PM Daniel Barboza
wrote:
>
> Given a boolean only IOR chain that follows a gcond:
>
> if (a_4 != b_5)
> goto ;
> else
> goto ;
>
> ;; basic block 3
> ;; prev block 2
> ;; pred: 2 (TRUE_VALUE,EXECUTABLE)
> _1 = b_5 | c_6;
> _2 = _1 | a_4;
>
> This would be equivalent to (a != b) && (b | c | a). This can be
> simplified to (a != b) because the IOR chain, if a != b, simplifies to
> 1. But we're not able to see that due to operand order: we're seeing
> res = b | c and then res | a, and we can't derive nothing from these.
> If we reorder the operands we're able to leverage the relation that is
> derived from the gcond.
>
> A reordering work like this usually goes in reassoc but we want
> visibility of the gcond as well, and the phi access wasn't trivial for
> me to fit in there. Forwprop was the next in mind.
So thinking about this. This seems to belong in reassociation.
Ranger can provide that a_4 == b_5 is true when seeing if ssa names
are the same. Maybe if there is a relationship that is known and
reassociation should group them together.
Note your patch does not handle:
```
int fn2 (int a, int b, int c) {
if (a == c)
{
return c | b | a;
}
return 0;
}
```
Or:
```
int fn2 (int a, int b, int c) {
if (a == c)
{
return c |b | a;
}
return a | b;
}
```
>
> Bootstrapped and regression tested in x86_64.
>
> PR tree-optimization/115547
>
> gcc/ChangeLog:
>
> * tree-ssa-forwprop.cc (reorder_ior_chain): Reorder IOR chains
> operands if there's optimization opportunities with a previous
> PHI.
> (pass_forwprop::execute): Call reorder_ior_chain.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/tree-ssa/pr115547-2.c: New test.
> * gcc.dg/tree-ssa/pr115547-3.c: New test.
> ---
> gcc/testsuite/gcc.dg/tree-ssa/pr115547-2.c | 22 +++
> gcc/testsuite/gcc.dg/tree-ssa/pr115547-3.c | 22 +++
> gcc/tree-ssa-forwprop.cc | 167 +++++++++++++++++++++
> 3 files changed, 211 insertions(+)
> create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr115547-2.c
> create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr115547-3.c
>
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr115547-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr115547-2.c
> new file mode 100644
> index 00000000000..242a1772ec6
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr115547-2.c
> @@ -0,0 +1,22 @@
> +/* { dg-do compile } */
> +/* { dg-options "-O1 -fdump-tree-optimized" } */
> +
> +_Bool fn1 (_Bool a, _Bool b, _Bool c) {
> + return a != c && (b || (c || a));
> +}
> +
> +_Bool fn2 (_Bool a, _Bool b, _Bool c) {
> + return a != c && (b || c || a);
> +}
> +
> +_Bool fn3 (_Bool a, _Bool b, _Bool c) {
> + return a != c && (a || b || c);
> +}
> +
> +_Bool fn4 (_Bool a, _Bool b, _Bool c) {
> + return a != c && (a || c || b);
> +}
> +
> +/* { dg-final { scan-tree-dump-times " != " 4 "optimized" } } */
> +/* { dg-final { scan-tree-dump-times " \\\| " 0 "optimized" } } */
> +/* { dg-final { scan-tree-dump-times " & " 0 "optimized" } } */
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr115547-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pr115547-3.c
> new file mode 100644
> index 00000000000..66577fa3400
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr115547-3.c
> @@ -0,0 +1,22 @@
> +/* { dg-do compile } */
> +/* { dg-options "-O1 -fdump-tree-optimized" } */
> +
> +_Bool fn1 (_Bool a, _Bool b, _Bool c) {
> + return a == c && (b || (c || a));
> +}
> +
> +_Bool fn2 (_Bool a, _Bool b, _Bool c) {
> + return a == c && (b || c || a);
> +}
> +
> +_Bool fn3 (_Bool a, _Bool b, _Bool c) {
> + return a == c && (a || b || c);
> +}
> +
> +_Bool fn4 (_Bool a, _Bool b, _Bool c) {
> + return a == c && (a || c || b);
> +}
> +
> +/* { dg-final { scan-tree-dump-times " == " 4 "optimized" } } */
> +/* { dg-final { scan-tree-dump-times " \\\| " 4 "optimized" } } */
> +/* { dg-final { scan-tree-dump-times " & " 4 "optimized" } } */
> diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc
> index 88f69e12ed1..d9749250e4b 100644
> --- a/gcc/tree-ssa-forwprop.cc
> +++ b/gcc/tree-ssa-forwprop.cc
> @@ -4937,6 +4937,168 @@ simplify_phi_result_movdiv (gimple *stmt, tree_code code)
> return true;
> }
>
> +/* PR115547: given the following IOR sequence where all
> + trees involved are bools/zero_one_valued:
> +
> + ;; basic block 2
> + ;; prev block 0
> + if (a_4 != b_5)
> + goto ;
> + else
> + goto ;
> +
> + ;; basic block 3
> + ;; prev block 2
> + ;; pred: 2 (TRUE_VALUE,EXECUTABLE)
> + _1 = b_5 | c_6;
> + _2 = _1 | a_4;
> +
> + I.e. (a_4 != b_5) && b_5 | c_6 | a_4;
> +
> + We want to make it easier to deduce the relationship
> + a_4 != b_5 in the IOR chain by re-ordering the IORs
> + operands, putting a_4 and b_5 in the first IOR:
> +
> + _1 = b_5 | a_4;
> + _2 = _1 | c_6;
> +
> + Our expectation is that the IOR chain collapses into "1". Note
> + that even with a EQ code there's still benefit from reordering
> + the IOR chain - we can have one less IOR in the sequence. */
> +static bool
> +reorder_ior_chain (gimple *first_ior)
> +{
> + tree first_ior_rhs1 = gimple_assign_rhs1 (first_ior);
> + tree first_ior_rhs2 = gimple_assign_rhs2 (first_ior);
> +
> + if (TREE_CODE (first_ior_rhs1) != SSA_NAME
> + || !tree_zero_one_valued_p (first_ior_rhs1)
> + || TREE_CODE (first_ior_rhs2) != SSA_NAME
> + || !tree_zero_one_valued_p (first_ior_rhs2))
> + return false;
> +
> + basic_block middle_bb = gimple_bb (first_ior);
> + gimple_stmt_iterator gsi = gsi_start_nondebug_after_labels_bb (middle_bb);
> +
> + /* first_ior must be the first insn of the bb. The
> + next insn must also be an IOR. */
> + if (gsi_end_p (gsi)
> + || gsi_stmt (gsi) != first_ior)
> + return false;
> +
> + gsi_next (&gsi);
> + gimple *second_ior = gsi_stmt (gsi);
> +
> + if (!second_ior
> + || gimple_code (second_ior) != GIMPLE_ASSIGN
> + || gimple_assign_rhs_code (second_ior) != BIT_IOR_EXPR)
> + return false;
> +
> + tree second_ior_rhs1 = gimple_assign_rhs1 (second_ior);
> + tree second_ior_rhs2 = gimple_assign_rhs2 (second_ior);
> +
> + if (TREE_CODE (second_ior_rhs1) != SSA_NAME
> + || !tree_zero_one_valued_p (second_ior_rhs1)
> + || TREE_CODE (second_ior_rhs2) != SSA_NAME
> + || !tree_zero_one_valued_p (second_ior_rhs2))
> + return false;
> +
> + /* One of second_ior operands must be LHS (first_ior) and the
> + other operand is going to be swapped later. */
> + tree first_lhs = gimple_assign_lhs (first_ior);
> + bool swap_second_ior_rhs2;
> + if (gimple_assign_rhs1 (second_ior) == first_lhs)
> + swap_second_ior_rhs2 = true;
> + else if (gimple_assign_rhs2 (second_ior) == first_lhs)
> + swap_second_ior_rhs2 = false;
> + else
> + return false;
> +
> + /* The current bb must be a single_pred bb and its predecessor
> + must have a gcond. */
> + if (!single_pred_p (middle_bb))
> + return false;
> +
> + edge e = single_pred_edge (middle_bb);
> + if (!(e->flags & (EDGE_TRUE_VALUE | EDGE_FALSE_VALUE)))
> + return false;
> +
> + basic_block cond_bb = e->src;
> + gsi = gsi_last_bb (cond_bb);
> + gcond *cond = dyn_cast (gsi_stmt (gsi));
> +
> + if (!cond
> + || TREE_CODE (gimple_cond_rhs (cond)) != SSA_NAME)
> + return false;
> +
> + tree A = gimple_cond_lhs (cond);
> + tree B = gimple_cond_rhs (cond);
> +
> + if (A != first_ior_rhs1
> + && A != first_ior_rhs2
> + && A != second_ior_rhs1
> + && A != second_ior_rhs2)
> + return false;
> +
> + if (B != first_ior_rhs1
> + && B != first_ior_rhs2
> + && B != second_ior_rhs1
> + && B != second_ior_rhs2)
> + return false;
> +
> + /* A and B are already in first_ior, i.e. nothing to do. */
> + if ((A == first_ior_rhs1 && B == first_ior_rhs2)
> + || (A == first_ior_rhs2 && B == first_ior_rhs1))
> + return false;
> +
> + /* At this point we know that we have A, B and the first_ior
> + LHS in the middle of the 2 IOR stmts, and A and B are not
> + together in first_ior. Now we need to do is see which RHS
> + from first_ior needs to be swapped with the non_LHS element
> + from second_ior. */
> + bool swap_first_ior_rhs2 = first_ior_rhs1 == A || first_ior_rhs1 == B;
> + if (swap_second_ior_rhs2)
> + {
> + /* Swap second_ior_rhs2. */
> + if (swap_first_ior_rhs2)
> + {
> + /* Swap first_ior_rhs2 with second_ior_2. */
> + gimple_assign_set_rhs2 (first_ior, second_ior_rhs2);
> + gimple_assign_set_rhs2 (second_ior, first_ior_rhs2);
> + }
> + else
> + {
> + /* Swap first_ior_rhs1 with second_ior_2. */
> + gimple_assign_set_rhs1 (first_ior, second_ior_rhs2);
> + gimple_assign_set_rhs2 (second_ior, first_ior_rhs1);
> + }
> + }
> + else
> + {
> + /* Swap second_ior_rhs1. */
> + if (swap_first_ior_rhs2)
> + {
> + /* Swap first_ior_rhs2 with second_ior_rhs1. */
> + gimple_assign_set_rhs2 (first_ior, second_ior_rhs1);
> + gimple_assign_set_rhs1 (second_ior, first_ior_rhs2);
> + }
> + else
> + {
> + /* Swap first_ior_rhs1 with second_ior_rhs1. */
> + gimple_assign_set_rhs1 (first_ior, second_ior_rhs1);
> + gimple_assign_set_rhs1 (second_ior, first_ior_rhs1);
> + }
> + }
> +
> + update_stmt (first_ior);
> + update_stmt (second_ior);
> +
> + if (dump_file && (dump_flags & TDF_DETAILS))
> + fprintf (dump_file, "Changed order of IOR chain operands.\n");
> +
> + return true;
> +}
> +
> /* Determine whether applying the 2 permutations (mask1 then mask2)
> gives back one of the input. */
>
> @@ -7219,6 +7381,11 @@ pass_forwprop::execute (function *fun)
> bool folded = match_long_mul (as_a (stmt));
> if (!folded)
> folded = simplify_rotate (&gsi);
> +
> + if (!folded
> + && code == BIT_IOR_EXPR)
> + folded = reorder_ior_chain (stmt);
> +
> changed |= folded;
> }
> else if (code == BIT_XOR_EXPR)
> --
> 2.43.0
>
From navi@vlhl.dev Sun Nov 1 20:14:38 2026
From: navi@vlhl.dev (navi)
Date: Sun, 1 Nov 2026 21:14:38 +0100
Subject: [PATCH v10 0/4] implement defer statements as per ts 25755
Message-ID: <20261101201530.2684116-1-navi@vlhl.dev>
fixed a rebase mistake, updated the document url on 4/4, and fixed up
typos on docs.
Arsen Arsenovi? (1):
gcc/testsuite: support specifying a language for additional sources
navi (3):
c: handle expression nodes in push_cleanup
c: introduce jump barriers for statement expressions
c: implement defer
gcc/Makefile.in | 1 +
gcc/c-family/c-common.cc | 1 +
gcc/c-family/c-common.h | 1 +
gcc/c-family/c-cppbuiltin.cc | 3 +
gcc/c/c-decl.cc | 145 ++++++++++++-----
gcc/c/c-parser.cc | 39 +++++
gcc/c/c-tree.h | 8 +-
gcc/c/c-typeck.cc | 60 ++++++--
gcc/doc/extend.texi | 15 ++
gcc/doc/sourcebuild.texi | 7 +-
gcc/ginclude/stddefer.h | 38 +++++
gcc/testsuite/g++.dg/defer-aux.c | 12 ++
gcc/testsuite/g++.dg/defer.C | 29 ++++
gcc/testsuite/gcc.dg/defer-1.c | 256 +++++++++++++++++++++++++++++++
gcc/testsuite/gcc.dg/defer-2.c | 78 ++++++++++
gcc/testsuite/gcc.dg/defer-3.c | 17 ++
gcc/testsuite/gcc.dg/defer-4.c | 8 +
gcc/testsuite/lib/gcc-defs.exp | 140 +++++++++++++----
gcc/testsuite/lib/gcc-dg.exp | 4 +-
19 files changed, 781 insertions(+), 81 deletions(-)
create mode 100644 gcc/ginclude/stddefer.h
create mode 100644 gcc/testsuite/g++.dg/defer-aux.c
create mode 100644 gcc/testsuite/g++.dg/defer.C
create mode 100644 gcc/testsuite/gcc.dg/defer-1.c
create mode 100644 gcc/testsuite/gcc.dg/defer-2.c
create mode 100644 gcc/testsuite/gcc.dg/defer-3.c
create mode 100644 gcc/testsuite/gcc.dg/defer-4.c
Range-diff against v9:
-: ----------- > 1: ac508d6b7a7 c: handle expression nodes in push_cleanup
1: bdec86a2ad3 ! 2: d0164ec7cf1 c: introduce jump barriers for statement expressions
@@ gcc/c/c-decl.cc: finish_underspecified_init (tree name, unsigned int prev_state)
in_underspecified_init = (prev_state & (1u << 1)) >> 1;
}
--/* Adjust the bindings for the start of a statement expression. */
+
+/* Push or pop the jump barrier count of a statement expression. */
+
+static void
+c_binding_adjust_jump_barrier (struct c_spot_bindings *binding, bool start)
+{
-+ struct c_jump_barrier *barrier = defer
-+ ? &binding->defer_blocks
-+ : &binding->stmt_exprs;
-+
+ if (start)
-+ barrier->count++;
++ binding->stmt_exprs.count++;
+ else
-+ barrier->count--;
++ binding->stmt_exprs.count--;
+
-+ if (barrier->count < 0)
++ if (binding->stmt_exprs.count < 0)
+ {
-+ barrier->count = 0;
-+ barrier->left = true;
++ binding->stmt_exprs.count = 0;
++ binding->stmt_exprs.left = true;
+ }
+}
+
-+/* Adjust the bindings for the start of a statement expression or defer block. */
+ /* Adjust the bindings for the start of a statement expression. */
void
- c_bindings_start_stmt_expr (struct c_spot_bindings* switch_bindings)
@@ gcc/c/c-decl.cc: c_bindings_start_stmt_expr (struct c_spot_bindings* switch_bindings)
if (TREE_CODE (b->decl) != LABEL_DECL)
continue;
@@ gcc/c/c-decl.cc: c_bindings_start_stmt_expr (struct c_spot_bindings* switch_bind
+ c_binding_adjust_jump_barrier (switch_bindings, true);
}
--/* Adjust the bindings for the end of a statement expression. */
-+/* Adjust the bindings for the end of a statement expression or defer block. */
-
- void
- c_bindings_end_stmt_expr (struct c_spot_bindings *switch_bindings)
+ /* Adjust the bindings for the end of a statement expression. */
@@ gcc/c/c-decl.cc: c_bindings_end_stmt_expr (struct c_spot_bindings *switch_bindings)
if (TREE_CODE (b->decl) != LABEL_DECL)
continue;
@@ gcc/c/c-decl.cc: c_bindings_end_stmt_expr (struct c_spot_bindings *switch_bindin
{
- --switch_bindings->stmt_exprs;
- gcc_assert (switch_bindings->stmt_exprs >= 0);
-+ c_binding_adjust_jump_barrier (switch_bindings, defer, false);
++ c_binding_adjust_jump_barrier (switch_bindings, false);
+ gcc_assert (switch_bindings->stmt_exprs.count >= 0);
}
}
2: f326f70ee14 = 3: bc24bd62af1 gcc/testsuite: support specifying a language for additional sources
3: ac9492f6281 ! 4: ce5253004bf c: implement defer
@@ Commit message
local jump shall jump over a defer statement, nor shall return, break,
and continue, jump out of one
- 1: https://open-std.org/JTC1/SC22/WG14/www/docs/n3734.pdf
+ 1: https://open-std.org/JTC1/SC22/WG14/www/docs/n3928.pdf
gcc/ChangeLog:
@@ gcc/c/c-decl.cc: finish_underspecified_init (tree name, unsigned int prev_state)
static void
-c_binding_adjust_jump_barrier (struct c_spot_bindings *binding, bool start)
-+c_binding_adjust_jump_barrier (struct c_spot_bindings *binding,
-+ bool defer, bool start)
++c_binding_adjust_jump_barrier (struct c_spot_bindings *binding, bool defer, bool start)
{
- struct c_jump_barrier *barrier = defer
- ? &binding->defer_blocks
-@@ gcc/c/c-decl.cc: c_binding_adjust_jump_barrier (struct c_spot_bindings *binding, bool start)
- /* Adjust the bindings for the start of a statement expression or defer block. */
+- if (start)
+- binding->stmt_exprs.count++;
+- else
+- binding->stmt_exprs.count--;
++ struct c_jump_barrier *barrier = defer
++ ? &binding->defer_blocks
++ : &binding->stmt_exprs;
+
+- if (binding->stmt_exprs.count < 0)
++ if (start)
++ barrier->count++;
++ else
++ barrier->count--;
++
++ if (barrier->count < 0)
+ {
+- binding->stmt_exprs.count = 0;
+- binding->stmt_exprs.left = true;
++ barrier->count = 0;
++ barrier->left = true;
+ }
+ }
+
+-/* Adjust the bindings for the start of a statement expression. */
++/* Adjust the bindings for the start of a statement expression or defer block. */
void
-c_bindings_start_stmt_expr (struct c_spot_bindings* switch_bindings)
@@ gcc/c/c-decl.cc: c_bindings_start_stmt_expr (struct c_spot_bindings* switch_bind
+ }
}
- /* Adjust the bindings for the end of a statement expression or defer block. */
+ /* Adjust the bindings for the end of a statement expression. */
void
-c_bindings_end_stmt_expr (struct c_spot_bindings *switch_bindings)
@@ gcc/c/c-decl.cc: c_bindings_end_stmt_expr (struct c_spot_bindings *switch_bindin
}
}
-@@ gcc/c/c-decl.cc: c_bindings_end_stmt_expr (struct c_spot_bindings *switch_bindings)
+ if (switch_bindings != NULL)
{
- c_binding_adjust_jump_barrier (switch_bindings, defer, false);
+- c_binding_adjust_jump_barrier (switch_bindings, false);
++ c_binding_adjust_jump_barrier (switch_bindings, defer, false);
gcc_assert (switch_bindings->stmt_exprs.count >= 0);
+ gcc_assert (switch_bindings->defer_blocks.count >= 0);
}
@@ gcc/doc/extend.texi: These identifiers are variables, not preprocessor macros, a
+language keyword for deferred execution of statements on scope exit. As an
+extension, GNU C recognizes @code{_Defer} in all C versions.
+
-+If @option{-fexceptions} is enabled, then all defeered statements
++If @option{-fexceptions} is enabled, then all deferred statements
+are run during the stack unwinding that happens during the processing
+of the exception. Note that the @code{_Defer} does not allow the
+exception to be caught, only to perform an action.
--
2.55.0
From navi@vlhl.dev Sun Nov 1 20:14:39 2026
From: navi@vlhl.dev (navi)
Date: Sun, 1 Nov 2026 21:14:39 +0100
Subject: [PATCH v10 1/4] c: handle expression nodes in push_cleanup
In-Reply-To: <20261101201530.2684116-1-navi@vlhl.dev>
References: <20261101201530.2684116-1-navi@vlhl.dev>
Message-ID: <20261101201530.2684116-2-navi@vlhl.dev>
for future use with defer statements, as they do not have a declaration
associated, and are bound to the scope with a BIND_EXPR
gcc/c/ChangeLog:
* c-typeck.cc (push_cleanup): Handle EXPR_P nodes.
Signed-off-by: navi
---
gcc/c/c-typeck.cc | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc
index 2d020085833..df4b1686975 100644
--- a/gcc/c/c-typeck.cc
+++ b/gcc/c/c-typeck.cc
@@ -14147,14 +14147,20 @@ c_end_compound_stmt (location_t loc, tree stmt, bool do_scope)
meant to apply to normal control flow transfer. */
void
-push_cleanup (tree decl, tree cleanup, bool eh_only)
+push_cleanup (tree node, tree cleanup, bool eh_only)
{
+ location_t loc = UNKNOWN_LOCATION;
enum tree_code code;
tree stmt, list;
bool stmt_expr;
+ if (DECL_P (node))
+ loc = DECL_SOURCE_LOCATION (node);
+ else if (EXPR_P (node))
+ loc = EXPR_LOCATION (node);
+
code = eh_only ? TRY_CATCH_EXPR : TRY_FINALLY_EXPR;
- stmt = build_stmt (DECL_SOURCE_LOCATION (decl), code, NULL, cleanup);
+ stmt = build_stmt (loc, code, NULL, cleanup);
add_stmt (stmt);
stmt_expr = STATEMENT_LIST_STMT_EXPR (cur_stmt_list);
list = push_stmt_list ();
--
2.55.0
From navi@vlhl.dev Sun Nov 1 20:14:40 2026
From: navi@vlhl.dev (navi)
Date: Sun, 1 Nov 2026 21:14:40 +0100
Subject: [PATCH v10 2/4] c: introduce jump barriers for statement expressions
In-Reply-To: <20261101201530.2684116-1-navi@vlhl.dev>
References: <20261101201530.2684116-1-navi@vlhl.dev>
Message-ID: <20261101201530.2684116-3-navi@vlhl.dev>
represent the start and end of scope which a local jump is not allowed
to cross as a jump barrier, moving this logic out into a function allows
for defer statements to use the same codepath
gcc/c/ChangeLog:
* c-decl.cc (struct c_jump_barrier): New structure.
(struct c_spot_bindings): Extract out members to struct c_jump_barrier.
(set_spot_bindings): Adjust member access for c_jump_barrier.
(c_binding_adjust_jump_barrier): New function.
(c_bindings_start_stmt_expr): Call c_binding_adjust_jump_barrier.
(c_bindings_end_stmt_expr): Likewise.
(lookup_label_for_goto): Adjust member access for c_jump_barrier.
(check_earlier_gotos): Likewise.
(c_release_switch_bindings): Likewise.
(c_check_switch_jump_warnings): Likewise.
Signed-off-by: navi
---
gcc/c/c-decl.cc | 78 +++++++++++++++++++++++++++----------------------
1 file changed, 43 insertions(+), 35 deletions(-)
diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc
index ada5a5043af..700b0409643 100644
--- a/gcc/c/c-decl.cc
+++ b/gcc/c/c-decl.cc
@@ -383,6 +383,16 @@ c_tree_size (enum tree_code code)
scopes are popped, we update these structures and gather the decls
that matter at that time. */
+struct GTY(()) c_jump_barrier {
+ /* The number of barriers that have started since this label or goto
+ statement was defined. This is zero if we are at the same barrier.
+ It is positive if we are in a barrier that started since this spot.
+ If it goes negative, it is reset to zero and .left is set to true. */
+ int count;
+ /* Whether we started in a barrier but are no longer in it. */
+ bool left;
+};
+
struct GTY(()) c_spot_bindings {
/* The currently open scope which holds bindings defined when the
label was defined or the goto statement was found. */
@@ -391,16 +401,7 @@ struct GTY(()) c_spot_bindings {
of the label or goto. This lets us look at older or newer
bindings in the scope, as appropriate. */
struct c_binding *bindings_in_scope;
- /* The number of statement expressions that have started since this
- label or goto statement was defined. This is zero if we are at
- the same statement expression level. It is positive if we are in
- a statement expression started since this spot. It is negative
- if this spot was in a statement expression and we have left
- it. */
- int stmt_exprs;
- /* Whether we started in a statement expression but are no longer in
- it. This is set to true if stmt_exprs ever goes negative. */
- bool left_stmt_expr;
+ struct c_jump_barrier stmt_exprs;
};
/* This structure is used to keep track of bindings seen when a goto
@@ -989,8 +990,8 @@ set_spot_bindings (struct c_spot_bindings *p, bool defining)
p->scope = NULL;
p->bindings_in_scope = NULL;
}
- p->stmt_exprs = 0;
- p->left_stmt_expr = false;
+ p->stmt_exprs.count = 0;
+ p->stmt_exprs.left = false;
}
/* Update spot bindings P as we pop out of SCOPE. Return true if we
@@ -1616,6 +1617,24 @@ finish_underspecified_init (tree name, unsigned int prev_state)
in_underspecified_init = (prev_state & (1u << 1)) >> 1;
}
+
+/* Push or pop the jump barrier count of a statement expression. */
+
+static void
+c_binding_adjust_jump_barrier (struct c_spot_bindings *binding, bool start)
+{
+ if (start)
+ binding->stmt_exprs.count++;
+ else
+ binding->stmt_exprs.count--;
+
+ if (binding->stmt_exprs.count < 0)
+ {
+ binding->stmt_exprs.count = 0;
+ binding->stmt_exprs.left = true;
+ }
+}
+
/* Adjust the bindings for the start of a statement expression. */
void
@@ -1639,14 +1658,15 @@ c_bindings_start_stmt_expr (struct c_spot_bindings* switch_bindings)
if (TREE_CODE (b->decl) != LABEL_DECL)
continue;
label_vars = b->u.label;
- ++label_vars->label_bindings.stmt_exprs;
+
+ c_binding_adjust_jump_barrier (&label_vars->label_bindings, true);
FOR_EACH_VEC_SAFE_ELT (label_vars->gotos, ix, g)
- ++g->goto_bindings.stmt_exprs;
+ c_binding_adjust_jump_barrier (&g->goto_bindings, true);
}
}
if (switch_bindings != NULL)
- ++switch_bindings->stmt_exprs;
+ c_binding_adjust_jump_barrier (switch_bindings, true);
}
/* Adjust the bindings for the end of a statement expression. */
@@ -1672,28 +1692,16 @@ c_bindings_end_stmt_expr (struct c_spot_bindings *switch_bindings)
if (TREE_CODE (b->decl) != LABEL_DECL)
continue;
label_vars = b->u.label;
- --label_vars->label_bindings.stmt_exprs;
- if (label_vars->label_bindings.stmt_exprs < 0)
- {
- label_vars->label_bindings.left_stmt_expr = true;
- label_vars->label_bindings.stmt_exprs = 0;
- }
+ c_binding_adjust_jump_barrier (&label_vars->label_bindings, false);
FOR_EACH_VEC_SAFE_ELT (label_vars->gotos, ix, g)
- {
- --g->goto_bindings.stmt_exprs;
- if (g->goto_bindings.stmt_exprs < 0)
- {
- g->goto_bindings.left_stmt_expr = true;
- g->goto_bindings.stmt_exprs = 0;
- }
- }
+ c_binding_adjust_jump_barrier (&g->goto_bindings, false);
}
}
if (switch_bindings != NULL)
{
- --switch_bindings->stmt_exprs;
- gcc_assert (switch_bindings->stmt_exprs >= 0);
+ c_binding_adjust_jump_barrier (switch_bindings, false);
+ gcc_assert (switch_bindings->stmt_exprs.count >= 0);
}
}
@@ -4278,7 +4286,7 @@ lookup_label_for_goto (location_t loc, tree name)
FOR_EACH_VEC_SAFE_ELT (label_vars->decls_in_scope, ix, decl)
warn_about_goto (loc, label, decl);
- if (label_vars->label_bindings.left_stmt_expr)
+ if (label_vars->label_bindings.stmt_exprs.left)
{
auto_diagnostic_group d;
error_at (loc, "jump into statement expression");
@@ -4369,7 +4377,7 @@ check_earlier_gotos (tree label, struct c_label_vars* label_vars)
}
}
- if (g->goto_bindings.stmt_exprs > 0)
+ if (g->goto_bindings.stmt_exprs.count > 0)
{
auto_diagnostic_group d;
error_at (g->loc, "jump into statement expression");
@@ -4460,7 +4468,7 @@ c_get_switch_bindings (void)
void
c_release_switch_bindings (struct c_spot_bindings *bindings)
{
- gcc_assert (bindings->stmt_exprs == 0 && !bindings->left_stmt_expr);
+ gcc_assert (bindings->stmt_exprs.count == 0 && !bindings->stmt_exprs.left);
XDELETE (bindings);
}
@@ -4524,7 +4532,7 @@ c_check_switch_jump_warnings (struct c_spot_bindings *switch_bindings,
}
}
- if (switch_bindings->stmt_exprs > 0)
+ if (switch_bindings->stmt_exprs.count > 0)
{
saw_error = true;
auto_diagnostic_group d;
--
2.55.0
From navi@vlhl.dev Sun Nov 1 20:14:41 2026
From: navi@vlhl.dev (navi)
Date: Sun, 1 Nov 2026 21:14:41 +0100
Subject: [PATCH v10 3/4] gcc/testsuite: support specifying a language for
additional sources
In-Reply-To: <20261101201530.2684116-1-navi@vlhl.dev>
References: <20261101201530.2684116-1-navi@vlhl.dev>
Message-ID: <20261101201530.2684116-4-navi@vlhl.dev>
From: Arsen Arsenovi?
This patch permits the dg-additional-sources construct to accept a
'lang' clause. This 'lang' clause tells the testsuite to pass '-x'
flags around the additional sources list, which is useful for
multi-language tests that can be built with one driver invocation.
Tested-by: navi
gcc/testsuite/ChangeLog:
* lib/gcc-defs.exp (additional_sources_omit_on_compile): Drop.
(additional_sources): Instead of a list, make it a list of
"additional sources" entries, which are triplets holding the
language and linkonly status for a given dg-additional-sources
invocation in addition to FILELIST.
(dg-additional-sources): Process 'lang' clause. Produce entries
like described above. Rewrite clause parsing to be less
strange.
(dg-additional-files-options): Update to match changes above.
Pass -x LANG -Wno-complain-wrong-lang ... -x none if LANG is
nonempty in list above.
* lib/gcc-dg.exp (schedule-cleanups): Fix interpretation of
$additional_sources now that it's a list.
gcc/ChangeLog:
* doc/sourcebuild.texi (Specify additional files for a test):
Document dg-additional-sources { lang ... } clause.
---
gcc/doc/sourcebuild.texi | 7 +-
gcc/testsuite/lib/gcc-defs.exp | 140 ++++++++++++++++++++++++++-------
gcc/testsuite/lib/gcc-dg.exp | 4 +-
3 files changed, 119 insertions(+), 32 deletions(-)
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index db725087566..bd07e760247 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1347,7 +1347,7 @@ to @var{var_value} before execution of the program created by the test.
Specify additional files, other than source files, that must be copied
to the system where the compiler runs.
-@item @{ dg-additional-sources "@var{filelist}" [@{ \[linkonly\] \[target @var{selector}\] @}] @}
+@item @{ dg-additional-sources "@var{filelist}" [@{ \[linkonly\] \[target @var{selector}\] @}] @{ lang @var{lang} @} @}
Specify additional source files to appear in the compile line
following the main test file.
If the directive includes the optional @samp{@{ @var{selector} @}}
@@ -1357,6 +1357,11 @@ If @samp{linkonly} is specified, additional sources are used only in
@samp{link} and @samp{run} tests; they are reported as unsupported and
discarded in other kinds of tests that direct the compiler to output to
a single file.
+
+If the directive includes the optional @samp{@{ lang @var{lang} @}}
+clause, then the additional sources are given to the driver surrounded
+with @code{-x @var{lang}} and @code{-x none} flag. The driver is also
+given the @option{-Wno-complain-wrong-lang} flag.
@end table
@subsubsection Add checks at the end of a test
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index 191e2b83fe1..0b58f45d587 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -305,34 +305,86 @@ proc dg-additional-options { args } {
# Record additional sources files that must be compiled along with the
# main source file.
+# List of additional sources. Each additional sources entry is a list of form:
+#
+# { FILELIST LANG LINKONLY }
+#
+# FILELIST is a list of additional files, LANG is the language they should be
+# parsed as, if any. If present, FILELIST will be passed to the compiler as:
+#
+# -x LANG FILELIST -x none
+#
+# ... and otherwise just as FILELIST, without any '-x'. LINKONLY is true iff
+# FILELIST should be omitted on compile, otherwise false.
set additional_sources ""
-set additional_sources_omit_on_compile ""
set additional_sources_used ""
proc dg-additional-sources { args } {
global additional_sources
- global additional_sources_omit_on_compile
- if { [llength $args] > 3 } {
- error "[lindex $args 0]: too many arguments"
+ # Must see at least { dg-additional-sources SOURCE }
+ if { [llength $args] < 2 } {
+ error "[lindex $args 0]: too few arguments"
return
}
- set target [lindex $args 2]
- if { [llength $args] >= 3 && [lindex $target 0] == "linkonly" } {
- append additional_sources_omit_on_compile " [lindex $args 1]"
- set target [lreplace $target 0 1]
+ set filearg [lindex $args 1]
+ set target {}
+ set lang {}
+ set linkonly false
+
+ # Iterate given clauses.
+ foreach arg [lreplace $args 0 1] {
+ # First, check if the current one is { linkonly ... } or "linkonly".
+ # This is because we currently permit both '{ linkonly target ... }'
+ # and mere 'linkonly'.
+ if { [lindex $arg 0] == "linkonly" } {
+ set linkonly true
+ set arg [lreplace $arg 0 0]
+
+ # If we processed the whole clause, skip the rest of the work.
+ if { [llength $arg] == 0 } {
+ continue
+ }
+ }
+
+ # Then, try for the target clause.
+ if { [lindex $arg 0] == "target" } {
+ if { $target != {} } {
+ error "[lindex $args 0]: duplicate `target' clause"
+ }
+ set target $arg
+ continue
+ }
+
+ # Then, try the 'lang' clause. This one adds '-x LANG ... -x none' to
+ # additional_flags instead of just the filename.
+ if { [lindex $arg 0] == "lang" } {
+ if { $lang != {} } {
+ error "[lindex $args 0]: duplicate `lang' clause"
+ }
+ if { [llength $arg] != 2 } {
+ error "[lindex $args 0]: `lang' clause must be of form { lang LANG }"
+ }
+ set lang [lindex $arg 1]
+ continue
+ }
+
+ error "[lindex $args 0]: could not parse clause $arg"
}
- if { [llength $args] >= 3 && $target != ""} {
+ # Construct the additional sources element
+ set entry [list $filearg $lang $linkonly]
+
+ if { $target != "" } {
switch [dg-process-target $target] {
- "S" { append additional_sources " [lindex $args 1]" }
+ "S" { lappend additional_sources $entry }
"N" { }
"F" { error "[lindex $args 0]: `xfail' not allowed here" }
"P" { error "[lindex $args 0]: `xfail' not allowed here" }
}
} else {
- append additional_sources " [lindex $args 1]"
+ lappend additional_sources $entry
}
}
@@ -418,39 +470,67 @@ proc dg-additional-files-options { options source dest type } {
gcc_adjust_linker_flags
global additional_sources
- global additional_sources_omit_on_compile
global additional_sources_used
global additional_files
set to_download [list]
- if { $additional_sources_omit_on_compile != "" \
+
+ # Find if we have any linkonly sources.
+ set has_linkonly false
+ foreach s $additional_sources {
+ if [lindex $s 2] {
+ set has_linkonly true
+ break
+ }
+ }
+
+ if { $has_linkonly
&& $additional_sources != "" \
&& $type != "executable" && $dest != "" } then {
- set linkonly ""
+ # Extract only linkonly sources, emit unsupported for rest.
+ set linkonly {}
foreach s $additional_sources {
- foreach s2 $additional_sources_omit_on_compile {
- if { $s == $s2 } {
- unsupported "$s: additional-source will not be used to build $dest"
- set s ""
- break
- }
+ if [lindex $s 2] {
+ lappend linkonly $s
+ continue
}
- if { $s != "" } {
- append linkonly " $s"
+
+ # This source set is not linkonly, emit 'unsupported'.
+ foreach s2 [lindex $s 0] {
+ unsupported "$s2: additional-source will not be used to build $dest"
}
}
set additional_sources "$linkonly"
}
if { $additional_sources == "" } then {
} else {
- if [is_remote host] {
- lappend options "additional_flags=$additional_sources"
+ set additional_sources_used {}
+ foreach s $additional_sources {
+ set files [lindex $s 0]
+ set lang [lindex $s 1]
+
+ # Add -x LANG
+ if { $lang != "" } {
+ lappend options "additional_flags=-x $lang"
+ lappend options "additional_flags=-Wno-complain-wrong-lang"
+ }
+
+ # Add the actual sources
+ if [is_remote host] {
+ lappend options "additional_flags=$files"
+ }
+ regsub -all {^ *| *} $files " [file dirname $source]/" files
+ if ![is_remote host] {
+ lappend options "additional_flags=$files"
+ }
+ append to_download $files
+ append additional_sources_used $files
+
+ # Undo -x LANG
+ if { $lang != "" } {
+ lappend options "additional_flags=-x none"
+ }
}
- regsub -all {^ *| *} $additional_sources " [file dirname $source]/" additional_sources
- if ![is_remote host] {
- lappend options "additional_flags=$additional_sources"
- }
- set to_download [concat $to_download $additional_sources]
- set additional_sources_used "$additional_sources"
+
set additional_sources ""
# This option restores naming of aux and dump output files
# after input files when multiple input files are named,
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 9f183259257..ac1412d8195 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -139,7 +139,9 @@ proc schedule-cleanups { opts } {
lappend testcases [lindex [testname-for-summary] 0]
verbose "Cleanup testcases: $testcases" 4
if { [info exists additional_sources] && $additional_sources != "" } {
- lappend testcases $additional_sources
+ foreach s $additional_sources {
+ append testcases " [lindex $s 0]"
+ }
verbose "Cleanup testcases, additional: $additional_sources" 4
}
verbose "Cleanup all options: $opts" 4
--
2.55.0
From navi@vlhl.dev Sun Nov 1 20:14:42 2026
From: navi@vlhl.dev (navi)
Date: Sun, 1 Nov 2026 21:14:42 +0100
Subject: [PATCH v10 4/4] c: implement defer
In-Reply-To: <20261101201530.2684116-1-navi@vlhl.dev>
References: <20261101201530.2684116-1-navi@vlhl.dev>
Message-ID: <20261101201530.2684116-5-navi@vlhl.dev>
based on the technical specification 25755[1] as an extension
_Defer is provided as a keyword if gnu extensions are enabled, and
stddefer.h provided a macro for the 'defer' spelling
deferred statements execute at the end of the scope they're added on,
similar to the cleanup attribute, and they have much of the same
constraints as statement expressions, with added limitation that no
local jump shall jump over a defer statement, nor shall return, break,
and continue, jump out of one
1: https://open-std.org/JTC1/SC22/WG14/www/docs/n3928.pdf
gcc/ChangeLog:
* Makefile.in:
* ginclude/stddefer.h: New file.
gcc/c-family/ChangeLog:
* c-common.cc: Add _Defer keywords.
* c-common.h (enum rid): Add RID_DEFER.
* c-cppbuiltin.cc (c_cpp_builtins): Set __STDC_DEFER_TS25755__.
gcc/c/ChangeLog:
* c-decl.cc (struct c_spot_bindings): Add defer_blocks.
(struct c_scope): Add has_defer_block flag.
(set_spot_bindings): Clear defer_blocks.
(c_binding_adjust_jump_barrier): Handle deferred blocks.
(c_bindings_start_stmt_expr): Rename to c_bindings_start_jump_barrier.
(c_bindings_start_jump_barrier): Handle deferred statements.
(c_bindings_end_stmt_expr): Rename to c_bindings_end_jump_barrier.
(c_bindings_end_jump_barrier): Handle deferred statements.
(lookup_label_for_goto): Check defer contraints.
(check_earlier_gotos): Likewise.
(c_release_switch_bindings): Likewise.
(c_check_switch_jump_warnings): Likewise.
* c-parser.cc (c_parser_defer_statement): New function.
(c_parser_statement_after_labels): Check defer contraints and parse defer.
* c-tree.h (IN_DEFER_STMT): Add variant.
(c_bindings_start_stmt_expr): Rename to c_bindings_start_jump_barrier.
(c_bindings_end_stmt_expr): Rename to c_bindings_end_jump_barrier.
(c_bindings_start_jump_barrier): New function.
(c_bindings_end_jump_barrier): New function.
(c_begin_defer_block): New function.
(c_end_defer_block): New function.
* c-typeck.cc (c_finish_return):
(c_finish_bc_stmt): Check for IN_DEFER_STMT.
(c_begin_stmt_expr): Likewise.
(c_finish_stmt_expr): Likewise.
(c_begin_defer_block): New function.
(c_end_defer_block): New function.
gcc/testsuite/ChangeLog:
* gcc.dg/defer-1.c: New test.
* gcc.dg/defer-2.c: New test.
* gcc.dg/defer-3.c: New test.
* gcc.dg/defer-4.c: New test.
gcc/ChangeLog:
* doc/extend.texi: Add _Defer documentation.
Signed-off-by: navi
---
gcc/Makefile.in | 1 +
gcc/c-family/c-common.cc | 1 +
gcc/c-family/c-common.h | 1 +
gcc/c-family/c-cppbuiltin.cc | 3 +
gcc/c/c-decl.cc | 99 +++++++++---
gcc/c/c-parser.cc | 39 +++++
gcc/c/c-tree.h | 8 +-
gcc/c/c-typeck.cc | 50 +++++-
gcc/doc/extend.texi | 15 ++
gcc/ginclude/stddefer.h | 38 +++++
gcc/testsuite/g++.dg/defer-aux.c | 12 ++
gcc/testsuite/g++.dg/defer.C | 29 ++++
gcc/testsuite/gcc.dg/defer-1.c | 256 +++++++++++++++++++++++++++++++
gcc/testsuite/gcc.dg/defer-2.c | 78 ++++++++++
gcc/testsuite/gcc.dg/defer-3.c | 17 ++
gcc/testsuite/gcc.dg/defer-4.c | 8 +
16 files changed, 627 insertions(+), 28 deletions(-)
create mode 100644 gcc/ginclude/stddefer.h
create mode 100644 gcc/testsuite/g++.dg/defer-aux.c
create mode 100644 gcc/testsuite/g++.dg/defer.C
create mode 100644 gcc/testsuite/gcc.dg/defer-1.c
create mode 100644 gcc/testsuite/gcc.dg/defer-2.c
create mode 100644 gcc/testsuite/gcc.dg/defer-3.c
create mode 100644 gcc/testsuite/gcc.dg/defer-4.c
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f2a015d729d..8a1999fcd99 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -487,6 +487,7 @@ USER_H = $(srcdir)/ginclude/float.h \
$(srcdir)/ginclude/stdatomic.h \
$(srcdir)/ginclude/stdckdint.h \
$(srcdir)/ginclude/stdcountof.h \
+ $(srcdir)/ginclude/stddefer.h \
$(EXTRA_HEADERS)
USER_H_INC_NEXT_PRE = @user_headers_inc_next_pre@
diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc
index 6380bec4515..3f0bcd65ee1 100644
--- a/gcc/c-family/c-common.cc
+++ b/gcc/c-family/c-common.cc
@@ -415,6 +415,7 @@ const struct c_common_resword c_common_reswords[] =
{ "_Decimal64", RID_DFLOAT64, D_CONLY },
{ "_Decimal128", RID_DFLOAT128, D_CONLY },
{ "_Decimal64x", RID_DFLOAT64X, D_CONLY },
+ { "_Defer", RID_DEFER, D_CONLY | D_EXT },
{ "_Fract", RID_FRACT, D_CONLY | D_EXT },
{ "_Accum", RID_ACCUM, D_CONLY | D_EXT },
{ "_Sat", RID_SAT, D_CONLY | D_EXT },
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index 197db508c16..fe4bf92762f 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -114,6 +114,7 @@ enum rid
RID_BUILTIN_COUNTED_BY_REF, RID_BUILTIN_BSWAPG,
RID_BUILTIN_BITREVERSEG,
RID_DFLOAT32, RID_DFLOAT64, RID_DFLOAT128, RID_DFLOAT64X,
+ RID_DEFER,
/* TS 18661-3 keywords, in the same sequence as the TI_* values. */
RID_FLOAT16,
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
index 2c68681a368..8e4ec7550db 100644
--- a/gcc/c-family/c-cppbuiltin.cc
+++ b/gcc/c-family/c-cppbuiltin.cc
@@ -1669,6 +1669,9 @@ c_cpp_builtins (cpp_reader *pfile)
if (flag_iso)
cpp_define (pfile, "__STRICT_ANSI__");
+ if (!flag_no_gnu_keywords)
+ builtin_define_with_int_value ("__STDC_DEFER_TS25755__", 1);
+
if (!flag_signed_char)
cpp_define (pfile, "__CHAR_UNSIGNED__");
diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc
index 700b0409643..ce67d8f5320 100644
--- a/gcc/c/c-decl.cc
+++ b/gcc/c/c-decl.cc
@@ -401,7 +401,7 @@ struct GTY(()) c_spot_bindings {
of the label or goto. This lets us look at older or newer
bindings in the scope, as appropriate. */
struct c_binding *bindings_in_scope;
- struct c_jump_barrier stmt_exprs;
+ struct c_jump_barrier stmt_exprs, defer_blocks;
};
/* This structure is used to keep track of bindings seen when a goto
@@ -535,6 +535,10 @@ struct GTY((chain_next ("%h.outer"))) c_scope {
decl_jump_unsafe would return true for any of the bindings. This
is used to avoid looping over all the bindings unnecessarily. */
bool has_jump_unsafe_decl : 1;
+
+ /* True if this scope has any deferred statement. This is used to
+ * check invalid goto jumps. */
+ bool has_defer_block : 1;
};
/* The scope currently in effect. */
@@ -992,6 +996,8 @@ set_spot_bindings (struct c_spot_bindings *p, bool defining)
}
p->stmt_exprs.count = 0;
p->stmt_exprs.left = false;
+ p->defer_blocks.count = 0;
+ p->defer_blocks.left = false;
}
/* Update spot bindings P as we pop out of SCOPE. Return true if we
@@ -1618,30 +1624,37 @@ finish_underspecified_init (tree name, unsigned int prev_state)
}
-/* Push or pop the jump barrier count of a statement expression. */
+/* Push or pop the jump barrier count of a statement expression or defer block. */
static void
-c_binding_adjust_jump_barrier (struct c_spot_bindings *binding, bool start)
+c_binding_adjust_jump_barrier (struct c_spot_bindings *binding, bool defer, bool start)
{
- if (start)
- binding->stmt_exprs.count++;
- else
- binding->stmt_exprs.count--;
+ struct c_jump_barrier *barrier = defer
+ ? &binding->defer_blocks
+ : &binding->stmt_exprs;
- if (binding->stmt_exprs.count < 0)
+ if (start)
+ barrier->count++;
+ else
+ barrier->count--;
+
+ if (barrier->count < 0)
{
- binding->stmt_exprs.count = 0;
- binding->stmt_exprs.left = true;
+ barrier->count = 0;
+ barrier->left = true;
}
}
-/* Adjust the bindings for the start of a statement expression. */
+/* Adjust the bindings for the start of a statement expression or defer block. */
void
-c_bindings_start_stmt_expr (struct c_spot_bindings* switch_bindings)
+c_bindings_start_jump_barrier (bool defer, struct c_spot_bindings* switch_bindings)
{
struct c_scope *scope;
+ if (defer)
+ current_scope->has_defer_block = true;
+
for (scope = current_scope; scope != NULL; scope = scope->outer)
{
struct c_binding *b;
@@ -1659,20 +1672,24 @@ c_bindings_start_stmt_expr (struct c_spot_bindings* switch_bindings)
continue;
label_vars = b->u.label;
- c_binding_adjust_jump_barrier (&label_vars->label_bindings, true);
+ c_binding_adjust_jump_barrier (&label_vars->label_bindings, defer, true);
FOR_EACH_VEC_SAFE_ELT (label_vars->gotos, ix, g)
- c_binding_adjust_jump_barrier (&g->goto_bindings, true);
+ c_binding_adjust_jump_barrier (&g->goto_bindings, defer, true);
}
}
if (switch_bindings != NULL)
- c_binding_adjust_jump_barrier (switch_bindings, true);
+ {
+ if (defer)
+ switch_bindings->scope->has_defer_block = true;
+ c_binding_adjust_jump_barrier (switch_bindings, defer, true);
+ }
}
/* Adjust the bindings for the end of a statement expression. */
void
-c_bindings_end_stmt_expr (struct c_spot_bindings *switch_bindings)
+c_bindings_end_jump_barrier (bool defer, struct c_spot_bindings *switch_bindings)
{
struct c_scope *scope;
@@ -1692,16 +1709,17 @@ c_bindings_end_stmt_expr (struct c_spot_bindings *switch_bindings)
if (TREE_CODE (b->decl) != LABEL_DECL)
continue;
label_vars = b->u.label;
- c_binding_adjust_jump_barrier (&label_vars->label_bindings, false);
+ c_binding_adjust_jump_barrier (&label_vars->label_bindings, defer, false);
FOR_EACH_VEC_SAFE_ELT (label_vars->gotos, ix, g)
- c_binding_adjust_jump_barrier (&g->goto_bindings, false);
+ c_binding_adjust_jump_barrier (&g->goto_bindings, defer, false);
}
}
if (switch_bindings != NULL)
{
- c_binding_adjust_jump_barrier (switch_bindings, false);
+ c_binding_adjust_jump_barrier (switch_bindings, defer, false);
gcc_assert (switch_bindings->stmt_exprs.count >= 0);
+ gcc_assert (switch_bindings->defer_blocks.count >= 0);
}
}
@@ -4293,6 +4311,12 @@ lookup_label_for_goto (location_t loc, tree name)
inform (DECL_SOURCE_LOCATION (label), "label %qD defined here", label);
}
+ if (label_vars->label_bindings.defer_blocks.left)
+ {
+ error_at (loc, "jump into defer block");
+ inform (DECL_SOURCE_LOCATION (label), "label %qD defined here", label);
+ }
+
return label;
}
@@ -4384,6 +4408,23 @@ check_earlier_gotos (tree label, struct c_label_vars* label_vars)
inform (DECL_SOURCE_LOCATION (label), "label %qD defined here",
label);
}
+
+ if (g->goto_bindings.defer_blocks.count > 0)
+ {
+ error_at (g->loc, "jump into defer block");
+ inform (DECL_SOURCE_LOCATION (label), "label %qD defined here", label);
+ }
+ else if (g->goto_bindings.defer_blocks.left)
+ {
+ error_at (g->loc, "jump out of defer block");
+ inform (DECL_SOURCE_LOCATION (label), "label %qD defined here", label);
+ }
+ else if (label_vars->label_bindings.scope->has_defer_block
+ || g->goto_bindings.scope->has_defer_block)
+ {
+ error_at (g->loc, "jump over defer block");
+ inform (DECL_SOURCE_LOCATION (label), "label %qD defined here", label);
+ }
}
/* Now that the label is defined, we will issue warnings about
@@ -4469,6 +4510,7 @@ void
c_release_switch_bindings (struct c_spot_bindings *bindings)
{
gcc_assert (bindings->stmt_exprs.count == 0 && !bindings->stmt_exprs.left);
+ gcc_assert (bindings->defer_blocks.count == 0 && !bindings->defer_blocks.left);
XDELETE (bindings);
}
@@ -4540,6 +4582,25 @@ c_check_switch_jump_warnings (struct c_spot_bindings *switch_bindings,
inform (switch_loc, "switch starts here");
}
+ if (switch_bindings->defer_blocks.count > 0)
+ {
+ saw_error = true;
+ error_at (case_loc, "switch jumps into defer block");
+ inform (switch_loc, "switch starts here");
+ }
+ else if (switch_bindings->defer_blocks.left)
+ {
+ saw_error = true;
+ error_at (case_loc, "switch jumps out of defer block");
+ inform (switch_loc, "switch starts here");
+ }
+ else if (switch_bindings->scope->has_defer_block)
+ {
+ saw_error = true;
+ error_at (case_loc, "switch jumps over defer block");
+ inform (switch_loc, "switch starts here");
+ }
+
return saw_error;
}
diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc
index 519959e7290..29fa5c4885e 100644
--- a/gcc/c/c-parser.cc
+++ b/gcc/c/c-parser.cc
@@ -1849,6 +1849,7 @@ static void c_parser_statement_after_labels (c_parser *, bool *, tree,
static tree c_parser_c99_block_statement (c_parser *, bool *,
location_t * = NULL);
static void c_parser_if_statement (c_parser *, bool *, vec *);
+static void c_parser_defer_statement (c_parser *parser, bool *if_p, tree before_labels);
static void c_parser_switch_statement (c_parser *, bool *, tree);
static void c_parser_while_statement (c_parser *, bool, unsigned short, bool,
bool *, tree);
@@ -8402,6 +8403,9 @@ c_parser_statement_after_labels (c_parser *parser, bool *if_p,
case RID_FOR:
c_parser_for_statement (parser, false, 0, false, if_p, before_labels);
break;
+ case RID_DEFER:
+ c_parser_defer_statement (parser, if_p, before_labels);
+ break;
case RID_GOTO:
c_parser_consume_token (parser);
if (c_parser_next_token_is (parser, CPP_NAME))
@@ -8928,6 +8932,41 @@ c_parser_if_statement (c_parser *parser, bool *if_p, vec *chain)
c_parser_maybe_reclassify_token (parser);
}
+/* Parse a defer statement (ISO/DIS TS 25755 6.4).
+
+ defer-statement:
+ defer deferred-block */
+
+static void
+c_parser_defer_statement (c_parser *parser, bool *if_p, tree before_labels)
+{
+ location_t loc = c_parser_peek_token (parser)->location;
+ unsigned char save_in_statement = in_statement;
+ tree deferred;
+
+ gcc_assert (c_parser_next_token_is_keyword (parser, RID_DEFER));
+ c_parser_consume_token (parser);
+
+ if (c_parser_next_token_is (parser, CPP_SEMICOLON))
+ {
+ c_end_defer_block (loc, c_begin_defer_block ());
+ add_stmt (build_empty_stmt (loc));
+ c_parser_consume_token (parser);
+ warning_at (loc, OPT_Wempty_body,
+ "suggest braces around empty body in % statement");
+ return;
+ }
+
+ deferred = c_begin_defer_block ();
+
+ in_statement = IN_DEFER_STMT;
+ c_parser_statement_after_labels (parser, if_p, before_labels);
+ in_statement = save_in_statement;
+
+ deferred = c_end_defer_block (loc, deferred);
+ push_cleanup(deferred, deferred, false);
+}
+
/* Parse a switch statement (C90 6.6.4, C99 6.8.4, C11 6.8.4).
switch-statement:
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h
index 0800230873b..db63f6af300 100644
--- a/gcc/c/c-tree.h
+++ b/gcc/c/c-tree.h
@@ -667,6 +667,7 @@ extern struct obstack parser_obstack;
#define IN_OMP_FOR 8
#define IN_OBJC_FOREACH 16
#define IN_NAMED_STMT 32
+#define IN_DEFER_STMT 64
extern unsigned char in_statement;
extern bool switch_statement_break_seen_p;
@@ -678,8 +679,8 @@ extern void finish_underspecified_init (tree, unsigned int);
extern void push_scope (void);
extern tree pop_scope (void);
extern void c_mark_decl_jump_unsafe_in_current_scope ();
-extern void c_bindings_start_stmt_expr (struct c_spot_bindings *);
-extern void c_bindings_end_stmt_expr (struct c_spot_bindings *);
+extern void c_bindings_start_jump_barrier (bool, struct c_spot_bindings *);
+extern void c_bindings_end_jump_barrier (bool, struct c_spot_bindings *);
extern void record_inline_static (location_t, tree, tree,
enum c_inline_static_type);
@@ -925,6 +926,9 @@ extern tree c_end_compound_stmt (location_t, tree, bool);
extern void c_finish_if_stmt (location_t, tree, tree, tree);
extern void c_finish_loop (location_t, location_t, tree, location_t, tree,
tree, tree, tree, bool);
+
+extern tree c_begin_defer_block (void);
+extern tree c_end_defer_block (location_t loc, tree body);
extern tree c_begin_stmt_expr (void);
extern tree c_finish_stmt_expr (location_t, tree);
extern tree c_process_expr_stmt (location_t, tree);
diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc
index df4b1686975..459caa26438 100644
--- a/gcc/c/c-typeck.cc
+++ b/gcc/c/c-typeck.cc
@@ -13426,6 +13426,12 @@ c_finish_return (location_t loc, tree retval, tree origtype, bool musttail_p)
warning_at (xloc, 0,
"function declared % has a % statement");
+ if (in_statement & IN_DEFER_STMT)
+ {
+ error_at (loc, "return from defer block");
+ return NULL_TREE;
+ }
+
set_musttail_on_return (retval, xloc, musttail_p);
if (retval)
@@ -13813,6 +13819,9 @@ c_finish_bc_stmt (location_t loc, tree label, bool is_break, tree name)
case IN_OMP_FOR:
error_at (loc, "break statement used with OpenMP for loop");
return NULL_TREE;
+ case IN_DEFER_STMT:
+ error_at (loc, "break statement jumps out of defer block");
+ return NULL_TREE;
case IN_ITERATION_STMT:
case IN_OBJC_FOREACH:
break;
@@ -13830,6 +13839,9 @@ c_finish_bc_stmt (location_t loc, tree label, bool is_break, tree name)
case IN_OMP_BLOCK:
error_at (loc, "invalid exit from OpenMP structured block");
return NULL_TREE;
+ case IN_DEFER_STMT:
+ error_at (loc, "continue statement jumps out of defer block");
+ return NULL_TREE;
case IN_ITERATION_STMT:
case IN_OMP_FOR:
case IN_OBJC_FOREACH:
@@ -13975,9 +13987,9 @@ c_begin_stmt_expr (void)
keep_next_level ();
ret = c_begin_compound_stmt (true);
- c_bindings_start_stmt_expr (c_switch_stack == NULL
- ? NULL
- : c_switch_stack->bindings);
+ c_bindings_start_jump_barrier (false, c_switch_stack == NULL
+ ? NULL
+ : c_switch_stack->bindings);
/* Mark the current statement list as belonging to a statement list. */
STATEMENT_LIST_STMT_EXPR (ret) = 1;
@@ -13996,9 +14008,9 @@ c_finish_stmt_expr (location_t loc, tree body)
body = c_end_compound_stmt (loc, body, true);
- c_bindings_end_stmt_expr (c_switch_stack == NULL
- ? NULL
- : c_switch_stack->bindings);
+ c_bindings_end_jump_barrier (false, c_switch_stack == NULL
+ ? NULL
+ : c_switch_stack->bindings);
/* Locate the last statement in BODY. See c_end_compound_stmt
about always returning a BIND_EXPR. */
@@ -14093,7 +14105,31 @@ c_finish_stmt_expr (location_t loc, tree body)
return t;
}
}
-
+
+/* Starts a new deferred block to be executed on scope exit. */
+
+tree
+c_begin_defer_block (void)
+{
+ c_bindings_start_jump_barrier (true, c_switch_stack == NULL
+ ? NULL
+ : c_switch_stack->bindings);
+
+ return c_begin_compound_stmt (true);
+}
+
+/* Ends a deferred block. */
+
+tree
+c_end_defer_block (location_t loc, tree body)
+{
+ c_bindings_end_jump_barrier (true, c_switch_stack == NULL
+ ? NULL
+ : c_switch_stack->bindings);
+
+ return c_end_compound_stmt (loc, body, true);
+}
+
/* Begin and end compound statements. This is as simple as pushing
and popping new statement lists from the tree. */
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 684af9cdbb3..b43d63d8f1d 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -13725,6 +13725,7 @@ C and/or C++ standards, while others remain specific to GNU C.
* Alternate Keywords:: @code{__const__}, @code{__asm__}, etc., for header files.
* Function Names:: Printable strings which are the name of the current
function.
+* Defer:: Support for the @code{_Defer} keyword
@end menu
@node Statement Exprs
@@ -14934,6 +14935,20 @@ These identifiers are variables, not preprocessor macros, and may not
be used to initialize @code{char} arrays or be concatenated with string
literals.
+@node Defer
+@subsection Support for the @code{_Defer} keyword
+@cindex defer
+@cindex @code{_Defer} keyword
+
+The technical specification ISO/DIS TS 25755 added @code{_Defer} as a C
+language keyword for deferred execution of statements on scope exit. As an
+extension, GNU C recognizes @code{_Defer} in all C versions.
+
+If @option{-fexceptions} is enabled, then all deferred statements
+are run during the stack unwinding that happens during the processing
+of the exception. Note that the @code{_Defer} does not allow the
+exception to be caught, only to perform an action.
+
@node Semantic Extensions
@section Extensions to C Semantics
diff --git a/gcc/ginclude/stddefer.h b/gcc/ginclude/stddefer.h
new file mode 100644
index 00000000000..b142eebe490
--- /dev/null
+++ b/gcc/ginclude/stddefer.h
@@ -0,0 +1,38 @@
+/* Copyright (C) 1998-2025 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ . */
+
+/*
+ * ISO C Standard: 7.16 Boolean type and values
+ */
+
+#ifndef _STDDEFER_H_
+#define _STDDEFER_H_
+
+#ifndef __cplusplus
+
+#define __STDC_VERSION_STDDEFER_H__ 202602L
+#define defer _Defer
+
+#endif /* __cplusplus */
+
+#endif /* stddefer.h */
diff --git a/gcc/testsuite/g++.dg/defer-aux.c b/gcc/testsuite/g++.dg/defer-aux.c
new file mode 100644
index 00000000000..ec7e0bce199
--- /dev/null
+++ b/gcc/testsuite/g++.dg/defer-aux.c
@@ -0,0 +1,12 @@
+/* { dg-options "-fexceptions" } */
+
+extern void a ();
+extern int c;
+
+void b ()
+{
+ c += 1;
+ _Defer c += 1;
+ a ();
+ c += 1;
+}
diff --git a/gcc/testsuite/g++.dg/defer.C b/gcc/testsuite/g++.dg/defer.C
new file mode 100644
index 00000000000..03794cef524
--- /dev/null
+++ b/gcc/testsuite/g++.dg/defer.C
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-additional-options "-fexceptions" } */
+/* { dg-additional-sources defer-aux.c { lang c } } */
+
+extern "C" {
+ extern void b ();
+
+ int c = 0;
+
+ void a ()
+ {
+ throw 1;
+ }
+}
+
+int main ()
+{
+ try
+ {
+ b ();
+ }
+ catch (int e)
+ {
+ if (c != 2)
+ __builtin_abort ();
+ return 0;
+ }
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/defer-1.c b/gcc/testsuite/gcc.dg/defer-1.c
new file mode 100644
index 00000000000..8432a04a2e8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/defer-1.c
@@ -0,0 +1,256 @@
+/* { dg-do run } */
+/* { dg-options "" } */
+
+#include
+#include
+
+#define assert(x) if (!(x)) __builtin_abort ()
+
+#if __STDC_DEFER_TS25755__ != 2
+# error "missing defer flag"
+#endif
+
+int a ()
+{
+ int r = 5;
+ return r;
+
+ defer r *= 2;
+}
+
+int b ()
+{
+ int r = 0;
+ goto b;
+ {
+ defer r += 2;
+ }
+b:
+ r += 5;
+ return r;
+}
+
+int c ()
+{
+ int r = 0;
+ {
+ defer r += 2;
+ goto b;
+ }
+b:
+ r += 5;
+ return r;
+}
+
+int d ()
+{
+ int r = 0;
+ goto b;
+ {
+b:
+ defer r += 2;
+ }
+ r += 5;
+ return r;
+}
+
+int e ()
+{
+ int r = 0;
+ {
+ goto b;
+ defer r += 2;
+ }
+b:;
+ r += 5;
+ return r;
+}
+
+int f ()
+{
+ int r = 4;
+ int *p = &r;
+ defer *p = 5;
+ return *p;
+}
+
+int g ()
+{
+ int r = 1;
+ {
+ defer r += 2;
+ if (true)
+ defer r *= 2;
+ r += 10;
+ }
+ return r;
+}
+
+int h ()
+{
+ int r = 1;
+ {
+ defer r += 2;
+ for (int i = 0; i < 5; i++)
+ defer r *= 2;
+ }
+ return r;
+}
+
+int i ()
+{
+ int r = 0;
+ {
+ defer {
+ defer r *= 4;
+ r *= 2;
+ defer {
+ r += 3;
+ }
+ }
+ defer r += 1;
+ }
+
+ return r;
+}
+
+int j ()
+{
+ int r = 0;
+ {
+ defer if (0) r = 5;
+ }
+ return r;
+}
+
+int global = 0;
+
+int k ()
+{
+ global = 5;
+ defer global = 10;
+ return global;
+}
+
+int l ()
+{
+ int r = 5;
+ int j = 2;
+
+ {
+ defer {
+ int j = 10;
+ r *= j;
+ }
+ }
+
+ return r;
+}
+
+int m ()
+{
+ int r = 0;
+
+ void clear(int *value) {
+ *value = 10;
+ }
+
+ {
+ [[gnu::cleanup(clear)]] int j = 1;
+ defer r = j * 2;
+ }
+ return r;
+}
+
+int n ()
+{
+ jmp_buf env;
+ int r = 0;
+
+ if (setjmp(env) != 0)
+ return r;
+
+ defer r = 1;
+
+ {
+ defer r = 2;
+ r++;
+ longjmp(env, 1);
+ }
+}
+
+int o ()
+{
+ int r = 0;
+
+ int foo() {
+ r = 2;
+ defer r *= 2;
+ return r;
+ }
+
+ return foo() + r;
+}
+
+int p (int *arg)
+{
+ *arg = 2;
+ defer *arg *= 2;
+ return *arg;
+}
+
+int q ()
+{
+ int r = 1;
+ {
+b:
+ defer r *= 2;
+ if (r < 10)
+ goto b;
+ }
+
+ return r;
+}
+
+int r ()
+{
+ int r = 1;
+ {
+ defer r *= 2;
+b:
+ if (r < 10)
+ {
+ r++;
+ goto b;
+ }
+ }
+
+ return r;
+}
+
+int
+main ()
+{
+ int arg;
+
+ assert (a () == 5);
+ assert (b () == 5);
+ assert (c () == 7);
+ assert (d () == 7);
+ assert (e () == 5);
+ assert (f () == 4);
+ assert (g () == 14);
+ assert (h () == 34);
+ assert (i () == 20);
+ assert (j () == 0);
+ assert (k () == 5 && global == 10);
+ assert (l () == 50);
+ assert (m () == 2);
+ assert (n () == 1);
+ assert (o () == 6);
+ assert (p (&arg) == 2 && arg == 4);
+ assert (q () == 32);
+ assert (r () == 20);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/defer-2.c b/gcc/testsuite/gcc.dg/defer-2.c
new file mode 100644
index 00000000000..3e07a1b7840
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/defer-2.c
@@ -0,0 +1,78 @@
+/* { dg-do compile } */
+/* { dg-options "-fdefer-kw" } */
+
+#include
+
+void a ()
+{
+ goto b; /* { dg-error "jump over defer block" } */
+ defer;
+b:
+}
+
+void b () {
+ defer {
+ goto b; /* { dg-error "jump out of defer block" } */
+ }
+b:
+}
+
+int c () {
+ defer {
+ return 5; /* { dg-error "return from defer block" } */
+ }
+ return 1;
+}
+
+void d () {
+ defer {
+b:
+ }
+ goto b; /* { dg-error "jump into defer block" } */
+}
+
+void e () {
+ goto b; /* { dg-error "jump over defer block" } */
+ {
+ defer;
+b:
+ }
+}
+
+void f ()
+{
+ goto b; /* { dg-error "jump into defer block" } */
+ defer {
+b:
+ };
+}
+
+void g () {
+ switch (1) {
+ defer;
+ default: /* { dg-error "switch jumps over defer block" } */
+ defer;
+ break;
+ }
+}
+
+void h () {
+ switch (1) {
+ default:
+ defer {
+ break; /* { dg-error "break statement jumps out of defer block" } */
+ }
+ }
+
+ for (;;) {
+ defer {
+ break; /* { dg-error "break statement jumps out of defer block" } */
+ }
+ }
+
+ for (;;) {
+ defer {
+ continue; /* { dg-error "continue statement jumps out of defer block" } */
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/defer-3.c b/gcc/testsuite/gcc.dg/defer-3.c
new file mode 100644
index 00000000000..ea2fff6b761
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/defer-3.c
@@ -0,0 +1,17 @@
+/* { dg-do run } */
+/* { dg-options "" } */
+
+#include
+
+extern void exit(int);
+extern void abort(void);
+
+int main(void) {
+ {
+ defer {
+ exit(0);
+ }
+ }
+ abort();
+ return 1;
+}
diff --git a/gcc/testsuite/gcc.dg/defer-4.c b/gcc/testsuite/gcc.dg/defer-4.c
new file mode 100644
index 00000000000..67dd5d29365
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/defer-4.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+int main(void)
+{
+ _Defer;
+ defer; /* { dg-error "'defer' undeclared" "undeclared identifier" } */
+}
--
2.55.0
From purgeinflame321@gmail.com Sun Nov 1 20:58:42 2026
From: purgeinflame321@gmail.com (Vincent Li)
Date: Sun, 1 Nov 2026 15:58:42 -0500
Subject: [PATCH] jit: Add support for computed gotos and block addresses
In-Reply-To: <0a0b4e486be69a733a4b8e8ab021d036bd0e38b7.camel@redhat.com>
References:
<0a0b4e486be69a733a4b8e8ab021d036bd0e38b7.camel@redhat.com>
Message-ID:
Thanks for the response! I believe I've got everything lined back up
according to your suggestions.
Vincent Li is my legal name used for the DCO sign-off, and Marcus
Valette was just an old display handle on my Gmail account?fixed the
sender header for v2. Sorry for any confusion that may have caused.
--------- >8 ------------------
>From 0eff1430218fb1eb3768500f82a8998c31db7e75 Mon Sep 17 00:00:00 2001
From: Vincent Li
Date: Fri, 23 Oct 2026 13:23:48 -0400
Subject: [PATCH v2] jit: Add support for computed gotos and block addresses
This patch adds `gcc_jit_block_get_address` and
`gcc_jit_block_end_with_indirect_jump`
under ABI version LIBGCCJIT_ABI_39. This exposes GNU C
labels-as-values (`&&label`)
and indirect jumps (`goto *expr;`) in libgccjit, enabling JIT-compiled
interpreter
dispatch loops and state machines to implement direct-threaded code tables.
Tested on x86_64-pc-linux-gnu. All 30 iterations of jit.dg/test-indirect-jump.c
passed across -O0 to -O3. check_GNU_style.py reports 0 errors.
gcc/jit/ChangeLog:
* docs/topics/expressions.rst (gcc_jit_block_get_address): Document.
* docs/topics/functions.rst
(gcc_jit_block_end_with_indirect_jump): Document.
* jit-playback.cc (playback::block::get_address): New method.
(playback::block::add_indirect_jump): New method.
* jit-playback.h (playback::block::get_address): New method.
(playback::block::add_indirect_jump): New method.
* jit-recording.cc (recording::block::get_address): New method.
(recording::block::end_with_indirect_jump): New method.
(recording::get_block_address::replay_into): New method.
(recording::get_block_address::make_debug_string): New method.
(recording::get_block_address::write_reproducer): New method.
(recording::indirect_jump::replay_into): New method.
(recording::indirect_jump::get_successor_blocks): New method.
(recording::indirect_jump::make_debug_string): New method.
(recording::indirect_jump::write_reproducer): New method.
* jit-recording.h (class get_block_address): New class.
(class indirect_jump): New class.
(recording::block::get_address): New method.
(recording::block::end_with_indirect_jump): New method.
* libgccjit.cc (gcc_jit_block_get_address): New entrypoint.
(gcc_jit_block_end_with_indirect_jump): New entrypoint.
* libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_block_get_address): New macro.
(LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump): New macro.
(gcc_jit_block_get_address): New declaration.
(gcc_jit_block_end_with_indirect_jump): New declaration.
* libgccjit.map (LIBGCCJIT_ABI_39): Add gcc_jit_block_get_address and
gcc_jit_block_end_with_indirect_jump.
gcc/testsuite/ChangeLog:
* jit.dg/all-non-failing-tests.h: Include test-indirect-jump.c.
* jit.dg/test-indirect-jump.c: New test.
Signed-off-by: Vincent Li
---
gcc/jit/docs/topics/compatibility.rst | 8 +
gcc/jit/docs/topics/functions.rst | 40 +++++
gcc/jit/jit-playback.cc | 43 +++++
gcc/jit/jit-playback.h | 7 +
gcc/jit/jit-recording.cc | 157 ++++++++++++++++++
gcc/jit/jit-recording.h | 59 ++++++-
gcc/jit/libgccjit.cc | 68 ++++++++
gcc/jit/libgccjit.h | 45 ++++-
gcc/jit/libgccjit.map | 6 +
gcc/testsuite/jit.dg/all-non-failing-tests.h | 10 ++
.../jit.dg/test-error-indirect-jump.c | 112 +++++++++++++
gcc/testsuite/jit.dg/test-indirect-jump.c | 109 ++++++++++++
12 files changed, 661 insertions(+), 3 deletions(-)
create mode 100644 gcc/testsuite/jit.dg/test-error-indirect-jump.c
create mode 100644 gcc/testsuite/jit.dg/test-indirect-jump.c
diff --git a/gcc/jit/docs/topics/compatibility.rst
b/gcc/jit/docs/topics/compatibility.rst
index e4a231e79..ca1a428f3 100644
--- a/gcc/jit/docs/topics/compatibility.rst
+++ b/gcc/jit/docs/topics/compatibility.rst
@@ -489,3 +489,11 @@ information:
``LIBGCCJIT_ABI_38`` covers the addition of
* :func:`gcc_jit_type_is_floating_point`
+
+ .. _LIBGCCJIT_ABI_39:
+
+``LIBGCCJIT_ABI_39``
+-----------------------
+``LIBGCCJIT_ABI_39`` covers the addition of API entrypoints
+ * :func:`gcc_jit_block_get_address`
+ * :func:`gcc_jit_block_end_with_indirect_jump`
diff --git a/gcc/jit/docs/topics/functions.rst
b/gcc/jit/docs/topics/functions.rst
index 66d4b6b2f..67818881d 100644
--- a/gcc/jit/docs/topics/functions.rst
+++ b/gcc/jit/docs/topics/functions.rst
@@ -466,6 +466,46 @@ Statements
goto target;
+.. function:: gcc_jit_rvalue *\
+ gcc_jit_block_get_address (gcc_jit_block *block,\
+ gcc_jit_location *loc)
+
+ Get the address of a block as a ``void *`` rvalue, equivalent to GNU C's
+ ``&&label`` extension.
+
+ ``block`` must be non-NULL.
+
+ This API entrypoint was added in :ref:`LIBGCCJIT_ABI_39`; you can test
+ for its presence using
+
+ .. code-block:: c
+
+ #ifdef LIBGCCJIT_HAVE_gcc_jit_block_get_address
+
+.. function:: void\
+ gcc_jit_block_end_with_indirect_jump (\
+ gcc_jit_block *block,\
+ gcc_jit_location *loc,\
+ gcc_jit_rvalue *target_address,\
+ int num_destinations,\
+ gcc_jit_block **destinations)
+
+ Terminate a basic block by adding an indirect jump to ``target_address``,
+ analogous to GNU C's ``goto *target_address;``.
+
+ Here, ``target_address`` must be a pointer rvalue, and ``destinations``
+ must be an array of ``num_destinations`` candidate target blocks within
+ the same function. Listing the candidate destination blocks is required
+ so that ``libgccjit`` can validate block reachability when checking the
+ function.
+
+ This API entrypoint was added in ``LIBGCCJIT_ABI_39``; you can test for its
+ presence using:
+
+ .. code-block:: c
+
+ #ifdef LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump
+
.. function:: void\
gcc_jit_block_end_with_return (gcc_jit_block *block,\
gcc_jit_location *loc,\
diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc
index 56c9413f8..c4c1ec8fd 100644
--- a/gcc/jit/jit-playback.cc
+++ b/gcc/jit/jit-playback.cc
@@ -2547,6 +2547,49 @@ c_finish_goto_label (location_t loc, tree label)
}
+/* Take the address of a block as a void * rvalue (&&block). */
+
+playback::rvalue *
+playback::block::
+get_address (location *loc)
+{
+ tree label = as_label_decl ();
+ TREE_USED (label) = 1;
+ /* Also set during gimplification by gimplify_addr_expr, but marked
+ explicitly here when constructing the ADDR_EXPR. */
+ FORCED_LABEL (label) = 1;
+
+ tree addr = build1 (ADDR_EXPR, ptr_type_node, label);
+ if (loc)
+ set_tree_location (addr, loc);
+
+ return new rvalue (m_func->m_ctxt, addr);
+}
+
+/* Add an indirect jump statement (goto *target_address;). */
+
+void
+playback::block::add_indirect_jump (location *loc,
+ rvalue *target_address,
+ auto_vec *destinations)
+{
+ unsigned i;
+ block *dest;
+ FOR_EACH_VEC_ELT (*destinations, i, dest)
+ {
+ tree label = dest->as_label_decl ();
+ TREE_USED (label) = 1;
+ FORCED_LABEL (label) = 1;
+ }
+
+ tree target = target_address->as_tree ();
+ target = fold_convert (ptr_type_node, target);
+ tree stmt = build1 (GOTO_EXPR, void_type_node, target);
+ if (loc)
+ set_tree_location (stmt, loc);
+ add_stmt (stmt);
+}
+
/* Add a return statement to the function's statement list. */
void
diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h
index ad3e41f3d..d32ed4d49 100644
--- a/gcc/jit/jit-playback.h
+++ b/gcc/jit/jit-playback.h
@@ -692,6 +692,13 @@ public:
add_jump (location *loc,
block *target);
+ rvalue *get_address (location *loc);
+
+ void
+ add_indirect_jump (location *loc,
+ rvalue *target_address,
+ auto_vec *destinations);
+
void
add_return (location *loc,
rvalue *rvalue);
diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc
index e28e5f67c..337f14925 100644
--- a/gcc/jit/jit-recording.cc
+++ b/gcc/jit/jit-recording.cc
@@ -5072,6 +5072,26 @@ recording::block::end_with_jump
(recording::location *loc,
return result;
}
+/* Create a recording::end_with_indirect_jump instance and add
+ it to the block's context's list of mementos, and to the
+ block's list of statements.
+
+ Implements the heart of gcc_jit_block_end_with_indirect_jump. */
+
+recording::statement *
+recording::block::end_with_indirect_jump (location *loc,
+ rvalue *target_address,
+ int num_destinations,
+ block **destinations)
+{
+ statement *result = new indirect_jump (this, loc, target_address,
+ num_destinations, destinations);
+ m_ctxt->record (result);
+ m_statements.safe_push (result);
+ m_has_been_terminated = true;
+ return result;
+}
+
/* Create a recording::end_with_return instance and add it to
the block's context's list of mementos, and to the block's
list of statements.
@@ -5197,6 +5217,20 @@ recording::block::get_loc () const
return NULL;
}
+/* Create a recording::get_address instance and add it to
+ the block's context's list of mementos, and to the block's
+ list of statements.
+
+ Implements the heart of gcc_jit_block_get_address. */
+
+recording::rvalue *
+recording::block::get_address (location *loc)
+{
+ recording::rvalue *result = new get_block_address (m_ctxt, loc, this);
+ m_ctxt->record (result);
+ return result;
+}
+
/* Get the first statement within a block, if any. */
recording::statement *
@@ -7332,6 +7366,45 @@
recording::get_address_of_lvalue::write_reproducer (reproducer &r)
r.get_identifier (m_loc));
}
+/* The implementation of class gcc::jit::recording::get_block_address. */
+
+/* Implementation of pure virtual hook recording::memento::replay_into
+ for recording::get_block_address. */
+
+void
+recording::get_block_address::replay_into (replayer *r)
+{
+ set_playback_obj (
+ m_block->playback_block ()->
+ get_address (playback_location (r, m_loc)));
+}
+
+/* Implementation of recording::memento::make_debug_string for
+ getting the address of a block. */
+
+recording::string *
+recording::get_block_address::make_debug_string ()
+{
+ return string::from_printf (m_ctxt,
+ "&&%s",
+ m_block->get_debug_string ());
+}
+
+/* Implementation of recording::memento::write_reproducer for
+ get_block_address. */
+
+void
+recording::get_block_address::write_reproducer (reproducer &r)
+{
+ const char *id = r.make_identifier (this, "address_of");
+ r.write (" gcc_jit_rvalue *%s =\n"
+ " gcc_jit_block_get_address (%s,\n"
+ " %s);\n",
+ id,
+ r.get_identifier (m_block),
+ r.get_identifier (m_loc));
+}
+
/* The implementation of class gcc::jit::recording::function_pointer. */
/* Implementation of pure virtual hook recording::memento::replay_into
@@ -7765,6 +7838,90 @@ recording::jump::write_reproducer (reproducer &r)
r.get_identifier (m_target));
}
+/* The implementation of class gcc::jit::recording::indirect_jump. */
+
+/* gcc::jit::recording::indirect_jump's constructor. */
+
+recording::indirect_jump::indirect_jump (block *b,
+ location *loc,
+ rvalue *target_address,
+ int num_destinations,
+ block **destinations)
+: statement (b, loc),
+ m_target_address (target_address)
+{
+ m_destinations.reserve_exact (num_destinations);
+ for (int i = 0; i < num_destinations; i++)
+ m_destinations.quick_push (destinations[i]);
+}
+
+/* Implementation of pure virtual hook recording::memento::replay_into
+ for recording::indirect_jump. */
+
+void
+recording::indirect_jump::replay_into (replayer *r)
+{
+ auto_vec pb_dests;
+ pb_dests.reserve_exact (m_destinations.length ());
+ for (unsigned i = 0; i < m_destinations.length (); i++)
+ pb_dests.quick_push (m_destinations[i]->playback_block ());
+
+ playback_block (get_block ())
+ ->add_indirect_jump (playback_location (r),
+ m_target_address->playback_rvalue (),
+ &pb_dests);
+}
+
+/* Override the poisoned default implementation of
+ gcc::jit::recording::statement::get_successor_blocks. */
+
+vec
+recording::indirect_jump::get_successor_blocks () const
+{
+ vec result;
+ result.create (m_destinations.length ());
+ for (unsigned i = 0; i < m_destinations.length (); i++)
+ result.quick_push (m_destinations[i]);
+ return result;
+}
+
+/* Implementation of recording::memento::make_debug_string for
+ an indirect jump statement. */
+
+recording::string *
+recording::indirect_jump::make_debug_string ()
+{
+ return string::from_printf (m_ctxt,
+ "goto *%s;",
+ m_target_address->get_debug_string_parens
(PRECEDENCE_UNARY));
+}
+
+/* Implementation of recording::memento::write_reproducer for
+ indirect_jump statements. */
+
+void
+recording::indirect_jump::write_reproducer (reproducer &r)
+{
+ r.make_identifier (this, "indirect_jump");
+ const char *dests_id = r.make_tmp_identifier ("destinations_for", this);
+ r.write (" gcc_jit_block *%s[%i] = {\n",
+ dests_id,
+ m_destinations.length ());
+ for (unsigned i = 0; i < m_destinations.length (); i++)
+ r.write (" %s,\n", r.get_identifier (m_destinations[i]));
+ r.write (" };\n");
+ r.write (" gcc_jit_block_end_with_indirect_jump (%s,\n"
+ " %s,\n"
+ " %s,\n"
+ " %i,\n"
+ " %s);\n",
+ r.get_identifier (get_block ()),
+ r.get_identifier (get_loc ()),
+ r.get_identifier_as_rvalue (m_target_address),
+ m_destinations.length (),
+ dests_id);
+}
+
/* The implementation of class gcc::jit::recording::return_. */
/* Implementation of pure virtual hook recording::memento::replay_into
diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h
index 2a5f23a05..952761dca 100644
--- a/gcc/jit/jit-recording.h
+++ b/gcc/jit/jit-recording.h
@@ -966,7 +966,7 @@ public:
type *unqualified () final override { return m_other_type; }
void replay_into (replayer *) final override;
- memento_of_get_aligned *dyn_cast_aligned_type () final override
+ memento_of_get_aligned *dyn_cast_aligned_type () final override
{
return this;
}
@@ -1682,6 +1682,13 @@ public:
end_with_jump (location *loc,
block *target);
+ rvalue * get_address (location *loc);
+
+ statement * end_with_indirect_jump (location *loc,
+ rvalue *target_address,
+ int num_destinations,
+ block **destinations);
+
statement *
end_with_return (location *loc,
rvalue *rvalue);
@@ -2427,6 +2434,34 @@ private:
lvalue *m_lvalue;
};
+class get_block_address : public rvalue
+{
+public:
+ get_block_address (context *ctxt,
+ location *loc,
+ block *b)
+ : rvalue (ctxt, loc, ctxt->get_type (GCC_JIT_TYPE_VOID_PTR)),
+ m_block (b)
+ {
+ set_scope (b->get_function ());
+ }
+
+ void replay_into (replayer *r) final override;
+
+ void visit_children (rvalue_visitor *) final override {}
+
+private:
+ string * make_debug_string () final override;
+ void write_reproducer (reproducer &r) final override;
+ enum precedence get_precedence () const final override
+ {
+ return PRECEDENCE_UNARY;
+ }
+
+private:
+ block *m_block;
+};
+
class function_pointer : public rvalue
{
public:
@@ -2650,6 +2685,28 @@ private:
block *m_target;
};
+class indirect_jump : public statement
+{
+public:
+ indirect_jump (block *b,
+ location *loc,
+ rvalue *target_address,
+ int num_destinations,
+ block **destinations);
+
+ void replay_into (replayer *r) final override;
+
+ vec get_successor_blocks () const final override;
+
+private:
+ string * make_debug_string () final override;
+ void write_reproducer (reproducer &r) final override;
+
+private:
+ rvalue *m_target_address;
+ auto_vec m_destinations;
+};
+
class return_ : public statement
{
public:
diff --git a/gcc/jit/libgccjit.cc b/gcc/jit/libgccjit.cc
index 5a874fc48..42c6fe828 100644
--- a/gcc/jit/libgccjit.cc
+++ b/gcc/jit/libgccjit.cc
@@ -2874,6 +2874,23 @@ gcc_jit_lvalue_get_address (gcc_jit_lvalue *lvalue,
return (gcc_jit_rvalue *)lvalue->get_address (loc);
}
+/* Public entrypoint. See description in libgccjit.h.
+
+ After error-checking, the real work is done by the
+ gcc::jit::recording::block::get_address method in
+ jit-recording.cc. */
+
+gcc_jit_rvalue *
+gcc_jit_block_get_address (gcc_jit_block *block,
+ gcc_jit_location *loc)
+{
+ RETURN_NULL_IF_FAIL (block, NULL, loc, "NULL block");
+ JIT_LOG_FUNC (block->get_context ()->get_logger ());
+ /* LOC can be NULL. */
+
+ return (gcc_jit_rvalue *)block->get_address (loc);
+}
+
/* Public entrypoint. See description in libgccjit.h.
After error-checking, the real work is done by the
@@ -3258,6 +3275,57 @@ gcc_jit_block_end_with_jump (gcc_jit_block *block,
block->end_with_jump (loc, target);
}
+/* Public entrypoint. See description in libgccjit.h.
+
+ After error-checking, the real work is done by the
+ gcc::jit::recording::block::end_with_indirect_jump method in
+ jit-recording.cc. */
+
+void
+gcc_jit_block_end_with_indirect_jump (gcc_jit_block *block,
+ gcc_jit_location *loc,
+ gcc_jit_rvalue *target_address,
+ int num_destinations,
+ gcc_jit_block **destinations)
+{
+ RETURN_IF_NOT_VALID_BLOCK (block, loc);
+ gcc::jit::recording::context *ctxt = block->get_context ();
+ JIT_LOG_FUNC (ctxt->get_logger ());
+ /* LOC can be NULL. */
+ RETURN_IF_FAIL (target_address, ctxt, loc, "NULL target_address");
+ RETURN_IF_FAIL_PRINTF1 (
+ target_address->get_type ()->is_pointer (),
+ ctxt, loc,
+ "target_address: %s is not of a pointer type",
+ target_address->get_debug_string ());
+ RETURN_IF_FAIL (num_destinations >= 0, ctxt, loc, "num_destinations < 0");
+ if (num_destinations > 0)
+ RETURN_IF_FAIL (destinations, ctxt, loc, "NULL destinations");
+
+ for (int i = 0; i < num_destinations; i++)
+ {
+ RETURN_IF_FAIL_PRINTF1 (destinations[i], ctxt, loc,
+ "NULL destination block at index %d", i);
+ RETURN_IF_FAIL_PRINTF4 (
+ block->get_function () == destinations[i]->get_function (),
+ ctxt, loc,
+ "destination block %d (%s) is not in the same function"
+ " (function %s) as source block %s",
+ i,
+ destinations[i]->get_debug_string (),
+ destinations[i]->get_function ()->get_debug_string (),
+ block->get_debug_string ());
+ }
+
+ gcc::jit::recording::statement *stmt =
+ block->end_with_indirect_jump (loc, target_address,
+ num_destinations,
+ (gcc::jit::recording::block **)destinations);
+
+ /* target_address must be valid to use within STMT. */
+ target_address->verify_valid_within_stmt (__func__, stmt);
+}
+
/* Public entrypoint. See description in libgccjit.h.
After error-checking, the real work is done by the
diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h
index 2247c99de..272085986 100644
--- a/gcc/jit/libgccjit.h
+++ b/gcc/jit/libgccjit.h
@@ -1455,16 +1455,31 @@ extern gcc_jit_rvalue *
gcc_jit_lvalue_get_address (gcc_jit_lvalue *lvalue,
gcc_jit_location *loc);
+#define LIBGCCJIT_HAVE_gcc_jit_block_get_address
+
+/* Taking the address of a block; analogous to:
+ &&block
+ in C.
+
+ This API entrypoint was added in LIBGCCJIT_ABI_39; you can test for its
+ presence using
+ #ifdef LIBGCCJIT_HAVE_gcc_jit_block_get_address
+*/
+extern gcc_jit_rvalue *
+gcc_jit_block_get_address (gcc_jit_block *block,
+ gcc_jit_location *loc);
+
#define LIBGCCJIT_HAVE_gcc_jit_lvalue_set_tls_model
/* Set the thread-local storage model of a global variable
This API entrypoint was added in LIBGCCJIT_ABI_17; you can test for its
presence using
- #ifdef LIBGCCJIT_HAVE_gcc_jit_lvalue_set_tls_model */
+ #ifdef LIBGCCJIT_HAVE_gcc_jit_lvalue_set_tls_model
+*/
extern void
gcc_jit_lvalue_set_tls_model (gcc_jit_lvalue *lvalue,
- enum gcc_jit_tls_model model);
+ enum gcc_jit_tls_model model);
#define LIBGCCJIT_HAVE_gcc_jit_lvalue_set_link_section
@@ -1592,6 +1607,32 @@ gcc_jit_block_end_with_jump (gcc_jit_block *block,
gcc_jit_location *loc,
gcc_jit_block *target);
+#define LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump
+
+/* Terminate a block by adding an indirect jump to target_address.
+
+ All possible indirect jump targets must be constrained to a fixed array.
+
+ The candidate destination blocks must be listed in DESTINATIONS
+
+ (of length NUM_DESTINATIONS) so that libgccjit can validate block
+
+ reachability within the function.
+
+ This is roughly equivalent to this C code:
+
+ goto *target_address;
+
+ This API entrypoint was added in LIBGCCJIT_ABI_39; you can test for its
+ presence using
+ #ifdef LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump. */
+extern void
+gcc_jit_block_end_with_indirect_jump (gcc_jit_block *block,
+ gcc_jit_location *loc,
+ gcc_jit_rvalue *target_address,
+ int num_destinations,
+ gcc_jit_block **destinations);
+
/* Terminate a block by adding evaluation of an rvalue, returning the value.
This is roughly equivalent to this C code:
diff --git a/gcc/jit/libgccjit.map b/gcc/jit/libgccjit.map
index 78b6be9ff..9412700a2 100644
--- a/gcc/jit/libgccjit.map
+++ b/gcc/jit/libgccjit.map
@@ -349,3 +349,9 @@ LIBGCCJIT_ABI_38 {
global:
gcc_jit_type_is_floating_point;
} LIBGCCJIT_ABI_37;
+
+LIBGCCJIT_ABI_39 {
+ global:
+ gcc_jit_block_get_address;
+ gcc_jit_block_end_with_indirect_jump;
+} LIBGCCJIT_ABI_38;
diff --git a/gcc/testsuite/jit.dg/all-non-failing-tests.h
b/gcc/testsuite/jit.dg/all-non-failing-tests.h
index e8f8463e8..f8202635e 100644
--- a/gcc/testsuite/jit.dg/all-non-failing-tests.h
+++ b/gcc/testsuite/jit.dg/all-non-failing-tests.h
@@ -269,6 +269,13 @@
#undef create_code
#undef verify_code
+/* test-indirect-jump.c */
+#define create_code create_code_indirect_jump
+#define verify_code verify_code_indirect_jump
+#include "test-indirect-jump.c"
+#undef create_code
+#undef verify_code
+
/* test-link-section-assembler.c: This can't be in the testcases array as it
doesn't have a verify_code implementation. */
@@ -688,6 +695,9 @@ const struct testcase testcases[] = {
{"vector_perm",
create_code_vector_perm,
verify_code_vector_perm},
+ {"indirect_jump",
+ create_code_indirect_jump,
+ verify_code_indirect_jump},
};
const int num_testcases = (sizeof (testcases) / sizeof (testcases[0]));
diff --git a/gcc/testsuite/jit.dg/test-error-indirect-jump.c
b/gcc/testsuite/jit.dg/test-error-indirect-jump.c
new file mode 100644
index 000000000..8f40a3738
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-error-indirect-jump.c
@@ -0,0 +1,112 @@
+#include
+#include
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ /* Let's try to trigger every validation error on
+ gcc_jit_block_get_address and gcc_jit_block_end_with_indirect_jump. */
+ gcc_jit_type *void_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID);
+ gcc_jit_type *int_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
+
+ gcc_jit_function *fn1 =
+ gcc_jit_context_new_function (ctxt, NULL,
+ GCC_JIT_FUNCTION_EXPORTED,
+ void_type,
+ "fn1",
+ 0, NULL,
+ 0);
+ gcc_jit_block *b_fn1 =
+ gcc_jit_function_new_block (fn1, "b_fn1");
+
+ gcc_jit_function *fn2 =
+ gcc_jit_context_new_function (ctxt, NULL,
+ GCC_JIT_FUNCTION_EXPORTED,
+ void_type,
+ "fn2",
+ 0, NULL,
+ 0);
+ gcc_jit_block *b_fn2 =
+ gcc_jit_function_new_block (fn2, "b_fn2");
+
+ /* 1. Non-pointer target_address. */
+ gcc_jit_rvalue * non_ptr =
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 42);
+ gcc_jit_block_end_with_indirect_jump (b_fn1, NULL, non_ptr, 0, NULL);
+ CHECK_STRING_VALUE (
+ gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_block_end_with_indirect_jump:"
+ " target_address: (int)42 is not of a pointer type");
+
+ /* 2. Negative num_destinations. */
+ gcc_jit_rvalue *addr_fn1 = gcc_jit_block_get_address (b_fn1, NULL);
+ gcc_jit_block_end_with_indirect_jump (b_fn1, NULL, addr_fn1, -1, NULL);
+ CHECK_STRING_VALUE (
+ gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_block_end_with_indirect_jump: num_destinations < 0");
+
+ /* 3. NULL destinations array when num_destinations > 0. */
+ gcc_jit_block_end_with_indirect_jump (b_fn1, NULL, addr_fn1, 1, NULL);
+ CHECK_STRING_VALUE (
+ gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_block_end_with_indirect_jump: NULL destinations");
+
+ /* 4. NULL element in destinations array. */
+ gcc_jit_block *null_dests[1] = { NULL };
+ gcc_jit_block_end_with_indirect_jump (b_fn1, NULL, addr_fn1, 1, null_dests);
+ CHECK_STRING_VALUE (
+ gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_block_end_with_indirect_jump:"
+ " NULL destination block at index 0");
+
+ /* 5. Destination block in wrong function. */
+ gcc_jit_block *wrong_fn_dests[1] = { b_fn2 };
+ gcc_jit_block_end_with_indirect_jump (b_fn1, NULL, addr_fn1, 1,
+ wrong_fn_dests);
+ CHECK_STRING_VALUE (
+ gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_block_end_with_indirect_jump:"
+ " destination block 0 (b_fn2) is not in the same function"
+ " (function fn2) as source block b_fn1");
+
+ /* Terminate b_fn1 cleanly so function validation doesn't overwrite
+ last_error with an "unterminated block" error during compile. */
+ gcc_jit_block_end_with_void_return (b_fn1, NULL);
+
+ /* 6. Cross-function block address (addr_fn1 used inside fn2). */
+ gcc_jit_block *fn2_dests[1] = { b_fn2 };
+ gcc_jit_block_end_with_indirect_jump (b_fn2, NULL, addr_fn1, 1,
+ fn2_dests);
+
+ CHECK_STRING_VALUE (
+ gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_block_end_with_indirect_jump:"
+ " rvalue &&b_fn1 (type: void *) has scope limited to function fn1"
+ " but was used within function fn2"
+ " (in statement: goto *&&b_fn1;)");
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+{
+ CHECK_VALUE (result, NULL);
+
+ CHECK_STRING_VALUE (
+ gcc_jit_context_get_first_error (ctxt),
+ "gcc_jit_block_end_with_indirect_jump:"
+ " target_address: (int)42 is not of a pointer type");
+
+ /* Verify that using a block address from fn1 inside fn2 was caught
+ by verify_valid_within_stmt. */
+ CHECK_STRING_VALUE (
+ gcc_jit_context_get_last_error (ctxt),
+ "gcc_jit_block_end_with_indirect_jump:"
+ " rvalue &&b_fn1 (type: void *) has scope limited to function fn1"
+ " but was used within function fn2"
+ " (in statement: goto *&&b_fn1;)");
+}
diff --git a/gcc/testsuite/jit.dg/test-indirect-jump.c
b/gcc/testsuite/jit.dg/test-indirect-jump.c
new file mode 100644
index 000000000..f464a6edb
--- /dev/null
+++ b/gcc/testsuite/jit.dg/test-indirect-jump.c
@@ -0,0 +1,109 @@
+#include
+#include
+
+#include "libgccjit.h"
+#include "harness.h"
+
+void
+create_code (gcc_jit_context *ctxt, void *user_data)
+{
+ /* Let's try to inject the equivalent of:
+ int
+ test_indirect_jump (int idx)
+ {
+ void *targets[3];
+ targets[0] = &&b_zero;
+ targets[1] = &&b_one;
+ targets[2] = &&b_two;
+ goto *targets[idx];
+
+ b_zero:
+ return 10;
+ b_one:
+ return 20;
+ b_two:
+ return 30;
+ }
+ */
+ gcc_jit_type *int_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
+ gcc_jit_type *void_ptr_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID_PTR);
+ gcc_jit_type *array_type =
+ gcc_jit_context_new_array_type (ctxt, NULL, void_ptr_type, 3);
+
+ gcc_jit_param *param_idx =
+ gcc_jit_context_new_param (ctxt, NULL, int_type, "idx");
+ gcc_jit_function *func =
+ gcc_jit_context_new_function (ctxt, NULL,
+ GCC_JIT_FUNCTION_EXPORTED,
+ int_type,
+ "test_indirect_jump",
+ 1, ¶m_idx,
+ 0);
+
+ gcc_jit_block *b_entry = gcc_jit_function_new_block (func, "entry");
+ gcc_jit_block *b_zero = gcc_jit_function_new_block (func, "b_zero");
+ gcc_jit_block *b_one = gcc_jit_function_new_block (func, "b_one");
+ gcc_jit_block *b_two = gcc_jit_function_new_block (func, "b_two");
+
+ gcc_jit_lvalue *targets =
+ gcc_jit_function_new_local (func, NULL, array_type, "targets");
+
+ gcc_jit_block *blocks[3] = { b_zero, b_one, b_two };
+ for (int i = 0; i < 3; i++)
+ {
+ gcc_jit_rvalue *idx_val =
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, i);
+ gcc_jit_lvalue *elem =
+ gcc_jit_context_new_array_access (ctxt, NULL,
+ gcc_jit_lvalue_as_rvalue (targets),
+ idx_val);
+ gcc_jit_rvalue *blk_addr =
+ gcc_jit_block_get_address (blocks[i], NULL);
+ gcc_jit_block_add_assignment (b_entry, NULL, elem, blk_addr);
+ }
+
+ /* void *target_addr = targets[idx]; */
+ gcc_jit_lvalue *selected_elem =
+ gcc_jit_context_new_array_access (ctxt, NULL,
+ gcc_jit_lvalue_as_rvalue (targets),
+ gcc_jit_param_as_rvalue (param_idx));
+
+ /* goto *targets[idx]; */
+ gcc_jit_block_end_with_indirect_jump (
+ b_entry, NULL,
+ gcc_jit_lvalue_as_rvalue (selected_elem),
+ 3, blocks);
+
+ /* b_zero: return 10; */
+ gcc_jit_block_end_with_return (
+ b_zero, NULL,
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 10));
+
+ /* b_one: return 20; */
+ gcc_jit_block_end_with_return (
+ b_one, NULL,
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 20));
+
+ /* b_two: return 30; */
+ gcc_jit_block_end_with_return (
+ b_two, NULL,
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 30));
+}
+
+void
+verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
+
+{
+ typedef int (*fn_type) (int);
+ CHECK_NON_NULL (result);
+
+ fn_type test_indirect_jump =
+ (fn_type)gcc_jit_result_get_code (result, "test_indirect_jump");
+ CHECK_NON_NULL (test_indirect_jump);
+
+ CHECK_VALUE (test_indirect_jump (0), 10);
+ CHECK_VALUE (test_indirect_jump (1), 20);
+ CHECK_VALUE (test_indirect_jump (2), 30);
+}
--
2.56.0
On Sun, Oct 25, 2026 at 7:58?PM David Malcolm wrote:
>
> On Fri, 2026-10-23 at 13:34 -0400, Marcus Valette wrote:
> > From b55719183abf5ff37373115b5929ebd6ca914258 Mon Sep 17 00:00:00
> > 2001
> > From: Vincent Li
> > Date: Fri, 23 Oct 2026 13:23:48 -0400
> > Subject: [PATCH] jit: Add support for computed gotos and block
> > addresses
> >
> > This patch adds `gcc_jit_block_get_address` and
> > `gcc_jit_block_end_with_indirect_jump`
> > under ABI version LIBGCCJIT_ABI_39. This exposes GNU C
> > labels-as-values (`&&label`)
> > and indirect jumps (`goto *expr;`) in libgccjit, enabling JIT-
> > compiled
> > interpreter
> > dispatch loops and state machines to implement direct-threaded code
> > tables.
> >
> > Tested on x86_64-pc-linux-gnu. All 30 iterations of jit.dg/test-
> > indirect-jump.c
> > passed across -O0 to -O3. check_GNU_style.py reports 0 errors.
> >
> > gcc/jit/ChangeLog:
> >
> > * docs/topics/expressions.rst (gcc_jit_block_get_address):
> > Document.
> > * docs/topics/functions.rst
> > (gcc_jit_block_end_with_indirect_jump): Document.
> > * jit-playback.cc (playback::block::get_address): New method.
> > (playback::block::add_indirect_jump): New method.
> > * jit-playback.h (playback::block::get_address): New method.
> > (playback::block::add_indirect_jump): New method.
> > * jit-recording.cc (recording::block::get_address): New method.
> > (recording::block::end_with_indirect_jump): New method.
> > (recording::get_block_address::replay_into): New method.
> > (recording::get_block_address::make_debug_string): New method.
> > (recording::get_block_address::write_reproducer): New method.
> > (recording::indirect_jump::replay_into): New method.
> > (recording::indirect_jump::get_successor_blocks): New method.
> > (recording::indirect_jump::make_debug_string): New method.
> > (recording::indirect_jump::write_reproducer): New method.
> > * jit-recording.h (class get_block_address): New class.
> > (class indirect_jump): New class.
> > (recording::block::get_address): New method.
> > (recording::block::end_with_indirect_jump): New method.
> > * libgccjit.cc (gcc_jit_block_get_address): New entrypoint.
> > (gcc_jit_block_end_with_indirect_jump): New entrypoint.
> > * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_block_get_address): New
> > macro.
> > (LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump): New macro.
> > (gcc_jit_block_get_address): New declaration.
> > (gcc_jit_block_end_with_indirect_jump): New declaration.
> > * libgccjit.map (LIBGCCJIT_ABI_39): Add gcc_jit_block_get_address
> > and
> > gcc_jit_block_end_with_indirect_jump.
> >
> > gcc/testsuite/ChangeLog:
> >
> > * jit.dg/all-non-failing-tests.h: Include test-indirect-jump.c.
> > * jit.dg/test-indirect-jump.c: New test.
> >
> > Signed-off-by: Vincent Li
>
>
> Thanks for the patch. Overall it looks promising, but there are some
> minor issues.
>
> The From: header reads "Marcus Valette" while the patch author and
> Signed-off-by: both read "Vincent Li", albeit at the same gmail
> address. Who wrote this patch? (the DCO sign-off is standing in for
> copyright assignment here).
>
> I looked on https://gcc.sashiko.dev/ and for some reason I'm not seeing
> this patch there (perhaps because it was To: jit@gcc.gnu.org and only
> CC: gcc-patches@gcc.gnu.org ?) Given that, I had Claude code take a
> look at it; please forgive me for taking the liberty of pasting what it
> said verbatim, since its feedback seems correct to me:
>
> (begin quote):
>
> Verdict: good direction, needs a v2. The design follows the existing
> end_with_extended_asm_goto precedent closely, it applies cleanly to
> master, builds warning-free, and the new test passes including the
> reproducer round-trip. But there are two real defects ? one of which is
> an ICE ? plus a documentation claim that is factually wrong.
>
> Verification performed
>
> Applied to master @ 9f6f255b68b, built libgccjit.so, ran jit.exp=test-
> indirect-jump.c: 35 passes, 0 failures. The jit harness auto-generates
> and recompiles a reproducer per test, so write_reproducer is covered.
> ABI 39 is the correct next number ? LIBGCCJIT_ABI_38 is the current tip
> in both libgccjit.map and compatibility.rst.
>
> I did not run test-combination.c / test-threads.c, which pick up the
> new test via all-non-failing-tests.h. Those should be run before
> commit.
>
> Blockers
>
> 1. ICE instead of a clean error: missing verify_valid_within_stmt
>
> gcc_jit_block_end_with_indirect_jump never calls target_address-
> >verify_valid_within_stmt (__func__, stmt). Every other statement
> entrypoint does ? libgccjit.cc:3038, 3082-3083, 3139-3140, 3208, 3297.
>
> Passing a target_address scoped to a different function gives:
>
> internal compiler error: in expand_expr_real_1, at expr.cc:11811
>
> The identical misuse via gcc_jit_block_end_with_return is diagnosed
> properly:
>
> gcc_jit_block_end_with_return: rvalue g1loc (type: int) has scope
> limited to function g1 but was used within function g2 (in statement:
> return g1loc;)
>
> Fix: capture the statement returned by end_with_indirect_jump and call
> verify_valid_within_stmt on it, as the neighbouring entrypoints do.
>
> 2. Cross-function block addresses silently accepted
>
> recording::get_block_address never calls set_scope (b->get_function
> ()), so m_scope stays NULL and the rvalue is treated as a global.
> Taking &&a_lbl in func_a and jumping to it from func_b produces no
> diagnostic at all. Confirmed via DUMP_INITIAL_GIMPLE:
>
> int func_b ()
> {
> b_entry:
> tmp = &a_lbl; /* a_lbl lives in func_a */
> goto tmp;
> ...
> }
>
> GNU C explicitly forbids jumping to a label in a different function.
> Calling set_scope in the constructor ? the same mechanism locals and
> params use ? turns this into a clean API error.
>
> 3. The documented rationale for destinations is wrong
>
> Both libgccjit.h and functions.rst say the array is needed "to allow
> GCC's middle-end to construct valid CFG edges." It isn't. Edges come
> from FORCED_LABEL, which gimplify.cc:20972 sets when the address is
> taken and tree-cfg.cc:1046 wires into abnormal edges for every computed
> goto.
>
> I tested a deliberately incomplete destinations list (two labels in the
> jump table, only one listed) at -O3: both targets still dispatch
> correctly, no diagnostic, correct results.
>
> The parameter is load-bearing ? recording::function::validate walks
> get_successor_blocks for its reachability check, and without it
> legitimate targets get flagged "unreachable block". That is the honest
> justification and what the docs should say. As written, users are told
> the array is a safety requirement when under-listing is silently
> harmless and over-listing just force-marks extra labels.
>
> Should-fix
>
> - compatibility.rst has no LIBGCCJIT_ABI_39 section. Required for
> every ABI bump; also needed so the docs can use
> :ref:LIBGCCJIT_ABI_39instead of the plain ```LIBGCCJIT_ABI_39`` ```
> literal the patch uses. The surrounding entries in expressions.rst use
> the :ref: form.
> - gcc_jit_block_get_address is documented in the wrong section. It
> lands at expressions.rst:806, inside Lvalues (which starts at
> line 778), between gcc_jit_lvalue_get_address and
> gcc_jit_lvalue_set_tls_model. It is neither an lvalue operation nor an
> lvalue method ? it belongs with the block APIs in functions.rst, next
> to the new end_with_indirect_jump.
> - No error-path tests. The new entrypoints add five validation checks
> and none are covered. jit.dg/test-error-*.c is the convention.
> - Three unrelated hunks. Trailing-whitespace removal at jit-
> recording.h:966, and a comment-terminator plus re-indent of
> gcc_jit_lvalue_set_tls_model in libgccjit.h. Drop them or split into a
> separate cleanup patch ? neither is in the ChangeLog.
> - all-non-failing-tests.h ordering. Both the #include block and the
> testcases[] entry are alphabetically sorted; the patch puts the include
> after test-switch.c and the array entry at the very end, rather than
> among the i entries.
>
> Minor
>
> - write_reproducer embeds literal tabs in the strings it emits, so
> generated reproducer files get tab-indented continuation lines.
> extended_asm_goto::write_reproducer uses spaces ? match it.
> - indirect_jump::make_debug_string uses get_debug_string () rather
> than get_debug_string_parens (PRECEDENCE_UNARY), so goto *a + b; will
> render ambiguously.
> - playback::block::add_indirect_jump omits the convert
> (ptr_type_node, expr) that c_finish_goto_ptr performs. Not a
> correctness bug today ? verify_gimple_goto accepts any POINTER_TYPE_P ?
> but normalizing is cheaper than reasoning about named address spaces
> later.
> - The FORCED_LABEL assignment in get_address is redundant with
> gimplify.cc:20972. Harmless; worth a comment if kept.
> - RETURN_IF_FAIL (num_destinations > 0, ...) with message
> "num_destinations <= 0". end_with_extended_asm_goto permits >= 0; and
> the message should describe the problem, not restate the predicate.
>
> (end quote from AI)
>
> Hope this is constructive; thanks again for the patch
> Dave
>
>
>
>
>
>
> > ---
> > gcc/jit/docs/topics/expressions.rst | 14 ++
> > gcc/jit/docs/topics/functions.rst | 21 +++
> > gcc/jit/jit-playback.cc | 39 +++++
> > gcc/jit/jit-playback.h | 7 +
> > gcc/jit/jit-recording.cc | 157
> > +++++++++++++++++++
> > gcc/jit/jit-recording.h | 57 ++++++-
> > gcc/jit/libgccjit.cc | 63 ++++++++
> > gcc/jit/libgccjit.h | 39 ++++-
> > gcc/jit/libgccjit.map | 6 +
> > gcc/testsuite/jit.dg/all-non-failing-tests.h | 10 ++
> > gcc/testsuite/jit.dg/test-indirect-jump.c | 108 +++++++++++++
> > 11 files changed, 518 insertions(+), 3 deletions(-)
> > create mode 100644 gcc/testsuite/jit.dg/test-indirect-jump.c
> >
> > diff --git a/gcc/jit/docs/topics/expressions.rst
> > b/gcc/jit/docs/topics/expressions.rst
> > index 680ea1d86..0f9f705fe 100644
> > --- a/gcc/jit/docs/topics/expressions.rst
> > +++ b/gcc/jit/docs/topics/expressions.rst
> > @@ -806,6 +806,20 @@ where the rvalue is computed by reading from the
> > storage area.
> >
> > in C.
> >
> > +.. function:: gcc_jit_rvalue * \
> > + gcc_jit_block_get_address (gcc_jit_block *block, \
> > + gcc_jit_location *loc)
> > +
> > + Get the address of a basic block as an rvalue of type ``void *``,
> > + analogous to GNU C's ``&&label``.
> > +
> > + This API entrypoint was added in ``LIBGCCJIT_ABI_39``; you can
> > test for its
> > + presence using:
> > +
> > + .. code-block:: c
> > +
> > + #ifdef LIBGCCJIT_HAVE_gcc_jit_block_get_address
> > +
> > .. function:: void\
> > gcc_jit_lvalue_set_tls_model (gcc_jit_lvalue *lvalue,\
> > enum gcc_jit_tls_model
> > model)
> > diff --git a/gcc/jit/docs/topics/functions.rst
> > b/gcc/jit/docs/topics/functions.rst
> > index 66d4b6b2f..1f2eefb1c 100644
> > --- a/gcc/jit/docs/topics/functions.rst
> > +++ b/gcc/jit/docs/topics/functions.rst
> > @@ -466,6 +466,27 @@ Statements
> >
> > goto target;
> >
> > +.. function:: void\
> > + gcc_jit_block_end_with_indirect_jump (\
> > + gcc_jit_block *block,\
> > + gcc_jit_location *loc,\
> > + gcc_jit_rvalue *target_address,\
> > + int num_destinations,\
> > + gcc_jit_block **destinations)
> > +
> > + Terminate a basic block by adding an indirect jump to
> > ``target_address``,
> > + analogous to GNU C's ``goto *target_address;``.
> > +
> > + All possible destination blocks must be listed in the
> > ``destinations``
> > + array to allow GCC's middle-end to construct valid CFG edges.
> > +
> > + This API entrypoint was added in ``LIBGCCJIT_ABI_39``; you can
> > test for its
> > + presence using:
> > +
> > + .. code-block:: c
> > +
> > + #ifdef LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump
> > +
> > .. function:: void\
> > gcc_jit_block_end_with_return (gcc_jit_block *block,\
> > gcc_jit_location *loc,\
> > diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc
> > index 56c9413f8..66a1e8fef 100644
> > --- a/gcc/jit/jit-playback.cc
> > +++ b/gcc/jit/jit-playback.cc
> > @@ -2547,6 +2547,45 @@ c_finish_goto_label (location_t loc, tree
> > label)
> >
> > }
> >
> > +/* Take the address of a block as a void * rvalue (&&block). */
> > +
> > +playback::rvalue *
> > +playback::block::
> > +get_address (location *loc)
> > +{
> > + tree label = as_label_decl ();
> > + TREE_USED (label) = 1;
> > + FORCED_LABEL (label) = 1;
> > +
> > + tree addr = build1 (ADDR_EXPR, ptr_type_node, label);
> > + if (loc)
> > + set_tree_location (addr, loc);
> > +
> > + return new rvalue (m_func->m_ctxt, addr);
> > +}
> > +
> > +/* Add an indirect jump statement (goto *target_address;). */
> > +
> > +void
> > +playback::block::add_indirect_jump (location *loc,
> > + rvalue *target_address,
> > + auto_vec *destinations)
> > +{
> > + unsigned i;
> > + block *dest;
> > + FOR_EACH_VEC_ELT (*destinations, i, dest)
> > + {
> > + tree label = dest->as_label_decl ();
> > + TREE_USED (label) = 1;
> > + FORCED_LABEL (label) = 1;
> > + }
> > +
> > + tree stmt = build1 (GOTO_EXPR, void_type_node, target_address-
> > >as_tree ());
> > + if (loc)
> > + set_tree_location (stmt, loc);
> > + add_stmt (stmt);
> > +}
> > +
> > /* Add a return statement to the function's statement list. */
> >
> > void
> > diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h
> > index ad3e41f3d..d32ed4d49 100644
> > --- a/gcc/jit/jit-playback.h
> > +++ b/gcc/jit/jit-playback.h
> > @@ -692,6 +692,13 @@ public:
> > add_jump (location *loc,
> > block *target);
> >
> > + rvalue *get_address (location *loc);
> > +
> > + void
> > + add_indirect_jump (location *loc,
> > + rvalue *target_address,
> > + auto_vec *destinations);
> > +
> > void
> > add_return (location *loc,
> > rvalue *rvalue);
> > diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc
> > index e28e5f67c..47983e06c 100644
> > --- a/gcc/jit/jit-recording.cc
> > +++ b/gcc/jit/jit-recording.cc
> > @@ -5072,6 +5072,26 @@ recording::block::end_with_jump
> > (recording::location *loc,
> > return result;
> > }
> >
> > +/* Create a recording::end_with_indirect_jump instance and add
> > + it to the block's context's list of mementos, and to the
> > + block's list of statements.
> > +
> > + Implements the heart of gcc_jit_block_end_with_indirect_jump. */
> > +
> > +recording::statement *
> > +recording::block::end_with_indirect_jump (location *loc,
> > + rvalue *target_address,
> > + int num_destinations,
> > + block **destinations)
> > +{
> > + statement *result = new indirect_jump (this, loc, target_address,
> > + num_destinations, destinations);
> > + m_ctxt->record (result);
> > + m_statements.safe_push (result);
> > + m_has_been_terminated = true;
> > + return result;
> > +}
> > +
> > /* Create a recording::end_with_return instance and add it to
> > the block's context's list of mementos, and to the block's
> > list of statements.
> > @@ -5197,6 +5217,20 @@ recording::block::get_loc () const
> > return NULL;
> > }
> >
> > +/* Create a recording::get_address instance and add it to
> > + the block's context's list of mementos, and to the block's
> > + list of statements.
> > +
> > + Implements the heart of gcc_jit_block_get_address. */
> > +
> > +recording::rvalue *
> > +recording::block::get_address (location *loc)
> > +{
> > + recording::rvalue *result = new get_block_address (m_ctxt, loc,
> > this);
> > + m_ctxt->record (result);
> > + return result;
> > +}
> > +
> > /* Get the first statement within a block, if any. */
> >
> > recording::statement *
> > @@ -7332,6 +7366,45 @@
> > recording::get_address_of_lvalue::write_reproducer (reproducer &r)
> > r.get_identifier (m_loc));
> > }
> >
> > +/* The implementation of class
> > gcc::jit::recording::get_block_address. */
> > +
> > +/* Implementation of pure virtual hook
> > recording::memento::replay_into
> > + for recording::get_block_address. */
> > +
> > +void
> > +recording::get_block_address::replay_into (replayer *r)
> > +{
> > + set_playback_obj (
> > + m_block->playback_block ()->
> > + get_address (playback_location (r, m_loc)));
> > +}
> > +
> > +/* Implementation of recording::memento::make_debug_string for
> > + getting the address of a block. */
> > +
> > +recording::string *
> > +recording::get_block_address::make_debug_string ()
> > +{
> > + return string::from_printf (m_ctxt,
> > + "&&%s",
> > + m_block->get_debug_string ());
> > +}
> > +
> > +/* Implementation of recording::memento::write_reproducer for
> > + get_block_address. */
> > +
> > +void
> > +recording::get_block_address::write_reproducer (reproducer &r)
> > +{
> > + const char *id = r.make_identifier (this, "address_of");
> > + r.write (" gcc_jit_rvalue *%s =\n"
> > + " gcc_jit_block_get_address (%s,\n"
> > + " %s);\n",
> > + id,
> > + r.get_identifier (m_block),
> > + r.get_identifier (m_loc));
> > +}
> > +
> > /* The implementation of class
> > gcc::jit::recording::function_pointer. */
> >
> > /* Implementation of pure virtual hook
> > recording::memento::replay_into
> > @@ -7765,6 +7838,90 @@ recording::jump::write_reproducer (reproducer
> > &r)
> > r.get_identifier (m_target));
> > }
> >
> > +/* The implementation of class gcc::jit::recording::indirect_jump.
> > */
> > +
> > +/* gcc::jit::recording::indirect_jump's constructor. */
> > +
> > +recording::indirect_jump::indirect_jump (block *b,
> > + location *loc,
> > + rvalue *target_address,
> > + int num_destinations,
> > + block **destinations)
> > +: statement (b, loc),
> > + m_target_address (target_address)
> > +{
> > + m_destinations.reserve_exact (num_destinations);
> > + for (int i = 0; i < num_destinations; i++)
> > + m_destinations.quick_push (destinations[i]);
> > +}
> > +
> > +/* Implementation of pure virtual hook
> > recording::memento::replay_into
> > + for recording::indirect_jump. */
> > +
> > +void
> > +recording::indirect_jump::replay_into (replayer *r)
> > +{
> > + auto_vec pb_dests;
> > + pb_dests.reserve_exact (m_destinations.length ());
> > + for (unsigned i = 0; i < m_destinations.length (); i++)
> > + pb_dests.quick_push (m_destinations[i]->playback_block ());
> > +
> > + playback_block (get_block ())
> > + ->add_indirect_jump (playback_location (r),
> > + m_target_address->playback_rvalue (),
> > + &pb_dests);
> > +}
> > +
> > +/* Override the poisoned default implementation of
> > + gcc::jit::recording::statement::get_successor_blocks. */
> > +
> > +vec
> > +recording::indirect_jump::get_successor_blocks () const
> > +{
> > + vec result;
> > + result.create (m_destinations.length ());
> > + for (unsigned i = 0; i < m_destinations.length (); i++)
> > + result.quick_push (m_destinations[i]);
> > + return result;
> > +}
> > +
> > +/* Implementation of recording::memento::make_debug_string for
> > + an indirect jump statement. */
> > +
> > +recording::string *
> > +recording::indirect_jump::make_debug_string ()
> > +{
> > + return string::from_printf (m_ctxt,
> > + "goto *%s;",
> > + m_target_address->get_debug_string ());
> > +}
> > +
> > +/* Implementation of recording::memento::write_reproducer for
> > + indirect_jump statements. */
> > +
> > +void
> > +recording::indirect_jump::write_reproducer (reproducer &r)
> > +{
> > + r.make_identifier (this, "indirect_jump");
> > + const char *dests_id = r.make_tmp_identifier ("destinations_for",
> > this);
> > + r.write (" gcc_jit_block *%s[%i] = {\n",
> > + dests_id,
> > + m_destinations.length ());
> > + for (unsigned i = 0; i < m_destinations.length (); i++)
> > + r.write (" %s,\n", r.get_identifier (m_destinations[i]));
> > + r.write (" };\n");
> > + r.write (" gcc_jit_block_end_with_indirect_jump (%s,\n"
> > + " %s,\n"
> > + " %s,\n"
> > + " %i,\n"
> > + " %s);\n",
> > + r.get_identifier (get_block ()),
> > + r.get_identifier (get_loc ()),
> > + r.get_identifier_as_rvalue (m_target_address),
> > + m_destinations.length (),
> > + dests_id);
> > +}
> > +
> > /* The implementation of class gcc::jit::recording::return_. */
> >
> > /* Implementation of pure virtual hook
> > recording::memento::replay_into
> > diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h
> > index 2a5f23a05..c500ea659 100644
> > --- a/gcc/jit/jit-recording.h
> > +++ b/gcc/jit/jit-recording.h
> > @@ -966,7 +966,7 @@ public:
> > type *unqualified () final override { return m_other_type; }
> >
> > void replay_into (replayer *) final override;
> > - memento_of_get_aligned *dyn_cast_aligned_type () final override
> > + memento_of_get_aligned *dyn_cast_aligned_type () final override
> > {
> > return this;
> > }
> > @@ -1682,6 +1682,13 @@ public:
> > end_with_jump (location *loc,
> > block *target);
> >
> > + rvalue * get_address (location *loc);
> > +
> > + statement * end_with_indirect_jump (location *loc,
> > + rvalue *target_address,
> > + int num_destinations,
> > + block **destinations);
> > +
> > statement *
> > end_with_return (location *loc,
> > rvalue *rvalue);
> > @@ -2427,6 +2434,32 @@ private:
> > lvalue *m_lvalue;
> > };
> >
> > +class get_block_address : public rvalue
> > +{
> > +public:
> > + get_block_address (context *ctxt,
> > + location *loc,
> > + block *b)
> > + : rvalue (ctxt, loc, ctxt->get_type (GCC_JIT_TYPE_VOID_PTR)),
> > + m_block (b)
> > + {}
> > +
> > + void replay_into (replayer *r) final override;
> > +
> > + void visit_children (rvalue_visitor *) final override {}
> > +
> > +private:
> > + string * make_debug_string () final override;
> > + void write_reproducer (reproducer &r) final override;
> > + enum precedence get_precedence () const final override
> > + {
> > + return PRECEDENCE_UNARY;
> > + }
> > +
> > +private:
> > + block *m_block;
> > +};
> > +
> > class function_pointer : public rvalue
> > {
> > public:
> > @@ -2650,6 +2683,28 @@ private:
> > block *m_target;
> > };
> >
> > +class indirect_jump : public statement
> > +{
> > +public:
> > + indirect_jump (block *b,
> > + location *loc,
> > + rvalue *target_address,
> > + int num_destinations,
> > + block **destinations);
> > +
> > + void replay_into (replayer *r) final override;
> > +
> > + vec get_successor_blocks () const final override;
> > +
> > +private:
> > + string * make_debug_string () final override;
> > + void write_reproducer (reproducer &r) final override;
> > +
> > +private:
> > + rvalue *m_target_address;
> > + auto_vec m_destinations;
> > +};
> > +
> > class return_ : public statement
> > {
> > public:
> > diff --git a/gcc/jit/libgccjit.cc b/gcc/jit/libgccjit.cc
> > index 5a874fc48..4fac8c56b 100644
> > --- a/gcc/jit/libgccjit.cc
> > +++ b/gcc/jit/libgccjit.cc
> > @@ -2874,6 +2874,23 @@ gcc_jit_lvalue_get_address (gcc_jit_lvalue
> > *lvalue,
> > return (gcc_jit_rvalue *)lvalue->get_address (loc);
> > }
> >
> > +/* Public entrypoint. See description in libgccjit.h.
> > +
> > + After error-checking, the real work is done by the
> > + gcc::jit::recording::block::get_address method in
> > + jit-recording.cc. */
> > +
> > +gcc_jit_rvalue *
> > +gcc_jit_block_get_address (gcc_jit_block *block,
> > + gcc_jit_location *loc)
> > +{
> > + RETURN_NULL_IF_FAIL (block, NULL, loc, "NULL block");
> > + JIT_LOG_FUNC (block->get_context ()->get_logger ());
> > + /* LOC can be NULL. */
> > +
> > + return (gcc_jit_rvalue *)block->get_address (loc);
> > +}
> > +
> > /* Public entrypoint. See description in libgccjit.h.
> >
> > After error-checking, the real work is done by the
> > @@ -3258,6 +3275,52 @@ gcc_jit_block_end_with_jump (gcc_jit_block
> > *block,
> > block->end_with_jump (loc, target);
> > }
> >
> > +/* Public entrypoint. See description in libgccjit.h.
> > +
> > + After error-checking, the real work is done by the
> > + gcc::jit::recording::block::end_with_indirect_jump method in
> > + jit-recording.cc. */
> > +
> > +void
> > +gcc_jit_block_end_with_indirect_jump (gcc_jit_block *block,
> > + gcc_jit_location *loc,
> > + gcc_jit_rvalue *target_address,
> > + int num_destinations,
> > + gcc_jit_block **destinations)
> > +{
> > + RETURN_IF_NOT_VALID_BLOCK (block, loc);
> > + gcc::jit::recording::context *ctxt = block->get_context ();
> > + JIT_LOG_FUNC (ctxt->get_logger ());
> > + /* LOC can be NULL. */
> > + RETURN_IF_FAIL (target_address, ctxt, loc, "NULL target_address");
> > + RETURN_IF_FAIL_PRINTF1 (
> > + target_address->get_type ()->is_pointer (),
> > + ctxt, loc,
> > + "target_address: %s is not of a pointer type",
> > + target_address->get_debug_string ());
> > + RETURN_IF_FAIL (num_destinations > 0, ctxt, loc, "num_destinations
> > <= 0");
> > + RETURN_IF_FAIL (destinations, ctxt, loc, "NULL destinations");
> > +
> > + for (int i = 0; i < num_destinations; i++)
> > + {
> > + RETURN_IF_FAIL_PRINTF1 (destinations[i], ctxt, loc,
> > + "NULL destination block at index %d", i);
> > + RETURN_IF_FAIL_PRINTF4 (
> > + block->get_function () == destinations[i]->get_function (),
> > + ctxt, loc,
> > + "destination block %d (%s) is not in the same function"
> > + " (function %s) as source block %s",
> > + i,
> > + destinations[i]->get_debug_string (),
> > + destinations[i]->get_function ()->get_debug_string (),
> > + block->get_debug_string ());
> > + }
> > +
> > + block->end_with_indirect_jump (loc, target_address,
> > + num_destinations,
> > + (gcc::jit::recording::block **)destinations);
> > +}
> > +
> > /* Public entrypoint. See description in libgccjit.h.
> >
> > After error-checking, the real work is done by the
> > diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h
> > index 2247c99de..9d00ba33a 100644
> > --- a/gcc/jit/libgccjit.h
> > +++ b/gcc/jit/libgccjit.h
> > @@ -1455,16 +1455,31 @@ extern gcc_jit_rvalue *
> > gcc_jit_lvalue_get_address (gcc_jit_lvalue *lvalue,
> > gcc_jit_location *loc);
> >
> > +#define LIBGCCJIT_HAVE_gcc_jit_block_get_address
> > +
> > +/* Taking the address of a block; analogous to:
> > + &&block
> > + in C.
> > +
> > + This API entrypoint was added in LIBGCCJIT_ABI_39; you can test
> > for its
> > + presence using
> > + #ifdef LIBGCCJIT_HAVE_gcc_jit_block_get_address
> > +*/
> > +extern gcc_jit_rvalue *
> > +gcc_jit_block_get_address (gcc_jit_block *block,
> > + gcc_jit_location *loc);
> > +
> > #define LIBGCCJIT_HAVE_gcc_jit_lvalue_set_tls_model
> >
> > /* Set the thread-local storage model of a global variable
> >
> > This API entrypoint was added in LIBGCCJIT_ABI_17; you can test
> > for its
> > presence using
> > - #ifdef LIBGCCJIT_HAVE_gcc_jit_lvalue_set_tls_model */
> > + #ifdef LIBGCCJIT_HAVE_gcc_jit_lvalue_set_tls_model
> > +*/
> > extern void
> > gcc_jit_lvalue_set_tls_model (gcc_jit_lvalue *lvalue,
> > - enum gcc_jit_tls_model model);
> > + enum gcc_jit_tls_model model);
> >
> > #define LIBGCCJIT_HAVE_gcc_jit_lvalue_set_link_section
> >
> > @@ -1592,6 +1607,26 @@ gcc_jit_block_end_with_jump (gcc_jit_block
> > *block,
> > gcc_jit_location *loc,
> > gcc_jit_block *target);
> >
> > +#define LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump
> > +
> > +/* Terminate a block by adding an indirect jump to target_address.
> > +
> > + All possible indirect jump targets must be constrained to a fixed
> > array.
> > +
> > + This is roughly equivalent to this C code:
> > +
> > + goto *target_address;
> > +
> > + This API entrypoint was added in LIBGCCJIT_ABI_39; you can test
> > for its
> > + presence using
> > + #ifdef LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump.
> > */
> > +extern void
> > +gcc_jit_block_end_with_indirect_jump (gcc_jit_block *block,
> > + gcc_jit_location *loc,
> > + gcc_jit_rvalue *target_address,
> > + int num_destinations,
> > + gcc_jit_block **destinations);
> > +
> > /* Terminate a block by adding evaluation of an rvalue, returning
> > the value.
> >
> > This is roughly equivalent to this C code:
> > diff --git a/gcc/jit/libgccjit.map b/gcc/jit/libgccjit.map
> > index 78b6be9ff..9412700a2 100644
> > --- a/gcc/jit/libgccjit.map
> > +++ b/gcc/jit/libgccjit.map
> > @@ -349,3 +349,9 @@ LIBGCCJIT_ABI_38 {
> > global:
> > gcc_jit_type_is_floating_point;
> > } LIBGCCJIT_ABI_37;
> > +
> > +LIBGCCJIT_ABI_39 {
> > + global:
> > + gcc_jit_block_get_address;
> > + gcc_jit_block_end_with_indirect_jump;
> > +} LIBGCCJIT_ABI_38;
> > diff --git a/gcc/testsuite/jit.dg/all-non-failing-tests.h
> > b/gcc/testsuite/jit.dg/all-non-failing-tests.h
> > index e8f8463e8..5bf18a874 100644
> > --- a/gcc/testsuite/jit.dg/all-non-failing-tests.h
> > +++ b/gcc/testsuite/jit.dg/all-non-failing-tests.h
> > @@ -448,6 +448,13 @@
> > #undef create_code
> > #undef verify_code
> >
> > +/* test-indirect-jump.c */
> > +#define create_code create_code_indirect_jump
> > +#define verify_code verify_code_indirect_jump
> > +#include "test-indirect-jump.c"
> > +#undef create_code
> > +#undef verify_code
> > +
> > /* test-target-info.c: This can't be in the testcases array as it
> > is target-specific. */
> >
> > @@ -688,6 +695,9 @@ const struct testcase testcases[] = {
> > {"vector_perm",
> > create_code_vector_perm,
> > verify_code_vector_perm},
> > + {"indirect_jump",
> > + create_code_indirect_jump,
> > + verify_code_indirect_jump},
> > };
> >
> > const int num_testcases = (sizeof (testcases) / sizeof
> > (testcases[0]));
> > diff --git a/gcc/testsuite/jit.dg/test-indirect-jump.c
> > b/gcc/testsuite/jit.dg/test-indirect-jump.c
> > new file mode 100644
> > index 000000000..3d407f7ea
> > --- /dev/null
> > +++ b/gcc/testsuite/jit.dg/test-indirect-jump.c
> > @@ -0,0 +1,108 @@
> > +#include
> > +#include
> > +
> > +#include "libgccjit.h"
> > +#include "harness.h"
> > +
> > +void
> > +create_code (gcc_jit_context *ctxt, void *user_data)
> > +{
> > + /* Let's try to inject the equivalent of:
> > + int
> > + test_indirect_jump (int idx)
> > + {
> > + void *targets[3];
> > + targets[0] = &&b_zero;
> > + targets[1] = &&b_one;
> > + targets[2] = &&b_two;
> > + goto *targets[idx];
> > +
> > + b_zero:
> > + return 10;
> > + b_one:
> > + return 20;
> > + b_two:
> > + return 30;
> > + }
> > + */
> > + gcc_jit_type *int_type =
> > + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
> > + gcc_jit_type *void_ptr_type =
> > + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID_PTR);
> > + gcc_jit_type *array_type =
> > + gcc_jit_context_new_array_type (ctxt, NULL, void_ptr_type, 3);
> > +
> > + gcc_jit_param *param_idx =
> > + gcc_jit_context_new_param (ctxt, NULL, int_type, "idx");
> > + gcc_jit_function *func =
> > + gcc_jit_context_new_function (ctxt, NULL,
> > + GCC_JIT_FUNCTION_EXPORTED,
> > + int_type,
> > + "test_indirect_jump",
> > + 1, ¶m_idx,
> > + 0);
> > +
> > + gcc_jit_block *b_entry = gcc_jit_function_new_block (func,
> > "entry");
> > + gcc_jit_block *b_zero = gcc_jit_function_new_block (func,
> > "b_zero");
> > + gcc_jit_block *b_one = gcc_jit_function_new_block (func, "b_one");
> > + gcc_jit_block *b_two = gcc_jit_function_new_block (func, "b_two");
> > +
> > + gcc_jit_lvalue *targets =
> > + gcc_jit_function_new_local (func, NULL, array_type, "targets");
> > +
> > + gcc_jit_block *blocks[3] = { b_zero, b_one, b_two };
> > + for (int i = 0; i < 3; i++)
> > + {
> > + gcc_jit_rvalue *idx_val =
> > + gcc_jit_context_new_rvalue_from_int (ctxt, int_type, i);
> > + gcc_jit_lvalue *elem =
> > + gcc_jit_context_new_array_access (ctxt, NULL,
> > + gcc_jit_lvalue_as_rvalue (targets),
> > + idx_val);
> > + gcc_jit_rvalue *blk_addr =
> > + gcc_jit_block_get_address (blocks[i], NULL);
> > + gcc_jit_block_add_assignment (b_entry, NULL, elem, blk_addr);
> > + }
> > +
> > + /* void *target_addr = targets[idx]; */
> > + gcc_jit_lvalue *selected_elem =
> > + gcc_jit_context_new_array_access (ctxt, NULL,
> > + gcc_jit_lvalue_as_rvalue (targets),
> > + gcc_jit_param_as_rvalue (param_idx));
> > +
> > + /* goto *targets[idx]; */
> > + gcc_jit_block_end_with_indirect_jump (
> > + b_entry, NULL,
> > + gcc_jit_lvalue_as_rvalue (selected_elem),
> > + 3, blocks);
> > +
> > + /* b_zero: return 10; */
> > + gcc_jit_block_end_with_return (
> > + b_zero, NULL,
> > + gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 10));
> > +
> > + /* b_one: return 20; */
> > + gcc_jit_block_end_with_return (
> > + b_one, NULL,
> > + gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 20));
> > +
> > + /* b_two: return 30; */
> > + gcc_jit_block_end_with_return (
> > + b_two, NULL,
> > + gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 30));
> > +}
> > +
> > +void
> > +verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
> > +{
> > + typedef int (*fn_type) (int);
> > + CHECK_NON_NULL (result);
> > +
> > + fn_type test_indirect_jump =
> > + (fn_type)gcc_jit_result_get_code (result, "test_indirect_jump");
> > + CHECK_NON_NULL (test_indirect_jump);
> > +
> > + CHECK_VALUE (test_indirect_jump (0), 10);
> > + CHECK_VALUE (test_indirect_jump (1), 20);
> > + CHECK_VALUE (test_indirect_jump (2), 30);
> > +}
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-PATCH-jit-Add-support-for-computed-gotos-and-bloc.patch
Type: text/x-patch
Size: 29981 bytes
Desc: not available
URL:
From morin-mikael@orange.fr Sun Nov 1 21:15:07 2026
From: morin-mikael@orange.fr (Mikael Morin)
Date: Sun, 1 Nov 2026 22:15:07 +0100
Subject: [PATCH 1/2] libgfortran: [PR127751] caf_shmem: catch overflowing
coarray sizes
In-Reply-To: <07769c2d-e878-48b9-89e0-a7959174ae9a@gmail.com>
References: <07769c2d-e878-48b9-89e0-a7959174ae9a@gmail.com>
Message-ID:
Le 30/10/2026 ? 13:56, Jerry DeLisle a ?crit?:
> See attached patch. This is 1 of 2 to fix some loose ends in this effort.
>
> Fairly self explanatory.
>
> Regression tested on x86_64
>
> OK for mainline?
This is mostly good; two cosmetic points below.
>
> Regards,
>
> Jerry
> diff --git a/libgfortran/caf/shmem.c b/libgfortran/caf/shmem.c
> index 964c7449e02..88b800e5247 100644
> --- a/libgfortran/caf/shmem.c
> +++ b/libgfortran/caf/shmem.c
> @@ -266,7 +274,8 @@ _gfortran_caf_register (size_t size, caf_register_t type, caf_token_t *token,
> if (type != CAF_REGTYPE_COARRAY_ALLOC_ALLOCATE_ONLY)
> *token = malloc (sizeof (struct caf_shmem_token));
>
> - size = alignto (size, sizeof (ptrdiff_t));
> + size = size > SIZE_MAX - sizeof (ptrdiff_t)
> + ? SIZE_MAX : alignto (size, sizeof (ptrdiff_t));
Can you put a comment somewhere telling that saturating to SIZE_MAX will
end up being caught by the allocation code, resulting in a failed
allocation? You mention it in the commit message, but it remains
somehow implicit in the code itself.
> switch (type)
> {
> case CAF_REGTYPE_LOCK_STATIC:
> @@ -309,7 +319,8 @@ _gfortran_caf_register (size_t size, caf_register_t type, caf_token_t *token,
>
> allocator_lock (&local->ai.alloc);
> mem = alloc_get_memory_by_id_created (
> - &local->ai, size * local->total_num_images, next_memid, &created);
> + &local->ai, mul_size_sat (size, local->total_num_images), next_memid,
> + &created);
Please use a variable for the multiplication result, here...
> if (created)
> memset (mem, 0, size * local->total_num_images);
... and here, so that it remains apparent that we are clearing the same
amount as allocated.
> allocator_unlock (&local->ai.alloc);
OK with these changes.
From purgeinflame321@gmail.com Sun Nov 1 21:23:29 2026
From: purgeinflame321@gmail.com (Vincent Li)
Date: Sun, 1 Nov 2026 16:23:29 -0500
Subject: [PATCH] jit: Add support for computed gotos and block addresses
In-Reply-To:
References:
<0a0b4e486be69a733a4b8e8ab021d036bd0e38b7.camel@redhat.com>
Message-ID:
Reattaching file due to previous patch merge issues. Please alert me
if anything happens again.
On Sun, Nov 1, 2026 at 3:58?PM Vincent Li wrote:
>
> Thanks for the response! I believe I've got everything lined back up
> according to your suggestions.
>
> Vincent Li is my legal name used for the DCO sign-off, and Marcus
> Valette was just an old display handle on my Gmail account?fixed the
> sender header for v2. Sorry for any confusion that may have caused.
>
> --------- >8 ------------------
>
> From 0eff1430218fb1eb3768500f82a8998c31db7e75 Mon Sep 17 00:00:00 2001
> From: Vincent Li
> Date: Fri, 23 Oct 2026 13:23:48 -0400
> Subject: [PATCH v2] jit: Add support for computed gotos and block addresses
>
> This patch adds `gcc_jit_block_get_address` and
> `gcc_jit_block_end_with_indirect_jump`
> under ABI version LIBGCCJIT_ABI_39. This exposes GNU C
> labels-as-values (`&&label`)
> and indirect jumps (`goto *expr;`) in libgccjit, enabling JIT-compiled
> interpreter
> dispatch loops and state machines to implement direct-threaded code tables.
>
> Tested on x86_64-pc-linux-gnu. All 30 iterations of jit.dg/test-indirect-jump.c
> passed across -O0 to -O3. check_GNU_style.py reports 0 errors.
>
> gcc/jit/ChangeLog:
>
> * docs/topics/expressions.rst (gcc_jit_block_get_address): Document.
> * docs/topics/functions.rst
> (gcc_jit_block_end_with_indirect_jump): Document.
> * jit-playback.cc (playback::block::get_address): New method.
> (playback::block::add_indirect_jump): New method.
> * jit-playback.h (playback::block::get_address): New method.
> (playback::block::add_indirect_jump): New method.
> * jit-recording.cc (recording::block::get_address): New method.
> (recording::block::end_with_indirect_jump): New method.
> (recording::get_block_address::replay_into): New method.
> (recording::get_block_address::make_debug_string): New method.
> (recording::get_block_address::write_reproducer): New method.
> (recording::indirect_jump::replay_into): New method.
> (recording::indirect_jump::get_successor_blocks): New method.
> (recording::indirect_jump::make_debug_string): New method.
> (recording::indirect_jump::write_reproducer): New method.
> * jit-recording.h (class get_block_address): New class.
> (class indirect_jump): New class.
> (recording::block::get_address): New method.
> (recording::block::end_with_indirect_jump): New method.
> * libgccjit.cc (gcc_jit_block_get_address): New entrypoint.
> (gcc_jit_block_end_with_indirect_jump): New entrypoint.
> * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_block_get_address): New macro.
> (LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump): New macro.
> (gcc_jit_block_get_address): New declaration.
> (gcc_jit_block_end_with_indirect_jump): New declaration.
> * libgccjit.map (LIBGCCJIT_ABI_39): Add gcc_jit_block_get_address and
> gcc_jit_block_end_with_indirect_jump.
>
> gcc/testsuite/ChangeLog:
>
> * jit.dg/all-non-failing-tests.h: Include test-indirect-jump.c.
> * jit.dg/test-indirect-jump.c: New test.
>
> Signed-off-by: Vincent Li
> ---
> gcc/jit/docs/topics/compatibility.rst | 8 +
> gcc/jit/docs/topics/functions.rst | 40 +++++
> gcc/jit/jit-playback.cc | 43 +++++
> gcc/jit/jit-playback.h | 7 +
> gcc/jit/jit-recording.cc | 157 ++++++++++++++++++
> gcc/jit/jit-recording.h | 59 ++++++-
> gcc/jit/libgccjit.cc | 68 ++++++++
> gcc/jit/libgccjit.h | 45 ++++-
> gcc/jit/libgccjit.map | 6 +
> gcc/testsuite/jit.dg/all-non-failing-tests.h | 10 ++
> .../jit.dg/test-error-indirect-jump.c | 112 +++++++++++++
> gcc/testsuite/jit.dg/test-indirect-jump.c | 109 ++++++++++++
> 12 files changed, 661 insertions(+), 3 deletions(-)
> create mode 100644 gcc/testsuite/jit.dg/test-error-indirect-jump.c
> create mode 100644 gcc/testsuite/jit.dg/test-indirect-jump.c
>
> diff --git a/gcc/jit/docs/topics/compatibility.rst
> b/gcc/jit/docs/topics/compatibility.rst
> index e4a231e79..ca1a428f3 100644
> --- a/gcc/jit/docs/topics/compatibility.rst
> +++ b/gcc/jit/docs/topics/compatibility.rst
> @@ -489,3 +489,11 @@ information:
> ``LIBGCCJIT_ABI_38`` covers the addition of
>
> * :func:`gcc_jit_type_is_floating_point`
> +
> + .. _LIBGCCJIT_ABI_39:
> +
> +``LIBGCCJIT_ABI_39``
> +-----------------------
> +``LIBGCCJIT_ABI_39`` covers the addition of API entrypoints
> + * :func:`gcc_jit_block_get_address`
> + * :func:`gcc_jit_block_end_with_indirect_jump`
> diff --git a/gcc/jit/docs/topics/functions.rst
> b/gcc/jit/docs/topics/functions.rst
> index 66d4b6b2f..67818881d 100644
> --- a/gcc/jit/docs/topics/functions.rst
> +++ b/gcc/jit/docs/topics/functions.rst
> @@ -466,6 +466,46 @@ Statements
>
> goto target;
>
> +.. function:: gcc_jit_rvalue *\
> + gcc_jit_block_get_address (gcc_jit_block *block,\
> + gcc_jit_location *loc)
> +
> + Get the address of a block as a ``void *`` rvalue, equivalent to GNU C's
> + ``&&label`` extension.
> +
> + ``block`` must be non-NULL.
> +
> + This API entrypoint was added in :ref:`LIBGCCJIT_ABI_39`; you can test
> + for its presence using
> +
> + .. code-block:: c
> +
> + #ifdef LIBGCCJIT_HAVE_gcc_jit_block_get_address
> +
> +.. function:: void\
> + gcc_jit_block_end_with_indirect_jump (\
> + gcc_jit_block *block,\
> + gcc_jit_location *loc,\
> + gcc_jit_rvalue *target_address,\
> + int num_destinations,\
> + gcc_jit_block **destinations)
> +
> + Terminate a basic block by adding an indirect jump to ``target_address``,
> + analogous to GNU C's ``goto *target_address;``.
> +
> + Here, ``target_address`` must be a pointer rvalue, and ``destinations``
> + must be an array of ``num_destinations`` candidate target blocks within
> + the same function. Listing the candidate destination blocks is required
> + so that ``libgccjit`` can validate block reachability when checking the
> + function.
> +
> + This API entrypoint was added in ``LIBGCCJIT_ABI_39``; you can test for its
> + presence using:
> +
> + .. code-block:: c
> +
> + #ifdef LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump
> +
> .. function:: void\
> gcc_jit_block_end_with_return (gcc_jit_block *block,\
> gcc_jit_location *loc,\
> diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc
> index 56c9413f8..c4c1ec8fd 100644
> --- a/gcc/jit/jit-playback.cc
> +++ b/gcc/jit/jit-playback.cc
> @@ -2547,6 +2547,49 @@ c_finish_goto_label (location_t loc, tree label)
>
> }
>
> +/* Take the address of a block as a void * rvalue (&&block). */
> +
> +playback::rvalue *
> +playback::block::
> +get_address (location *loc)
> +{
> + tree label = as_label_decl ();
> + TREE_USED (label) = 1;
> + /* Also set during gimplification by gimplify_addr_expr, but marked
> + explicitly here when constructing the ADDR_EXPR. */
> + FORCED_LABEL (label) = 1;
> +
> + tree addr = build1 (ADDR_EXPR, ptr_type_node, label);
> + if (loc)
> + set_tree_location (addr, loc);
> +
> + return new rvalue (m_func->m_ctxt, addr);
> +}
> +
> +/* Add an indirect jump statement (goto *target_address;). */
> +
> +void
> +playback::block::add_indirect_jump (location *loc,
> + rvalue *target_address,
> + auto_vec *destinations)
> +{
> + unsigned i;
> + block *dest;
> + FOR_EACH_VEC_ELT (*destinations, i, dest)
> + {
> + tree label = dest->as_label_decl ();
> + TREE_USED (label) = 1;
> + FORCED_LABEL (label) = 1;
> + }
> +
> + tree target = target_address->as_tree ();
> + target = fold_convert (ptr_type_node, target);
> + tree stmt = build1 (GOTO_EXPR, void_type_node, target);
> + if (loc)
> + set_tree_location (stmt, loc);
> + add_stmt (stmt);
> +}
> +
> /* Add a return statement to the function's statement list. */
>
> void
> diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h
> index ad3e41f3d..d32ed4d49 100644
> --- a/gcc/jit/jit-playback.h
> +++ b/gcc/jit/jit-playback.h
> @@ -692,6 +692,13 @@ public:
> add_jump (location *loc,
> block *target);
>
> + rvalue *get_address (location *loc);
> +
> + void
> + add_indirect_jump (location *loc,
> + rvalue *target_address,
> + auto_vec *destinations);
> +
> void
> add_return (location *loc,
> rvalue *rvalue);
> diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc
> index e28e5f67c..337f14925 100644
> --- a/gcc/jit/jit-recording.cc
> +++ b/gcc/jit/jit-recording.cc
> @@ -5072,6 +5072,26 @@ recording::block::end_with_jump
> (recording::location *loc,
> return result;
> }
>
> +/* Create a recording::end_with_indirect_jump instance and add
> + it to the block's context's list of mementos, and to the
> + block's list of statements.
> +
> + Implements the heart of gcc_jit_block_end_with_indirect_jump. */
> +
> +recording::statement *
> +recording::block::end_with_indirect_jump (location *loc,
> + rvalue *target_address,
> + int num_destinations,
> + block **destinations)
> +{
> + statement *result = new indirect_jump (this, loc, target_address,
> + num_destinations, destinations);
> + m_ctxt->record (result);
> + m_statements.safe_push (result);
> + m_has_been_terminated = true;
> + return result;
> +}
> +
> /* Create a recording::end_with_return instance and add it to
> the block's context's list of mementos, and to the block's
> list of statements.
> @@ -5197,6 +5217,20 @@ recording::block::get_loc () const
> return NULL;
> }
>
> +/* Create a recording::get_address instance and add it to
> + the block's context's list of mementos, and to the block's
> + list of statements.
> +
> + Implements the heart of gcc_jit_block_get_address. */
> +
> +recording::rvalue *
> +recording::block::get_address (location *loc)
> +{
> + recording::rvalue *result = new get_block_address (m_ctxt, loc, this);
> + m_ctxt->record (result);
> + return result;
> +}
> +
> /* Get the first statement within a block, if any. */
>
> recording::statement *
> @@ -7332,6 +7366,45 @@
> recording::get_address_of_lvalue::write_reproducer (reproducer &r)
> r.get_identifier (m_loc));
> }
>
> +/* The implementation of class gcc::jit::recording::get_block_address. */
> +
> +/* Implementation of pure virtual hook recording::memento::replay_into
> + for recording::get_block_address. */
> +
> +void
> +recording::get_block_address::replay_into (replayer *r)
> +{
> + set_playback_obj (
> + m_block->playback_block ()->
> + get_address (playback_location (r, m_loc)));
> +}
> +
> +/* Implementation of recording::memento::make_debug_string for
> + getting the address of a block. */
> +
> +recording::string *
> +recording::get_block_address::make_debug_string ()
> +{
> + return string::from_printf (m_ctxt,
> + "&&%s",
> + m_block->get_debug_string ());
> +}
> +
> +/* Implementation of recording::memento::write_reproducer for
> + get_block_address. */
> +
> +void
> +recording::get_block_address::write_reproducer (reproducer &r)
> +{
> + const char *id = r.make_identifier (this, "address_of");
> + r.write (" gcc_jit_rvalue *%s =\n"
> + " gcc_jit_block_get_address (%s,\n"
> + " %s);\n",
> + id,
> + r.get_identifier (m_block),
> + r.get_identifier (m_loc));
> +}
> +
> /* The implementation of class gcc::jit::recording::function_pointer. */
>
> /* Implementation of pure virtual hook recording::memento::replay_into
> @@ -7765,6 +7838,90 @@ recording::jump::write_reproducer (reproducer &r)
> r.get_identifier (m_target));
> }
>
> +/* The implementation of class gcc::jit::recording::indirect_jump. */
> +
> +/* gcc::jit::recording::indirect_jump's constructor. */
> +
> +recording::indirect_jump::indirect_jump (block *b,
> + location *loc,
> + rvalue *target_address,
> + int num_destinations,
> + block **destinations)
> +: statement (b, loc),
> + m_target_address (target_address)
> +{
> + m_destinations.reserve_exact (num_destinations);
> + for (int i = 0; i < num_destinations; i++)
> + m_destinations.quick_push (destinations[i]);
> +}
> +
> +/* Implementation of pure virtual hook recording::memento::replay_into
> + for recording::indirect_jump. */
> +
> +void
> +recording::indirect_jump::replay_into (replayer *r)
> +{
> + auto_vec pb_dests;
> + pb_dests.reserve_exact (m_destinations.length ());
> + for (unsigned i = 0; i < m_destinations.length (); i++)
> + pb_dests.quick_push (m_destinations[i]->playback_block ());
> +
> + playback_block (get_block ())
> + ->add_indirect_jump (playback_location (r),
> + m_target_address->playback_rvalue (),
> + &pb_dests);
> +}
> +
> +/* Override the poisoned default implementation of
> + gcc::jit::recording::statement::get_successor_blocks. */
> +
> +vec
> +recording::indirect_jump::get_successor_blocks () const
> +{
> + vec result;
> + result.create (m_destinations.length ());
> + for (unsigned i = 0; i < m_destinations.length (); i++)
> + result.quick_push (m_destinations[i]);
> + return result;
> +}
> +
> +/* Implementation of recording::memento::make_debug_string for
> + an indirect jump statement. */
> +
> +recording::string *
> +recording::indirect_jump::make_debug_string ()
> +{
> + return string::from_printf (m_ctxt,
> + "goto *%s;",
> + m_target_address->get_debug_string_parens
> (PRECEDENCE_UNARY));
> +}
> +
> +/* Implementation of recording::memento::write_reproducer for
> + indirect_jump statements. */
> +
> +void
> +recording::indirect_jump::write_reproducer (reproducer &r)
> +{
> + r.make_identifier (this, "indirect_jump");
> + const char *dests_id = r.make_tmp_identifier ("destinations_for", this);
> + r.write (" gcc_jit_block *%s[%i] = {\n",
> + dests_id,
> + m_destinations.length ());
> + for (unsigned i = 0; i < m_destinations.length (); i++)
> + r.write (" %s,\n", r.get_identifier (m_destinations[i]));
> + r.write (" };\n");
> + r.write (" gcc_jit_block_end_with_indirect_jump (%s,\n"
> + " %s,\n"
> + " %s,\n"
> + " %i,\n"
> + " %s);\n",
> + r.get_identifier (get_block ()),
> + r.get_identifier (get_loc ()),
> + r.get_identifier_as_rvalue (m_target_address),
> + m_destinations.length (),
> + dests_id);
> +}
> +
> /* The implementation of class gcc::jit::recording::return_. */
>
> /* Implementation of pure virtual hook recording::memento::replay_into
> diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h
> index 2a5f23a05..952761dca 100644
> --- a/gcc/jit/jit-recording.h
> +++ b/gcc/jit/jit-recording.h
> @@ -966,7 +966,7 @@ public:
> type *unqualified () final override { return m_other_type; }
>
> void replay_into (replayer *) final override;
> - memento_of_get_aligned *dyn_cast_aligned_type () final override
> + memento_of_get_aligned *dyn_cast_aligned_type () final override
> {
> return this;
> }
> @@ -1682,6 +1682,13 @@ public:
> end_with_jump (location *loc,
> block *target);
>
> + rvalue * get_address (location *loc);
> +
> + statement * end_with_indirect_jump (location *loc,
> + rvalue *target_address,
> + int num_destinations,
> + block **destinations);
> +
> statement *
> end_with_return (location *loc,
> rvalue *rvalue);
> @@ -2427,6 +2434,34 @@ private:
> lvalue *m_lvalue;
> };
>
> +class get_block_address : public rvalue
> +{
> +public:
> + get_block_address (context *ctxt,
> + location *loc,
> + block *b)
> + : rvalue (ctxt, loc, ctxt->get_type (GCC_JIT_TYPE_VOID_PTR)),
> + m_block (b)
> + {
> + set_scope (b->get_function ());
> + }
> +
> + void replay_into (replayer *r) final override;
> +
> + void visit_children (rvalue_visitor *) final override {}
> +
> +private:
> + string * make_debug_string () final override;
> + void write_reproducer (reproducer &r) final override;
> + enum precedence get_precedence () const final override
> + {
> + return PRECEDENCE_UNARY;
> + }
> +
> +private:
> + block *m_block;
> +};
> +
> class function_pointer : public rvalue
> {
> public:
> @@ -2650,6 +2685,28 @@ private:
> block *m_target;
> };
>
> +class indirect_jump : public statement
> +{
> +public:
> + indirect_jump (block *b,
> + location *loc,
> + rvalue *target_address,
> + int num_destinations,
> + block **destinations);
> +
> + void replay_into (replayer *r) final override;
> +
> + vec get_successor_blocks () const final override;
> +
> +private:
> + string * make_debug_string () final override;
> + void write_reproducer (reproducer &r) final override;
> +
> +private:
> + rvalue *m_target_address;
> + auto_vec m_destinations;
> +};
> +
> class return_ : public statement
> {
> public:
> diff --git a/gcc/jit/libgccjit.cc b/gcc/jit/libgccjit.cc
> index 5a874fc48..42c6fe828 100644
> --- a/gcc/jit/libgccjit.cc
> +++ b/gcc/jit/libgccjit.cc
> @@ -2874,6 +2874,23 @@ gcc_jit_lvalue_get_address (gcc_jit_lvalue *lvalue,
> return (gcc_jit_rvalue *)lvalue->get_address (loc);
> }
>
> +/* Public entrypoint. See description in libgccjit.h.
> +
> + After error-checking, the real work is done by the
> + gcc::jit::recording::block::get_address method in
> + jit-recording.cc. */
> +
> +gcc_jit_rvalue *
> +gcc_jit_block_get_address (gcc_jit_block *block,
> + gcc_jit_location *loc)
> +{
> + RETURN_NULL_IF_FAIL (block, NULL, loc, "NULL block");
> + JIT_LOG_FUNC (block->get_context ()->get_logger ());
> + /* LOC can be NULL. */
> +
> + return (gcc_jit_rvalue *)block->get_address (loc);
> +}
> +
> /* Public entrypoint. See description in libgccjit.h.
>
> After error-checking, the real work is done by the
> @@ -3258,6 +3275,57 @@ gcc_jit_block_end_with_jump (gcc_jit_block *block,
> block->end_with_jump (loc, target);
> }
>
> +/* Public entrypoint. See description in libgccjit.h.
> +
> + After error-checking, the real work is done by the
> + gcc::jit::recording::block::end_with_indirect_jump method in
> + jit-recording.cc. */
> +
> +void
> +gcc_jit_block_end_with_indirect_jump (gcc_jit_block *block,
> + gcc_jit_location *loc,
> + gcc_jit_rvalue *target_address,
> + int num_destinations,
> + gcc_jit_block **destinations)
> +{
> + RETURN_IF_NOT_VALID_BLOCK (block, loc);
> + gcc::jit::recording::context *ctxt = block->get_context ();
> + JIT_LOG_FUNC (ctxt->get_logger ());
> + /* LOC can be NULL. */
> + RETURN_IF_FAIL (target_address, ctxt, loc, "NULL target_address");
> + RETURN_IF_FAIL_PRINTF1 (
> + target_address->get_type ()->is_pointer (),
> + ctxt, loc,
> + "target_address: %s is not of a pointer type",
> + target_address->get_debug_string ());
> + RETURN_IF_FAIL (num_destinations >= 0, ctxt, loc, "num_destinations < 0");
> + if (num_destinations > 0)
> + RETURN_IF_FAIL (destinations, ctxt, loc, "NULL destinations");
> +
> + for (int i = 0; i < num_destinations; i++)
> + {
> + RETURN_IF_FAIL_PRINTF1 (destinations[i], ctxt, loc,
> + "NULL destination block at index %d", i);
> + RETURN_IF_FAIL_PRINTF4 (
> + block->get_function () == destinations[i]->get_function (),
> + ctxt, loc,
> + "destination block %d (%s) is not in the same function"
> + " (function %s) as source block %s",
> + i,
> + destinations[i]->get_debug_string (),
> + destinations[i]->get_function ()->get_debug_string (),
> + block->get_debug_string ());
> + }
> +
> + gcc::jit::recording::statement *stmt =
> + block->end_with_indirect_jump (loc, target_address,
> + num_destinations,
> + (gcc::jit::recording::block **)destinations);
> +
> + /* target_address must be valid to use within STMT. */
> + target_address->verify_valid_within_stmt (__func__, stmt);
> +}
> +
> /* Public entrypoint. See description in libgccjit.h.
>
> After error-checking, the real work is done by the
> diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h
> index 2247c99de..272085986 100644
> --- a/gcc/jit/libgccjit.h
> +++ b/gcc/jit/libgccjit.h
> @@ -1455,16 +1455,31 @@ extern gcc_jit_rvalue *
> gcc_jit_lvalue_get_address (gcc_jit_lvalue *lvalue,
> gcc_jit_location *loc);
>
> +#define LIBGCCJIT_HAVE_gcc_jit_block_get_address
> +
> +/* Taking the address of a block; analogous to:
> + &&block
> + in C.
> +
> + This API entrypoint was added in LIBGCCJIT_ABI_39; you can test for its
> + presence using
> + #ifdef LIBGCCJIT_HAVE_gcc_jit_block_get_address
> +*/
> +extern gcc_jit_rvalue *
> +gcc_jit_block_get_address (gcc_jit_block *block,
> + gcc_jit_location *loc);
> +
> #define LIBGCCJIT_HAVE_gcc_jit_lvalue_set_tls_model
>
> /* Set the thread-local storage model of a global variable
>
> This API entrypoint was added in LIBGCCJIT_ABI_17; you can test for its
> presence using
> - #ifdef LIBGCCJIT_HAVE_gcc_jit_lvalue_set_tls_model */
> + #ifdef LIBGCCJIT_HAVE_gcc_jit_lvalue_set_tls_model
> +*/
> extern void
> gcc_jit_lvalue_set_tls_model (gcc_jit_lvalue *lvalue,
> - enum gcc_jit_tls_model model);
> + enum gcc_jit_tls_model model);
>
> #define LIBGCCJIT_HAVE_gcc_jit_lvalue_set_link_section
>
> @@ -1592,6 +1607,32 @@ gcc_jit_block_end_with_jump (gcc_jit_block *block,
> gcc_jit_location *loc,
> gcc_jit_block *target);
>
> +#define LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump
> +
> +/* Terminate a block by adding an indirect jump to target_address.
> +
> + All possible indirect jump targets must be constrained to a fixed array.
> +
> + The candidate destination blocks must be listed in DESTINATIONS
> +
> + (of length NUM_DESTINATIONS) so that libgccjit can validate block
> +
> + reachability within the function.
> +
> + This is roughly equivalent to this C code:
> +
> + goto *target_address;
> +
> + This API entrypoint was added in LIBGCCJIT_ABI_39; you can test for its
> + presence using
> + #ifdef LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump. */
> +extern void
> +gcc_jit_block_end_with_indirect_jump (gcc_jit_block *block,
> + gcc_jit_location *loc,
> + gcc_jit_rvalue *target_address,
> + int num_destinations,
> + gcc_jit_block **destinations);
> +
> /* Terminate a block by adding evaluation of an rvalue, returning the value.
>
> This is roughly equivalent to this C code:
> diff --git a/gcc/jit/libgccjit.map b/gcc/jit/libgccjit.map
> index 78b6be9ff..9412700a2 100644
> --- a/gcc/jit/libgccjit.map
> +++ b/gcc/jit/libgccjit.map
> @@ -349,3 +349,9 @@ LIBGCCJIT_ABI_38 {
> global:
> gcc_jit_type_is_floating_point;
> } LIBGCCJIT_ABI_37;
> +
> +LIBGCCJIT_ABI_39 {
> + global:
> + gcc_jit_block_get_address;
> + gcc_jit_block_end_with_indirect_jump;
> +} LIBGCCJIT_ABI_38;
> diff --git a/gcc/testsuite/jit.dg/all-non-failing-tests.h
> b/gcc/testsuite/jit.dg/all-non-failing-tests.h
> index e8f8463e8..f8202635e 100644
> --- a/gcc/testsuite/jit.dg/all-non-failing-tests.h
> +++ b/gcc/testsuite/jit.dg/all-non-failing-tests.h
> @@ -269,6 +269,13 @@
> #undef create_code
> #undef verify_code
>
> +/* test-indirect-jump.c */
> +#define create_code create_code_indirect_jump
> +#define verify_code verify_code_indirect_jump
> +#include "test-indirect-jump.c"
> +#undef create_code
> +#undef verify_code
> +
> /* test-link-section-assembler.c: This can't be in the testcases array as it
> doesn't have a verify_code implementation. */
>
> @@ -688,6 +695,9 @@ const struct testcase testcases[] = {
> {"vector_perm",
> create_code_vector_perm,
> verify_code_vector_perm},
> + {"indirect_jump",
> + create_code_indirect_jump,
> + verify_code_indirect_jump},
> };
>
> const int num_testcases = (sizeof (testcases) / sizeof (testcases[0]));
> diff --git a/gcc/testsuite/jit.dg/test-error-indirect-jump.c
> b/gcc/testsuite/jit.dg/test-error-indirect-jump.c
> new file mode 100644
> index 000000000..8f40a3738
> --- /dev/null
> +++ b/gcc/testsuite/jit.dg/test-error-indirect-jump.c
> @@ -0,0 +1,112 @@
> +#include
> +#include
> +
> +#include "libgccjit.h"
> +#include "harness.h"
> +
> +void
> +create_code (gcc_jit_context *ctxt, void *user_data)
> +{
> + /* Let's try to trigger every validation error on
> + gcc_jit_block_get_address and gcc_jit_block_end_with_indirect_jump. */
> + gcc_jit_type *void_type =
> + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID);
> + gcc_jit_type *int_type =
> + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
> +
> + gcc_jit_function *fn1 =
> + gcc_jit_context_new_function (ctxt, NULL,
> + GCC_JIT_FUNCTION_EXPORTED,
> + void_type,
> + "fn1",
> + 0, NULL,
> + 0);
> + gcc_jit_block *b_fn1 =
> + gcc_jit_function_new_block (fn1, "b_fn1");
> +
> + gcc_jit_function *fn2 =
> + gcc_jit_context_new_function (ctxt, NULL,
> + GCC_JIT_FUNCTION_EXPORTED,
> + void_type,
> + "fn2",
> + 0, NULL,
> + 0);
> + gcc_jit_block *b_fn2 =
> + gcc_jit_function_new_block (fn2, "b_fn2");
> +
> + /* 1. Non-pointer target_address. */
> + gcc_jit_rvalue * non_ptr =
> + gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 42);
> + gcc_jit_block_end_with_indirect_jump (b_fn1, NULL, non_ptr, 0, NULL);
> + CHECK_STRING_VALUE (
> + gcc_jit_context_get_last_error (ctxt),
> + "gcc_jit_block_end_with_indirect_jump:"
> + " target_address: (int)42 is not of a pointer type");
> +
> + /* 2. Negative num_destinations. */
> + gcc_jit_rvalue *addr_fn1 = gcc_jit_block_get_address (b_fn1, NULL);
> + gcc_jit_block_end_with_indirect_jump (b_fn1, NULL, addr_fn1, -1, NULL);
> + CHECK_STRING_VALUE (
> + gcc_jit_context_get_last_error (ctxt),
> + "gcc_jit_block_end_with_indirect_jump: num_destinations < 0");
> +
> + /* 3. NULL destinations array when num_destinations > 0. */
> + gcc_jit_block_end_with_indirect_jump (b_fn1, NULL, addr_fn1, 1, NULL);
> + CHECK_STRING_VALUE (
> + gcc_jit_context_get_last_error (ctxt),
> + "gcc_jit_block_end_with_indirect_jump: NULL destinations");
> +
> + /* 4. NULL element in destinations array. */
> + gcc_jit_block *null_dests[1] = { NULL };
> + gcc_jit_block_end_with_indirect_jump (b_fn1, NULL, addr_fn1, 1, null_dests);
> + CHECK_STRING_VALUE (
> + gcc_jit_context_get_last_error (ctxt),
> + "gcc_jit_block_end_with_indirect_jump:"
> + " NULL destination block at index 0");
> +
> + /* 5. Destination block in wrong function. */
> + gcc_jit_block *wrong_fn_dests[1] = { b_fn2 };
> + gcc_jit_block_end_with_indirect_jump (b_fn1, NULL, addr_fn1, 1,
> + wrong_fn_dests);
> + CHECK_STRING_VALUE (
> + gcc_jit_context_get_last_error (ctxt),
> + "gcc_jit_block_end_with_indirect_jump:"
> + " destination block 0 (b_fn2) is not in the same function"
> + " (function fn2) as source block b_fn1");
> +
> + /* Terminate b_fn1 cleanly so function validation doesn't overwrite
> + last_error with an "unterminated block" error during compile. */
> + gcc_jit_block_end_with_void_return (b_fn1, NULL);
> +
> + /* 6. Cross-function block address (addr_fn1 used inside fn2). */
> + gcc_jit_block *fn2_dests[1] = { b_fn2 };
> + gcc_jit_block_end_with_indirect_jump (b_fn2, NULL, addr_fn1, 1,
> + fn2_dests);
> +
> + CHECK_STRING_VALUE (
> + gcc_jit_context_get_last_error (ctxt),
> + "gcc_jit_block_end_with_indirect_jump:"
> + " rvalue &&b_fn1 (type: void *) has scope limited to function fn1"
> + " but was used within function fn2"
> + " (in statement: goto *&&b_fn1;)");
> +}
> +
> +void
> +verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
> +{
> + CHECK_VALUE (result, NULL);
> +
> + CHECK_STRING_VALUE (
> + gcc_jit_context_get_first_error (ctxt),
> + "gcc_jit_block_end_with_indirect_jump:"
> + " target_address: (int)42 is not of a pointer type");
> +
> + /* Verify that using a block address from fn1 inside fn2 was caught
> + by verify_valid_within_stmt. */
> + CHECK_STRING_VALUE (
> + gcc_jit_context_get_last_error (ctxt),
> + "gcc_jit_block_end_with_indirect_jump:"
> + " rvalue &&b_fn1 (type: void *) has scope limited to function fn1"
> + " but was used within function fn2"
> + " (in statement: goto *&&b_fn1;)");
> +}
> diff --git a/gcc/testsuite/jit.dg/test-indirect-jump.c
> b/gcc/testsuite/jit.dg/test-indirect-jump.c
> new file mode 100644
> index 000000000..f464a6edb
> --- /dev/null
> +++ b/gcc/testsuite/jit.dg/test-indirect-jump.c
> @@ -0,0 +1,109 @@
> +#include
> +#include
> +
> +#include "libgccjit.h"
> +#include "harness.h"
> +
> +void
> +create_code (gcc_jit_context *ctxt, void *user_data)
> +{
> + /* Let's try to inject the equivalent of:
> + int
> + test_indirect_jump (int idx)
> + {
> + void *targets[3];
> + targets[0] = &&b_zero;
> + targets[1] = &&b_one;
> + targets[2] = &&b_two;
> + goto *targets[idx];
> +
> + b_zero:
> + return 10;
> + b_one:
> + return 20;
> + b_two:
> + return 30;
> + }
> + */
> + gcc_jit_type *int_type =
> + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
> + gcc_jit_type *void_ptr_type =
> + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID_PTR);
> + gcc_jit_type *array_type =
> + gcc_jit_context_new_array_type (ctxt, NULL, void_ptr_type, 3);
> +
> + gcc_jit_param *param_idx =
> + gcc_jit_context_new_param (ctxt, NULL, int_type, "idx");
> + gcc_jit_function *func =
> + gcc_jit_context_new_function (ctxt, NULL,
> + GCC_JIT_FUNCTION_EXPORTED,
> + int_type,
> + "test_indirect_jump",
> + 1, ¶m_idx,
> + 0);
> +
> + gcc_jit_block *b_entry = gcc_jit_function_new_block (func, "entry");
> + gcc_jit_block *b_zero = gcc_jit_function_new_block (func, "b_zero");
> + gcc_jit_block *b_one = gcc_jit_function_new_block (func, "b_one");
> + gcc_jit_block *b_two = gcc_jit_function_new_block (func, "b_two");
> +
> + gcc_jit_lvalue *targets =
> + gcc_jit_function_new_local (func, NULL, array_type, "targets");
> +
> + gcc_jit_block *blocks[3] = { b_zero, b_one, b_two };
> + for (int i = 0; i < 3; i++)
> + {
> + gcc_jit_rvalue *idx_val =
> + gcc_jit_context_new_rvalue_from_int (ctxt, int_type, i);
> + gcc_jit_lvalue *elem =
> + gcc_jit_context_new_array_access (ctxt, NULL,
> + gcc_jit_lvalue_as_rvalue (targets),
> + idx_val);
> + gcc_jit_rvalue *blk_addr =
> + gcc_jit_block_get_address (blocks[i], NULL);
> + gcc_jit_block_add_assignment (b_entry, NULL, elem, blk_addr);
> + }
> +
> + /* void *target_addr = targets[idx]; */
> + gcc_jit_lvalue *selected_elem =
> + gcc_jit_context_new_array_access (ctxt, NULL,
> + gcc_jit_lvalue_as_rvalue (targets),
> + gcc_jit_param_as_rvalue (param_idx));
> +
> + /* goto *targets[idx]; */
> + gcc_jit_block_end_with_indirect_jump (
> + b_entry, NULL,
> + gcc_jit_lvalue_as_rvalue (selected_elem),
> + 3, blocks);
> +
> + /* b_zero: return 10; */
> + gcc_jit_block_end_with_return (
> + b_zero, NULL,
> + gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 10));
> +
> + /* b_one: return 20; */
> + gcc_jit_block_end_with_return (
> + b_one, NULL,
> + gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 20));
> +
> + /* b_two: return 30; */
> + gcc_jit_block_end_with_return (
> + b_two, NULL,
> + gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 30));
> +}
> +
> +void
> +verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
> +
> +{
> + typedef int (*fn_type) (int);
> + CHECK_NON_NULL (result);
> +
> + fn_type test_indirect_jump =
> + (fn_type)gcc_jit_result_get_code (result, "test_indirect_jump");
> + CHECK_NON_NULL (test_indirect_jump);
> +
> + CHECK_VALUE (test_indirect_jump (0), 10);
> + CHECK_VALUE (test_indirect_jump (1), 20);
> + CHECK_VALUE (test_indirect_jump (2), 30);
> +}
> --
> 2.56.0
>
> On Sun, Oct 25, 2026 at 7:58?PM David Malcolm wrote:
> >
> > On Fri, 2026-10-23 at 13:34 -0400, Marcus Valette wrote:
> > > From b55719183abf5ff37373115b5929ebd6ca914258 Mon Sep 17 00:00:00
> > > 2001
> > > From: Vincent Li
> > > Date: Fri, 23 Oct 2026 13:23:48 -0400
> > > Subject: [PATCH] jit: Add support for computed gotos and block
> > > addresses
> > >
> > > This patch adds `gcc_jit_block_get_address` and
> > > `gcc_jit_block_end_with_indirect_jump`
> > > under ABI version LIBGCCJIT_ABI_39. This exposes GNU C
> > > labels-as-values (`&&label`)
> > > and indirect jumps (`goto *expr;`) in libgccjit, enabling JIT-
> > > compiled
> > > interpreter
> > > dispatch loops and state machines to implement direct-threaded code
> > > tables.
> > >
> > > Tested on x86_64-pc-linux-gnu. All 30 iterations of jit.dg/test-
> > > indirect-jump.c
> > > passed across -O0 to -O3. check_GNU_style.py reports 0 errors.
> > >
> > > gcc/jit/ChangeLog:
> > >
> > > * docs/topics/expressions.rst (gcc_jit_block_get_address):
> > > Document.
> > > * docs/topics/functions.rst
> > > (gcc_jit_block_end_with_indirect_jump): Document.
> > > * jit-playback.cc (playback::block::get_address): New method.
> > > (playback::block::add_indirect_jump): New method.
> > > * jit-playback.h (playback::block::get_address): New method.
> > > (playback::block::add_indirect_jump): New method.
> > > * jit-recording.cc (recording::block::get_address): New method.
> > > (recording::block::end_with_indirect_jump): New method.
> > > (recording::get_block_address::replay_into): New method.
> > > (recording::get_block_address::make_debug_string): New method.
> > > (recording::get_block_address::write_reproducer): New method.
> > > (recording::indirect_jump::replay_into): New method.
> > > (recording::indirect_jump::get_successor_blocks): New method.
> > > (recording::indirect_jump::make_debug_string): New method.
> > > (recording::indirect_jump::write_reproducer): New method.
> > > * jit-recording.h (class get_block_address): New class.
> > > (class indirect_jump): New class.
> > > (recording::block::get_address): New method.
> > > (recording::block::end_with_indirect_jump): New method.
> > > * libgccjit.cc (gcc_jit_block_get_address): New entrypoint.
> > > (gcc_jit_block_end_with_indirect_jump): New entrypoint.
> > > * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_block_get_address): New
> > > macro.
> > > (LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump): New macro.
> > > (gcc_jit_block_get_address): New declaration.
> > > (gcc_jit_block_end_with_indirect_jump): New declaration.
> > > * libgccjit.map (LIBGCCJIT_ABI_39): Add gcc_jit_block_get_address
> > > and
> > > gcc_jit_block_end_with_indirect_jump.
> > >
> > > gcc/testsuite/ChangeLog:
> > >
> > > * jit.dg/all-non-failing-tests.h: Include test-indirect-jump.c.
> > > * jit.dg/test-indirect-jump.c: New test.
> > >
> > > Signed-off-by: Vincent Li
> >
> >
> > Thanks for the patch. Overall it looks promising, but there are some
> > minor issues.
> >
> > The From: header reads "Marcus Valette" while the patch author and
> > Signed-off-by: both read "Vincent Li", albeit at the same gmail
> > address. Who wrote this patch? (the DCO sign-off is standing in for
> > copyright assignment here).
> >
> > I looked on https://gcc.sashiko.dev/ and for some reason I'm not seeing
> > this patch there (perhaps because it was To: jit@gcc.gnu.org and only
> > CC: gcc-patches@gcc.gnu.org ?) Given that, I had Claude code take a
> > look at it; please forgive me for taking the liberty of pasting what it
> > said verbatim, since its feedback seems correct to me:
> >
> > (begin quote):
> >
> > Verdict: good direction, needs a v2. The design follows the existing
> > end_with_extended_asm_goto precedent closely, it applies cleanly to
> > master, builds warning-free, and the new test passes including the
> > reproducer round-trip. But there are two real defects ? one of which is
> > an ICE ? plus a documentation claim that is factually wrong.
> >
> > Verification performed
> >
> > Applied to master @ 9f6f255b68b, built libgccjit.so, ran jit.exp=test-
> > indirect-jump.c: 35 passes, 0 failures. The jit harness auto-generates
> > and recompiles a reproducer per test, so write_reproducer is covered.
> > ABI 39 is the correct next number ? LIBGCCJIT_ABI_38 is the current tip
> > in both libgccjit.map and compatibility.rst.
> >
> > I did not run test-combination.c / test-threads.c, which pick up the
> > new test via all-non-failing-tests.h. Those should be run before
> > commit.
> >
> > Blockers
> >
> > 1. ICE instead of a clean error: missing verify_valid_within_stmt
> >
> > gcc_jit_block_end_with_indirect_jump never calls target_address-
> > >verify_valid_within_stmt (__func__, stmt). Every other statement
> > entrypoint does ? libgccjit.cc:3038, 3082-3083, 3139-3140, 3208, 3297.
> >
> > Passing a target_address scoped to a different function gives:
> >
> > internal compiler error: in expand_expr_real_1, at expr.cc:11811
> >
> > The identical misuse via gcc_jit_block_end_with_return is diagnosed
> > properly:
> >
> > gcc_jit_block_end_with_return: rvalue g1loc (type: int) has scope
> > limited to function g1 but was used within function g2 (in statement:
> > return g1loc;)
> >
> > Fix: capture the statement returned by end_with_indirect_jump and call
> > verify_valid_within_stmt on it, as the neighbouring entrypoints do.
> >
> > 2. Cross-function block addresses silently accepted
> >
> > recording::get_block_address never calls set_scope (b->get_function
> > ()), so m_scope stays NULL and the rvalue is treated as a global.
> > Taking &&a_lbl in func_a and jumping to it from func_b produces no
> > diagnostic at all. Confirmed via DUMP_INITIAL_GIMPLE:
> >
> > int func_b ()
> > {
> > b_entry:
> > tmp = &a_lbl; /* a_lbl lives in func_a */
> > goto tmp;
> > ...
> > }
> >
> > GNU C explicitly forbids jumping to a label in a different function.
> > Calling set_scope in the constructor ? the same mechanism locals and
> > params use ? turns this into a clean API error.
> >
> > 3. The documented rationale for destinations is wrong
> >
> > Both libgccjit.h and functions.rst say the array is needed "to allow
> > GCC's middle-end to construct valid CFG edges." It isn't. Edges come
> > from FORCED_LABEL, which gimplify.cc:20972 sets when the address is
> > taken and tree-cfg.cc:1046 wires into abnormal edges for every computed
> > goto.
> >
> > I tested a deliberately incomplete destinations list (two labels in the
> > jump table, only one listed) at -O3: both targets still dispatch
> > correctly, no diagnostic, correct results.
> >
> > The parameter is load-bearing ? recording::function::validate walks
> > get_successor_blocks for its reachability check, and without it
> > legitimate targets get flagged "unreachable block". That is the honest
> > justification and what the docs should say. As written, users are told
> > the array is a safety requirement when under-listing is silently
> > harmless and over-listing just force-marks extra labels.
> >
> > Should-fix
> >
> > - compatibility.rst has no LIBGCCJIT_ABI_39 section. Required for
> > every ABI bump; also needed so the docs can use
> > :ref:LIBGCCJIT_ABI_39instead of the plain ```LIBGCCJIT_ABI_39`` ```
> > literal the patch uses. The surrounding entries in expressions.rst use
> > the :ref: form.
> > - gcc_jit_block_get_address is documented in the wrong section. It
> > lands at expressions.rst:806, inside Lvalues (which starts at
> > line 778), between gcc_jit_lvalue_get_address and
> > gcc_jit_lvalue_set_tls_model. It is neither an lvalue operation nor an
> > lvalue method ? it belongs with the block APIs in functions.rst, next
> > to the new end_with_indirect_jump.
> > - No error-path tests. The new entrypoints add five validation checks
> > and none are covered. jit.dg/test-error-*.c is the convention.
> > - Three unrelated hunks. Trailing-whitespace removal at jit-
> > recording.h:966, and a comment-terminator plus re-indent of
> > gcc_jit_lvalue_set_tls_model in libgccjit.h. Drop them or split into a
> > separate cleanup patch ? neither is in the ChangeLog.
> > - all-non-failing-tests.h ordering. Both the #include block and the
> > testcases[] entry are alphabetically sorted; the patch puts the include
> > after test-switch.c and the array entry at the very end, rather than
> > among the i entries.
> >
> > Minor
> >
> > - write_reproducer embeds literal tabs in the strings it emits, so
> > generated reproducer files get tab-indented continuation lines.
> > extended_asm_goto::write_reproducer uses spaces ? match it.
> > - indirect_jump::make_debug_string uses get_debug_string () rather
> > than get_debug_string_parens (PRECEDENCE_UNARY), so goto *a + b; will
> > render ambiguously.
> > - playback::block::add_indirect_jump omits the convert
> > (ptr_type_node, expr) that c_finish_goto_ptr performs. Not a
> > correctness bug today ? verify_gimple_goto accepts any POINTER_TYPE_P ?
> > but normalizing is cheaper than reasoning about named address spaces
> > later.
> > - The FORCED_LABEL assignment in get_address is redundant with
> > gimplify.cc:20972. Harmless; worth a comment if kept.
> > - RETURN_IF_FAIL (num_destinations > 0, ...) with message
> > "num_destinations <= 0". end_with_extended_asm_goto permits >= 0; and
> > the message should describe the problem, not restate the predicate.
> >
> > (end quote from AI)
> >
> > Hope this is constructive; thanks again for the patch
> > Dave
> >
> >
> >
> >
> >
> >
> > > ---
> > > gcc/jit/docs/topics/expressions.rst | 14 ++
> > > gcc/jit/docs/topics/functions.rst | 21 +++
> > > gcc/jit/jit-playback.cc | 39 +++++
> > > gcc/jit/jit-playback.h | 7 +
> > > gcc/jit/jit-recording.cc | 157
> > > +++++++++++++++++++
> > > gcc/jit/jit-recording.h | 57 ++++++-
> > > gcc/jit/libgccjit.cc | 63 ++++++++
> > > gcc/jit/libgccjit.h | 39 ++++-
> > > gcc/jit/libgccjit.map | 6 +
> > > gcc/testsuite/jit.dg/all-non-failing-tests.h | 10 ++
> > > gcc/testsuite/jit.dg/test-indirect-jump.c | 108 +++++++++++++
> > > 11 files changed, 518 insertions(+), 3 deletions(-)
> > > create mode 100644 gcc/testsuite/jit.dg/test-indirect-jump.c
> > >
> > > diff --git a/gcc/jit/docs/topics/expressions.rst
> > > b/gcc/jit/docs/topics/expressions.rst
> > > index 680ea1d86..0f9f705fe 100644
> > > --- a/gcc/jit/docs/topics/expressions.rst
> > > +++ b/gcc/jit/docs/topics/expressions.rst
> > > @@ -806,6 +806,20 @@ where the rvalue is computed by reading from the
> > > storage area.
> > >
> > > in C.
> > >
> > > +.. function:: gcc_jit_rvalue * \
> > > + gcc_jit_block_get_address (gcc_jit_block *block, \
> > > + gcc_jit_location *loc)
> > > +
> > > + Get the address of a basic block as an rvalue of type ``void *``,
> > > + analogous to GNU C's ``&&label``.
> > > +
> > > + This API entrypoint was added in ``LIBGCCJIT_ABI_39``; you can
> > > test for its
> > > + presence using:
> > > +
> > > + .. code-block:: c
> > > +
> > > + #ifdef LIBGCCJIT_HAVE_gcc_jit_block_get_address
> > > +
> > > .. function:: void\
> > > gcc_jit_lvalue_set_tls_model (gcc_jit_lvalue *lvalue,\
> > > enum gcc_jit_tls_model
> > > model)
> > > diff --git a/gcc/jit/docs/topics/functions.rst
> > > b/gcc/jit/docs/topics/functions.rst
> > > index 66d4b6b2f..1f2eefb1c 100644
> > > --- a/gcc/jit/docs/topics/functions.rst
> > > +++ b/gcc/jit/docs/topics/functions.rst
> > > @@ -466,6 +466,27 @@ Statements
> > >
> > > goto target;
> > >
> > > +.. function:: void\
> > > + gcc_jit_block_end_with_indirect_jump (\
> > > + gcc_jit_block *block,\
> > > + gcc_jit_location *loc,\
> > > + gcc_jit_rvalue *target_address,\
> > > + int num_destinations,\
> > > + gcc_jit_block **destinations)
> > > +
> > > + Terminate a basic block by adding an indirect jump to
> > > ``target_address``,
> > > + analogous to GNU C's ``goto *target_address;``.
> > > +
> > > + All possible destination blocks must be listed in the
> > > ``destinations``
> > > + array to allow GCC's middle-end to construct valid CFG edges.
> > > +
> > > + This API entrypoint was added in ``LIBGCCJIT_ABI_39``; you can
> > > test for its
> > > + presence using:
> > > +
> > > + .. code-block:: c
> > > +
> > > + #ifdef LIBGCCJIT_HAVE_gcc_jit_block_end_with_indirect_jump
> > > +
> > > .. function:: void\
> > > gcc_jit_block_end_with_return (gcc_jit_block *block,\
> > > gcc_jit_location *loc,\
> > > diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc
> > > index 56c9413f8..66a1e8fef 100644
> > > --- a/gcc/jit/jit-playback.cc
> > > +++ b/gcc/jit/jit-playback.cc
> > > @@ -2547,6 +2547,45 @@ c_finish_goto_label (location_t loc, tree
> > > label)
> > >
> > > }
> > >
> > > +/* Take the address of a block as a void * rvalue (&&block). */
> > > +
> > > +playback::rvalue *
> > > +playback::block::
> > > +get_address (location *loc)
> > > +{
> > > + tree label = as_label_decl ();
> > > + TREE_USED (label) = 1;
> > > + FORCED_LABEL (label) = 1;
> > > +
> > > + tree addr = build1 (ADDR_EXPR, ptr_type_node, label);
> > > + if (loc)
> > > + set_tree_location (addr, loc);
> > > +
> > > + return new rvalue (m_func->m_ctxt, addr);
> > > +}
> > > +
> > > +/* Add an indirect jump statement (goto *target_address;). */
> > > +
> > > +void
> > > +playback::block::add_indirect_jump (location *loc,
> > > + rvalue *target_address,
> > > + auto_vec *destinations)
> > > +{
> > > + unsigned i;
> > > + block *dest;
> > > + FOR_EACH_VEC_ELT (*destinations, i, dest)
> > > + {
> > > + tree label = dest->as_label_decl ();
> > > + TREE_USED (label) = 1;
> > > + FORCED_LABEL (label) = 1;
> > > + }
> > > +
> > > + tree stmt = build1 (GOTO_EXPR, void_type_node, target_address-
> > > >as_tree ());
> > > + if (loc)
> > > + set_tree_location (stmt, loc);
> > > + add_stmt (stmt);
> > > +}
> > > +
> > > /* Add a return statement to the function's statement list. */
> > >
> > > void
> > > diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h
> > > index ad3e41f3d..d32ed4d49 100644
> > > --- a/gcc/jit/jit-playback.h
> > > +++ b/gcc/jit/jit-playback.h
> > > @@ -692,6 +692,13 @@ public:
> > > add_jump (location *loc,
> > > block *target);
> > >
> > > + rvalue *get_address (location *loc);
> > > +
> > > + void
> > > + add_indirect_jump (location *loc,
> > > + rvalue *target_address,
> > > + auto_vec *destinations);
> > > +
> > > void
> > > add_return (location *loc,
> > > rvalue *rvalue);
> > > diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc
> > > index e28e5f67c..47983e06c 100644
> > > --- a/gcc/jit/jit-recording.cc
> > > +++ b/gcc/jit/jit-recording.cc
> > > @@ -5072,6 +5072,26 @@ recording::block::end_with_jump
> > > (recording::location *loc,
> > > return result;
> > > }
> > >
> > > +/* Create a recording::end_with_indirect_jump instance and add
> > > + it to the block's context's list of mementos, and to the
> > > + block's list of statements.
> > > +
> > > + Implements the heart of gcc_jit_block_end_with_indirect_jump. */
> > > +
> > > +recording::statement *
> > > +recording::block::end_with_indirect_jump (location *loc,
> > > + rvalue *target_address,
> > > + int num_destinations,
> > > + block **destinations)
> > > +{
> > > + statement *result = new indirect_jump (this, loc, target_address,
> > > + num_destinations, destinations);
> > > + m_ctxt->record (result);
> > > + m_statements.safe_push (result);
> > > + m_has_been_terminated = true;
> > > + return result;
> > > +}
> > > +
> > > /* Create a recording::end_with_return instance and add it to
> > > the block's context's list of mementos, and to the block's
> > > list of statements.
> > > @@ -5197,6 +5217,20 @@ recording::block::get_loc () const
> > > return NULL;
> > > }
> > >
> > > +/* Create a recording::get_address instance and add it to
> > > + the block's context's list of mementos, and to the block's
> > > + list of statements.
> > > +
> > > + Implements the heart of gcc_jit_block_get_address. */
> > > +
> > > +recording::rvalue *
> > > +recording::block::get_address (location *loc)
> > > +{
> > > + recording::rvalue *result = new get_block_address (m_ctxt, loc,
> > > this);
> > > + m_ctxt->record (result);
> > > + return result;
> > > +}
> > > +
> > > /* Get the first statement within a block, if any. */
> > >
> > > recording::statement *
> > > @@ -7332,6 +7366,45 @@
> > > recording::get_address_of_lvalue::write_reproducer (reproducer &r)
> > > r.get_identifier (m_loc));
> > > }
> > >
> > > +/* The implementation of class
> > > gcc::jit::recording::get_block_address. */
> > > +
> > > +/* Implementation of pure virtual hook
> > > recording::memento::replay_into
> > > + for recording::get_block_address. */
> > > +
> > > +void
> > > +recording::get_block_address::replay_into (replayer *r)
> > > +{
> > > + set_playback_obj (
> > > + m_block->playback_block ()->
> > > + get_address (playback_location (r, m_loc)));
> > > +}
> > > +
> > > +/* Implementation of recording::memento::make_debug_string for
> > > + getting the address of a block. */
> > > +
> > > +recording::string *
> > > +recording::get_block_address::make_debug_string ()
> > > +{
> > > + return string::from_printf (m_ctxt,
> > > + "&&%s",
> > > + m_block->get_debug_string ());
> > > +}
> > > +
> > > +/* Implementation of recording::memento::write_reproducer for
> > > + get_block_address. */
> > > +
> > > +void
> > > +recording::get_block_address::write_reproducer (reproducer &r)
> > > +{
> > > + const char *id = r.make_identifier (this, "address_of");
> > > + r.write (" gcc_jit_rvalue *%s =\n"
> > > + " gcc_jit_block_get_address (%s,\n"
> > > + " %s);\n",
> > > + id,
> > > + r.get_identifier (m_block),
> > > + r.get_identifier (m_loc));
> > > +}
> > > +
> > > /* The implementation of class
> > > gcc::jit::recording::function_pointer. */
> > >
> > > /* Implementation of pure virtual hook
> > > recording::memento::replay_into
> > > @@ -7765,6 +7838,90 @@ recording::jump::write_reproducer (reproducer
> > > &r)
> > > r.get_identifier (m_target));
> > > }
> > >
> > > +/* The implementation of class gcc::jit::recording::indirect_jump.
> > > */
> > > +
> > > +/* gcc::jit::recording::indirect_jump's constructor. */
> > > +
> > > +recording::indirect_jump::indirect_jump (block *b,
> > > + location *loc,
> > > + rvalue *target_address,
> > > + int num_destinations,
> > > + block **destinations)
> > > +: statement (b, loc),
> > > + m_target_address (target_address)
> > > +{
> > > + m_destinations.reserve_exact (num_destinations);
> > > + for (int i = 0; i < num_destinations; i++)
> > > + m_destinations.quick_push (destinations[i]);
> > > +}
> > > +
> > > +/* Implementation of pure virtual hook
> > > recording::memento::replay_into
> > > + for recording::indirect_jump. */
> > > +
> > > +void
> > > +recording::indirect_jump::replay_into (replayer *r)
> > > +{
> > > + auto_vec