Extensions
Forms
10 (4 VEX, 6 EVEX)
Data
Intel XED v2026.08.23

VCVTPS2PH narrows singles to half precision: four from an XMM register or eight from a YMM register, into the low half of an XMM register or straight to memory. It is the F16C partner of VCVTPH2PS, and unlike that one it rounds: a half has 11 significant bits and a largest finite value of 65504.

The immediate

Its immediate chooses the rounding: with bit 2 clear, bits 1:0 give it (00 nearest, 01 down, 10 up, 11 toward zero); with bit 2 set, MXCSR.RC decides. Intel’s manual says that bits 7:3 are ignored and AMD’s says nothing of them; Zen 5 ignored them, converting with 08h as with 00h and with FCh as with 04h. GCC 14 and Clang 23 at -O2 with -mf16c use 4 for C’s conversion of a float to _Float16, so the program’s rounding mode applies; _cvtss_sh(x, 0) gets 0.

Out of range

Both manuals say that MXCSR.FTZ has no effect: results below the smallest normal half become half denormals. Zen 5 agreed, rounding the single 00000001h up to the half 0001h with FTZ set, and setting UE, PE and DE. Rounding to nearest turns 65520 and more into infinity, with OE and PE set; rounding toward zero never goes past 65504. A NaN keeps the top bits of its payload: 7FC12345h became 7E09h. With an exception unmasked, the instruction raises #XM and writes nothing, which the cases recorded on Zen 5 show for a signaling NaN input.

In compiled code

A loop narrowing an array of floats to _Float16 becomes the YMM form with a memory destination in Clang; GCC converts each element alone and stores it with VPEXTRW. Intel’s optimization manual found the instruction about four times faster than converting with integer instructions (Example 15-32). A double is not narrowed through a single, which could round twice: both compilers call the library’s __truncdfhf2 for it.

The EVEX forms (AVX-512F or AVX10.1) narrow sixteen singles and add a mask, with merging only when the destination is memory; VCVTPS2PHX of AVX512-FP16 adds broadcast and an embedded rounding mode. The instruction table of AMD’s Zen 5 guide gives the XMM form one macro-op with a latency of three cycles.

In the optimization guide

What the optimization guide says about VCVTPS2PH, a line per claim. Each links to the claim in the guide, with its sources and where they differ.

Zen and Zen+

Forms

Every encoding of VCVTPS2PH that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
VCVTPS2PH m64, xmm, imm8 VCVTPS2PH_MEMq_XMMdq_IMMbVEX.128.66.0F3A.W0 1D /r ibF16C
VCVTPS2PH xmm, xmm, imm8 VCVTPS2PH_XMMq_XMMdq_IMMbVEX.128.66.0F3A.W0 1D /r ibF16C
VCVTPS2PH m128, ymm, imm8 VCVTPS2PH_MEMdq_YMMqq_IMMbVEX.256.66.0F3A.W0 1D /r ibF16C
VCVTPS2PH xmm, ymm, imm8 VCVTPS2PH_XMMdq_YMMqq_IMMbVEX.256.66.0F3A.W0 1D /r ibF16C
VCVTPS2PH ymm {k}{z}, zmm, imm8, {sae} VCVTPS2PH_YMMf16_MASKmskw_ZMMf32_IMM8_AVX512EVEX.512.66.0F3A.W0 1D /r ibAVX10.1 or AVX512F
VCVTPS2PH m256 {k}, zmm, imm8 VCVTPS2PH_MEMf16_MASKmskw_ZMMf32_IMM8_AVX512EVEX.512.66.0F3A.W0 1D /r ibAVX10.1 or AVX512F
VCVTPS2PH xmm {k}{z}, xmm, imm8 VCVTPS2PH_XMMf16_MASKmskw_XMMf32_IMM8_AVX512EVEX.128.66.0F3A.W0 1D /r ibAVX10.1 or AVX512F + AVX512VL
VCVTPS2PH m64 {k}, xmm, imm8 VCVTPS2PH_MEMf16_MASKmskw_XMMf32_IMM8_AVX512EVEX.128.66.0F3A.W0 1D /r ibAVX10.1 or AVX512F + AVX512VL
VCVTPS2PH xmm {k}{z}, ymm, imm8 VCVTPS2PH_XMMf16_MASKmskw_YMMf32_IMM8_AVX512EVEX.256.66.0F3A.W0 1D /r ibAVX10.1 or AVX512F + AVX512VL
VCVTPS2PH m128 {k}, ymm, imm8 VCVTPS2PH_MEMf16_MASKmskw_YMMf32_IMM8_AVX512EVEX.256.66.0F3A.W0 1D /r ibAVX10.1 or AVX512F + AVX512VL

