Instruction
VCOMISBF16
Compares the low bfloat16 values of two registers and sets ZF, PF and CF as COMISS does, without floating-point exceptions.
- Extensions
- Forms
- 2 (2 EVEX)
- Data
- Intel XED v2026.08.23
VCOMISBF16 compares the low bfloat16 values of an XMM register and a register or 16 bits of memory and sets ZF, PF and CF as VCOMISS does: all three for unordered, CF alone for less, ZF alone for equal, none for greater, with OF, SF and AF cleared. It belongs to AVX10.2 and is the only scalar instruction among its bfloat16 arithmetic. The opcode is 2Fh in EVEX map 5 with the 66 prefix and W0, where VCOMISH has no prefix; EVEX.vvvv must be 1111b and the vector length is ignored.
One compare, not two
VCOMISS and VUCOMISS differ only in which NaNs raise the invalid-operation exception. VCOMISBF16 raises none, reads no MXCSR bit and reports a NaN of either kind as unordered, so the AVX10.2 specification (revision 7.0) defines no VUCOMISBF16; the entry’s exception class is E10NF. It reads denormals as zeros, as VADDBF16’s page explains, so 0001h and 0000h compare equal. Unlike VCOMXSS, it leaves OF and SF clear, so “less” needs JB or JA with the operands swapped, as for VCOMISS.
In our builds
GCC 14 has no AVX10.2 option. Clang 23 at -O2 with -mavx10.2 uses
VCOMISBF16 for the intrinsics only: _mm_comilt_sbh(a, b) swaps the
operands and takes SETA, _mm_comige_sbh takes SETAE,
_mm_comieq_sbh SETNP and SETE joined with AND, and _mm_comineq_sbh
SETP and SETNE joined with OR. C’s compares on __bf16 values widen
both to singles with a 16-bit shift instead: a < b and a <= b
become VUCOMISS with SETA or SETAE, and a == b the AVX10.2
VUCOMXSS with SETE. Those keep denormals, so the C
compare finds 0001h greater than 0000h. No AVX10.2 processor appears in
this site’s recorded cases.
Forms
Data flow
Where the elements of the sources go, element 0 on the right; results that depend on a control value are drawn for an example. How to read.
The flags come from bfloat16 0 of xmm1 and xmm2. RFLAGS: CF, PF, ZF.
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
x = comi(xmm1.bf16[0], src2.bf16[0]) # 0 >, 1 <, 2 =, 3 unordered
zf = x in (2, 3)
pf = x == 3
cf = x in (1, 3)
of = sf = af = 0
# BF16: to nearest even, denormals flushed, no flags; MXCSR unusedNot run on a processor: none of these processors has AVX10.2.
Operands
| Operand | Kind | Action |
|---|---|---|
VCOMISBF16 xmm, xmm/m16 | ||
xmm | explicit | read |
xmm/m16 | explicit | read |
RFLAGS | implicit | write |
Flags
| OF | SF | ZF | AF | PF | CF |
|---|---|---|---|---|---|
| All forms | |||||
| 0 | 0 | M | 0 | M | M |
Exceptions
The exception class is XED's name for the set of exception conditions that a form follows. How to read.
- All forms
AVX512-E10NF
Attributes
What else XED records about the forms. How to read.
- All forms
- denormal inputs read as zero
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to VCOMISBF16, each with the form it compiles to and the Clang options it needs. The forms come from compiling every intrinsic and decoding the result with Intel XED; all intrinsics A–Z explains the method.
| Intrinsic | Compiles to |
|---|---|
_mm_comieq_sbh
int _mm_comieq_sbh(__m128bh __A, __m128bh __B) |
|
_mm_comige_sbh
int _mm_comige_sbh(__m128bh __A, __m128bh __B) |
|
_mm_comigt_sbh
int _mm_comigt_sbh(__m128bh __A, __m128bh __B) |
|
_mm_comile_sbh
int _mm_comile_sbh(__m128bh __A, __m128bh __B) |
|
_mm_comilt_sbh
int _mm_comilt_sbh(__m128bh __A, __m128bh __B) |
|
_mm_comineq_sbh
int _mm_comineq_sbh(__m128bh __A, __m128bh __B) |
|
CPUID and processors
Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.
| ISA set | CPUID | Processors |
|---|---|---|
AVX10_2_BF16_SCALAR | AVX10.2 | Nova Lake, Diamond Rapids |
More AVX10.2 instructions
- VADDBF16
- VCMPBF16
- VCOMXSD
- VCOMXSH
- VCOMXSS
- VCVT2PH2BF8
- VCVT2PH2BF8S
- VCVT2PH2HF8
- VCVT2PH2HF8S
- VCVT2PS2PHX
- VCVTBF162IBS
- VCVTBF162IUBS
- VCVTBIASPH2BF8
- VCVTBIASPH2BF8S
- VCVTBIASPH2HF8
- VCVTBIASPH2HF8S
- VCVTHF82PH
- VCVTPH2BF8
- VCVTPH2BF8S
- VCVTPH2HF8
- VCVTPH2HF8S
- VCVTPH2IBS
- VCVTPH2IUBS
- VCVTPS2IBS
- VCVTPS2IUBS
- VCVTTBF162IBS
- VCVTTBF162IUBS
- VCVTTPD2DQS
- VCVTTPD2QQS
- VCVTTPD2UDQS
- VCVTTPD2UQQS
- VCVTTPH2IBS
- VCVTTPH2IUBS
- VCVTTPS2DQS
- VCVTTPS2IBS
- VCVTTPS2IUBS
- VCVTTPS2QQS
- VCVTTPS2UDQS
- VCVTTPS2UQQS
- VCVTTSD2SIS
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model. - Clang's x86 intrinsic headers, LLVM 23.1.2 (commit
85ac56026243): the intrinsics, their signatures and doc comments, and the Clang of that release, which compiled each of them. - Intel Advanced Vector Extensions 10.2 Architecture Specification, revision 7.0 (361050-007, April 2026)
The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The intrinsics and their signatures come from Clang, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.