Extensions
Forms
2 (2 VEX)
Data
Intel XED v2026.08.23

VPHMINPOSUW is the VEX encoding of SSE4.1’s PHMINPOSUW, whose page covers the search: the smallest of eight unsigned words lands in word 0 and its index in word 1, the lowest index winning a tie. Unlike most VEX forms it adds no operand and no width. It keeps a single source, both vendors’ manuals raise #UD unless VEX.vvvv is 1111b and VEX.L is 0, and neither AVX2 nor AVX-512 gave it a 256- or 512-bit form or an EVEX encoding. What changes is around the result: the memory operand needs no alignment, and the register is cleared above bit 127.

On Zen 5, the recorded vphminposuw xmm1, xmm2 found zeros in words 3 and 4 and returned 0 with index 3; vphminposuw xmm8, xmmword ptr [mem], with zeros in words 1 and 3, returned index 1. Both cleared everything above the index, up to bit 511 of the ZMM register.

Wider reductions

With only 128 bits, a wider minimum folds down first. In our builds at -O2 over a fixed-size uint16_t array, GCC 14 at -march=x86-64-v3 keeps a running VPMINUW in a ymm register, folds its upper lane onto the lower with VEXTRACTI128 and one more VPMINUW, and finishes with VPHMINPOSUW; at -v4 it runs the loop on zmm registers and folds twice. Clang 23 ends the same way at both levels, on ymm registers, and also bends the unsigned maximum, the signed minimum and the byte minimum to fit, as PHMINPOSUW’s page describes; at -v4 its inversion for the maximum is one VPTERNLOGQ. GCC finishes those three with VPSRLDQ halvings instead. Neither returns the index: a loop that tracks the position of the minimum stays scalar.

AMD’s latency spreadsheet for Zen 5 gives the VEX row one macro-op with a latency of 3 cycles, two per cycle, as for the legacy form.

Forms

Every encoding of VPHMINPOSUW that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
VPHMINPOSUW xmm, m128 VPHMINPOSUW_XMMdq_MEMdqVEX.128.66.0F38.WIG 41 /rAVX
VPHMINPOSUW xmm, xmm VPHMINPOSUW_XMMdq_XMMdqVEX.128.66.0F38.WIG 41 /rAVX

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.
Modelxmm, m128xmm, xmm
Sandy Bridge, Haswell11 / 1p05 / 1p0
Broadwell10 / 1p05 / 1p0
Skylake, Skylake-SP, Ice Lake10 / 1p04 / 1p0
Alder Lake, Sapphire Rapids11 / 1p04 / 1p0
Lunar Lake11 / 0.5V0 V15 / 0.5V0 V1
Piledriver9 / 1.5FPMAL FPU04 / 1FPMAL FPU0
Zen, Zen 211 / 1FPU04 / 1FPU0
Zen 3, Zen 410 / 0.5FP0 FP13 / 0.5FP0 FP1
Jaguar7 / 1FPU0 FPU1 VALU0 VALU12 / 0.5FPU0 FPU1 VALU0 VALU1

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 smallest unsigned word goes to word 0 of the result, its index to word 1 (the lowest index if several are equal), and the other words are cleared.
VPHMINPOSUW: the smallest word and its indexResult words 0 and 1 depend on all eight words of the source; words 7 to 2 are 0. Result words 7 to 0: 0, 0, 0, 0, 0, 0, index, min.01234567xmm2or m128aminindex000000xmm1

Result words 0 and 1 depend on all eight words of the source; words 7 to 2 are 0. Result words 7 to 0: 0, 0, 0, 0, 0, 0, index, min.

Operation

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

m = src2.w[0]
x = 0
for i in range(1, 8):
    if src2.w[i] < m:    # the first of equal words stays
        m = src2.w[i]
        x = i
xmm1.write(x << 16 | m)  # words 7 to 2 are zeroed
# xmm1 is zeroed from bit 128 up

Run on AMD Zen 5 (EPYC 9645): 2 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
VPHMINPOSUW xmm, xmm/m128
xmmexplicitwrite
xmm/m128explicitread

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.

All forms
avx-type-4

Intrinsics

The C intrinsics of Clang 23.1.2 that compile to VPHMINPOSUW, 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_minpos_epu16 __m128i _mm_minpos_epu16(__m128i __V)

VPHMINPOSUW xmm, xmm VEX.128 -mavxwith AVX enabled

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.

More AVX instructions

All 253 AVX 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 2B, page 4-298 (PHMINPOSUW)
  6. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 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. 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.