Instruction
VRSQRTSS
Approximates the reciprocal square root of the low single to within 1.5 times 2^-12; the other elements come from the first source.
- Extensions
- Forms
- 2 (2 VEX)
- Data
- Intel XED v2026.08.23
VRSQRTSS is the VEX form of RSQRTSS: an estimate of 1/sqrt(x) for the low single of its last operand, with singles 1 to 3 copied from the operand before it and the bits above 127 cleared. It needs AVX. The RSQRTSS page gives Intel’s error bound, 1.5 times 2^-12, and Zen 5’s estimates; VRSQRTPS covers the special inputs and the Newton-Raphson step. AVX-512 has no EVEX form of it but VRSQRT14SS, accurate to 2^-14.
Recorded on Zen 5
The VEX cases gave the bits that RSQRTSS’s page lists for the same
inputs: 5EA3B800H for 011C8FFFH from memory, and 1FB50000H for 2^127
with MXCSR at 0. The largest denormal gave +infinity with DAZ set, and
in vrsqrtss xmm8, xmm15, xmm0 singles 1 to 3 came from XMM15, not
from XMM0.
The scalar keeps the old estimate
In our builds at -O2 with -ffast-math, GCC 14 and Clang 23 compile
1.0f / sqrtf(x) to vrsqrtss xmm1, xmm0, xmm0, a VMULSS, a
VFMADD213SS and two more VMULSS: one
Newton-Raphson step, the FMA computing xr^2 - 3. That is the code for
-march=x86-64-v3, x86-64-v4 and znver5 alike, while for
x86-64-v4 GCC vectorizes a loop of the same expression with
VRSQRT14PS on zmm registers. With -mrecip too,
GCC also computes sqrtf(x) from VRSQRTSS, zeroing the estimate for
an input of 0 through VCMPNEQSS and VANDPS, as the
RSQRTSS page describes; Clang keeps VSQRTSS.
AMD’s latency spreadsheet for Zen 5 gives VRSQRTSS 4 cycles on pipes FP1 and FP2, against 14 for VSQRTSS. VRCPSS estimates 1/x.
Forms
Latency and throughput
| Model | xmm, xmm, m32 | xmm, xmm, xmm |
|---|---|---|
| Sandy Bridge | 11 / 1p0 | 5 / 1p0 |
| Haswell, Broadwell | 10 / 1p0 | 5 / 1p0 |
| Skylake, Skylake-SP, Ice Lake | 9 / 1p0 | 4 / 1p0 |
| Alder Lake, Sapphire Rapids | 11 / 1p0 | 4 / 1p0 |
| Lunar Lake | 10 / 2V0 V1 | 4 / 2V0 V1 |
| Piledriver | 10 / 1.5FPFMA FPU1 | 5 / 1FPFMA FPU1 |
| Zen, Zen 2 | 12 / 0.5FPU0 FPU1 | 5 / 0.5FPU0 FPU1 |
| Zen 3 | 10 / 1FP1 | 3 / 1FP1 |
| Zen 4 | 11 / 1FP1 | 4 / 11FP1 |
| Jaguar | 7 / 1FPM FPU1 | 2 / 1FPM FPU1 |
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.
Result single 0 is computed from single 0 of xmm3; singles 3 to 1 are those of xmm2. Result singles 3 to 0: a3, a2, a1, r0.
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
xmm1.f32[0] = rsqrt(src3.f32[0])
for i in range(1, 4):
xmm1.d[i] = xmm2.d[i]
# rsqrt: 1/sqrt(a) within 1.5 * 2^-12; Zen 5's 3
# recorded results: 1.0595 * 2^-12 at most
# a denormal is a zero, whatever MXCSR says; a < 0: the
# indefinite; no flags
# xmm1 is zeroed from bit 128 upRun on AMD Zen 5 (EPYC 9645): 4 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
VRSQRTSS xmm, xmm, xmm/m32 | ||
xmm | explicit | write |
xmm | explicit | read |
xmm/m32 | explicit | read |
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-5
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to VRSQRTSS, 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_rsqrt_ss
__m128 _mm_rsqrt_ss(__m128 __a) |
|
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 |
|---|---|---|
AVX | AVX | Sandy Bridge, 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 |
More AVX instructions
- VPSUBUSB
- VPSUBUSW
- VPSUBW
- VPTEST
- VPUNPCKHBW
- VPUNPCKHDQ
- VPUNPCKHQDQ
- VPUNPCKHWD
- VPUNPCKLBW
- VPUNPCKLDQ
- VPUNPCKLQDQ
- VPUNPCKLWD
- VPXOR
- VRCPPS
- VRCPSS
- VROUNDPD
- VROUNDPS
- VROUNDSD
- VROUNDSS
- VRSQRTPS
- VSHUFPD
- VSHUFPS
- VSQRTPD
- VSQRTPS
- VSQRTSD
- VSQRTSS
- VSTMXCSR
- VSUBPD
- VSUBPS
- VSUBSD
- VSUBSS
- VTESTPD
- VTESTPS
- VUCOMISD
- VUCOMISS
- VUNPCKHPD
- VUNPCKHPS
- VUNPCKLPD
- VUNPCKLPS
- VXORPD
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model. - The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s
-marchfeature sets and AMD’s Processor Programming References, which the page of each processor cites. - 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. - LLVM 23.1.2's x86 scheduling models (commit
85ac56026243): the latency, reciprocal throughput and ports of each form, as llvm-mca reports them. - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2B, page 4-596 (RSQRTSS)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
- 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.