Latency and throughput

What the scheduling models of LLVM 23.1.2 give for each form, not measurements: latency / reciprocal throughput in cycles, the ports under them. A row is a model, or models that agree; a dash, a form that its processors lack. Memory forms: latency from the address, ports without the load and store units. Which processors each model covers.
Modelm64, xmm, imm8xmm, xmm, imm8
xmm {k}{z}, xmm, imm8no mask
m128, ymm, imm8xmm, ymm, imm8
xmm {k}{z}, ymm, imm8no mask
ymm {k}{z}, zmm, imm8, {sae}no mask, with {sae}ymm {k}{z}, zmm, imm8, {sae}with a mask, zeroingm256 {k}, zmm, imm8no maskm256 {k}, zmm, imm8with a maskxmm {k}{z}, xmm, imm8with a mask, zeroingm64 {k}, xmm, imm8no maskm64 {k}, xmm, imm8with a maskxmm {k}{z}, ymm, imm8with a mask, zeroingm128 {k}, ymm, imm8no maskm128 {k}, ymm, imm8with a mask
Sandy Bridge13 / 1p0110 / 1p01513 / 1p0110 / 1p015
Haswell5 / 1p154 / 1p157 / 1p156 / 1p15
Broadwell5 / 1p14 / 1p157 / 1p16 / 1p15
Skylake6 / 1p0155 / 1p0158 / 1p0157 / 1p015
Skylake-SP6 / 1p0155 / 1p0158 / 1p0157 / 1p0157 / 1p057 / 1p055 / 1p015 / 1p015 / 1p0155 / 1p015 / 1p017 / 1p0155 / 1p015 / 1p01
Ice Lake6 / 1p0155 / 1p0158 / 1p0157 / 1p0157 / 1p057 / 1p055 / 0.5p015 / 0.5p015 / 1p0155 / 0.5p015 / 0.5p017 / 1p0155 / 0.5p015 / 0.5p01
Alder Lake12 / 0.5p016 / 1p01512 / 0.5p018 / 1p015
Sapphire Rapids12 / 0.5p016 / 1p01512 / 0.5p018 / 1p0158 / 1p0511 / 1p0512 / 1p016 / 1p09 / 1p01512 / 0.5p0116 / 0.5p0111 / 1p01512 / 0.5p0116 / 0.5p01
Lunar Lake5 / 2V0 V15 / 2V0 V1 V2 V35 / 2V0 V17 / 2V0 V1 V2 V3
Piledriver4 / 2FPCVT FPU08 / 2FPCVT FPSTO FPU04 / 2FPCVT FPFMA FPU08 / 2FPCVT FPFMA FPSTO FPU0
Zen, Zen 2100 / 0.25100 / 0.25100 / 0.25100 / 0.25
Zen 34 / 1FP2 FP33 / 1FP2 FP37 / 1FP2 FP36 / 1FP2 FP3
Zen 44 / 1FP2 FP33 / 11FP2 FP37 / 1FP2 FP36 / 1FP2 FP36 / 12FP2 FP36 / 12FP2 FP37 / 1FP2 FP37 / 1FP2 FP33 / 13FP2 FP34 / 1FP2 FP34 / 1FP2 FP36 / 1FP2 FP37 / 1FP2 FP37 / 1FP2 FP3
Jaguar4 / 1FPU13 / 1FPU1 STC7 / 2FPA FPM FPU16 / 2FPA FPM FPU1 STC
  1. Zen 4 model: AMD's spreadsheets give reciprocal throughput 0.5 for Zen 4 and Zen 5 (AMD 57647, row 1017; AMD 58455, row 1059).
  2. Zen 4 model: AMD's spreadsheets give latency 7 for Zen 4 and Zen 5 (AMD 57647, row 1021; AMD 58455, row 78).
  3. Zen 4 model: AMD's spreadsheets give reciprocal throughput 0.5 for Zen 4 and Zen 5 (AMD 57647, row 1019; AMD 58455, row 75).

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.

Narrow: each single becomes a half, in the same order, at the low end of the result.Memory forms
VCVTPS2PH: each element narrowedResult halves 15 to 0: a15, unchanged (bit 14 of k1 is 0), a13, a12, a11, a10, a9, a8, a7, a6, a5, a4, a3, a2, a1, a0.0123456789101112131415zmm2a1111111111111110k1a0a1a2a3a4a5a6a7a8a9a10a11a12a13a15m256

A memory destination receives the halves alone. Shown for the zmm form; the xmm and ymm forms work the same on 4 and 8 singles. The EVEX forms write under a mask: where its bit is 0, the element keeps its old value.

Result halves 15 to 0: a15, unchanged (bit 14 of k1 is 0), a13, a12, a11, a10, a9, a8, a7, a6, a5, a4, a3, a2, a1, a0.

Narrow: each single becomes a half, in the same order, at the low end of the result.Register forms
VCVTPS2PH: each element narrowedResult halves 15 to 0: a15, unchanged (bit 14 of k1 is 0), a13, a12, a11, a10, a9, a8, a7, a6, a5, a4, a3, a2, a1, a0.ymm1

Shown for the zmm form; the xmm and ymm forms work the same on 4 and 8 singles. The EVEX forms write under a mask: where its bit is 0, the element keeps its old value, or zeroes it with {z}.

Result halves 15 to 0: a15, unchanged (bit 14 of k1 is 0), a13, a12, a11, a10, a9, a8, a7, a6, a5, a4, a3, a2, a1, a0.

Operation

What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.

Memory forms
for i in range(VL // 32):
    if k1[i]:  # 1 without a write mask
        a = zmm2.f32[i]
        mem.f16[i] = to_f16(a, imm8)
    # else: mem.f16[i] is not written
# imm8[1:0]: rn, rd, ru, rz; bit 2: MXCSR.RC

Run on AMD Zen 5 (EPYC 9645): 16 cases.

Register forms
for i in range(VL // 32):
    if k1[i]:  # 1 without a write mask
        a = zmm2.f32[i]
        ymm1.f16[i] = to_f16(a, imm8)
    elif zeroing:
        ymm1.f16[i] = 0
    # else: ymm1.f16[i] keeps its value
for i in range(VL // 32, 8):
    ymm1.w[i] = 0
# {sae}: no exception flags
# imm8[1:0]: rn, rd, ru, rz; bit 2: MXCSR.RC
# ymm1 is zeroed from bit 128 (xmm) or 256 (ymm) up

Run on AMD Zen 5 (EPYC 9645): 37 cases.

Operands

What each form reads and writes, as Intel XED records it: the operands of its syntax, in order, and the implicit ones that the syntax does not name. How to read.
OperandKindAction
VCVTPS2PH xmm/m64, xmm, imm8 VCVTPS2PH xmm/m128, ymm, imm8
xmm/m64/128explicitwrite
xmm, ymmexplicitread
imm8explicitread
VCVTPS2PH xmm/m64 {k}{z}, xmm, imm8 VCVTPS2PH xmm/m128 {k}{z}, ymm, imm8 VCVTPS2PH ymm/m256 {k}{z}, zmm, imm8, {sae}
xmm/m64, xmm/m128, ymm/m256explicitwrite (masked)
{k}explicitread (write mask)
xmm, ymm, zmmexplicitread
imm8explicitread

Flags

None: XED records no flag that the forms test or change.

Exceptions

The exception class is XED's name for the set of exception conditions that a form follows. How to read.

VEX forms
avx-type-11
EVEX forms
AVX512-E11

Attributes

What else XED records about the forms. How to read.

All forms
follows MXCSR
EVEX forms
write masking
EVEX memory forms
memory fault suppression

Intrinsics

The C intrinsics of Clang 23.1.2 that compile to VCVTPS2PH, 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.

IntrinsicCompiles to
_mm_cvtps_ph __m128i _mm_cvtps_ph(__m128 a, const int imm)

VCVTPS2PH xmm, xmm, imm8 VEX.128 -mf16c

_mm_mask_cvt_roundps_ph __m128i _mm_mask_cvt_roundps_ph(__m128i W, __mmask8 U, __m128 A, const int I)

VCVTPS2PH xmm {k}, xmm, imm8 EVEX.128 -mavx512vl

_mm_maskz_cvt_roundps_ph __m128i _mm_maskz_cvt_roundps_ph(__mmask8 U, __m128 A, const int I)

VCVTPS2PH xmm {k}{z}, xmm, imm8 EVEX.128 -mavx512vl

_mm256_cvtps_ph __m128i _mm256_cvtps_ph(__m256 a, const int imm)

VCVTPS2PH xmm, ymm, imm8 VEX.256 -mf16c

_mm256_mask_cvt_roundps_ph __m128i _mm256_mask_cvt_roundps_ph(__m128i W, __mmask8 U, __m256 A, const int I)

VCVTPS2PH xmm {k}, ymm, imm8 EVEX.256 -mavx512vl

_mm256_maskz_cvt_roundps_ph __m128i _mm256_maskz_cvt_roundps_ph(__mmask8 U, __m256 A, const int I)

VCVTPS2PH xmm {k}{z}, ymm, imm8 EVEX.256 -mavx512vl

_mm512_cvt_roundps_ph __m256i _mm512_cvt_roundps_ph(__m512 A, const int I)

VCVTPS2PH ymm, zmm, imm8 EVEX.512 -mavx512f

_mm512_mask_cvt_roundps_ph __m256i _mm512_mask_cvt_roundps_ph(__m256i U, __mmask16 W, __m512 A, const int I)

VCVTPS2PH ymm {k}, zmm, imm8 EVEX.512 -mavx512f

_mm512_maskz_cvt_roundps_ph __m256i _mm512_maskz_cvt_roundps_ph(__mmask16 W, __m512 A, const int I)

VCVTPS2PH ymm {k}{z}, zmm, imm8 EVEX.512 -mavx512f

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.

CPUID requirements and processors of the XED ISA sets above. Alternatives are separated by “or”; processors follow XED’s chip model, whose AMD processors end with Zen 2, and the CPU data of this site for Zen 3 to Zen 6.
ISA setCPUIDProcessors
F16C

F16C
CPUID.01H:ECX[29] F16C

Ivy Bridge, Haswell, Broadwell, Skylake, Comet Lake, Cannon Lake, Ice Lake (client), Tiger Lake, Alder Lake, Arrow Lake, Panther Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Sierra Forest, Clearwater Forest, Knights Landing, Knights Mill, Bulldozer, Piledriver, Zen, Zen+, Zen 2, Zen 3, Zen 4, Zen 5, Zen 6

Note: XED gives Bulldozer F16C; GCC enables it from -march=bdver2 (Piledriver) on.

AVX512F_512

AVX10.1
CPUID.(EAX=07H,ECX=1):EDX[19] AVX10
CPUID.(EAX=24H,ECX=0):EBX[7:0] ≥ 1 AVX10 version

or

AVX512F
CPUID.(EAX=07H,ECX=0):EBX[16] AVX512F

Cannon Lake, Ice Lake (client), Tiger Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Knights Landing, Knights Mill, Zen 4, Zen 5, Zen 6
AVX512F_128

AVX10.1
CPUID.(EAX=07H,ECX=1):EDX[19] AVX10
CPUID.(EAX=24H,ECX=0):EBX[7:0] ≥ 1 AVX10 version

or

AVX512F + AVX512VL
CPUID.(EAX=07H,ECX=0):EBX[16] AVX512F
CPUID.(EAX=07H,ECX=0):EBX[31] AVX512VL

Cannon Lake, Ice Lake (client), Tiger Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Zen 4, Zen 5, Zen 6
AVX512F_256
Same as AVX512F_128Same as AVX512F_128

More F16C instructions

More AVX10.1 instructions

All 686 AVX10.1 instructions

Sources

  1. Intel XED v2026.08.23 (commit 0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model.
  2. The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s -march feature sets and AMD’s Processor Programming References, which the page of each processor cites.
  3. 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.
  4. LLVM 23.1.2's x86 scheduling models (commit 85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them.
  5. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2C, page 5-68 (VCVTPS2PH)
  6. Intel Advanced Vector Extensions 10.2 Architecture Specification, revision 7.0 (361050-007, April 2026)
  7. AMD64 Architecture Programmer's Manual, Volume 4: 128-Bit, 256-Bit, and 512-Bit Media Instructions (26568, rev. 3.27, July 2026)
  8. Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 2026)
  9. Software Optimization Guide for the AMD Zen5 Microarchitecture (58455, rev. 1.00, August 2024), Wayback Machine copy of AMD's ZIP

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 and the timings from LLVM's scheduling models, both part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.