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

VROUNDPS is the VEX form of ROUNDPS, whose page explains the immediate: bits 1:0 pick the direction, bit 2 hands it to MXCSR.RC instead, bit 3 keeps the precision exception quiet, and the C library’s floorf, ceilf, truncf and rintf each map to one value. The VEX form adds a separate destination, 256 bits, memory operands at any alignment and clearing of the bits above the result.

Bit 2 at work

The cases recorded on Zen 5 show the immediate’s bits on halves, where the directions differ most:

  • 2 (up) gave 1, -0, 2, 3 and -2 for 0.5, -0.5, 1.5, 2.5 and -2.5;
  • 8 (to nearest, inexact suppressed) gave 2, 2 and -2 for 1.5, 2.5 and -2.5, ties going to the even neighbour;
  • 0Dh asks for rounding down in bits 1:0, but its bit 2 defers to MXCSR, which was set to round toward zero: -2.5 became -2, not -3, and 0.5 became 0.

No EVEX form

AVX-512 did not give VROUNDPS an EVEX encoding; it rounds with VRNDSCALEPS, whose immediate has the same low four bits and whose upper four bits, when zero, round to a whole number just as VROUNDPS does. So a compiler that targets AVX-512 picks by register: Clang 23 at -O2 vectorizes a loop over floorf to VROUNDPS with immediate 9 on ymm registers for -march=x86-64-v3 and also for x86-64-v4, where it works on ymm, and to VRNDSCALEPS on zmm registers for znver5. GCC 14 keeps that loop scalar unless -fno-trapping-math is given; with it, it emits VROUNDPS on ymm registers for x86-64-v3 and VRNDSCALEPS on zmm for x86-64-v4. Being VEX-only, VROUNDPS cannot reach registers 16 to 31 either.

AMD’s Zen 5 guide lists VROUNDPS, and VRNDSCALEPS at every width, as one macro-op with a latency of 3 cycles.

Forms

Every encoding of VROUNDPS that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
VROUNDPS xmm, m128, imm8 VROUNDPS_XMMdq_MEMdq_IMMbVEX.128.66.0F3A.WIG 08 /r ibAVX
VROUNDPS xmm, xmm, imm8 VROUNDPS_XMMdq_XMMdq_IMMbVEX.128.66.0F3A.WIG 08 /r ibAVX
VROUNDPS ymm, m256, imm8 VROUNDPS_YMMqq_MEMqq_IMMbVEX.256.66.0F3A.WIG 08 /r ibAVX
VROUNDPS ymm, ymm, imm8 VROUNDPS_YMMqq_YMMqq_IMMbVEX.256.66.0F3A.WIG 08 /r ibAVX

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.

Element-wise: each single of the result comes from the single in the same place in each source.
VROUNDPS: element by elementResult single i comes from single i of xmm2. Result singles 3 to 0: r3, r2, r1, r0.0123xmm2or m128ar0r1r2r3xmm1

Every single works alike: 4 and 8 singles in the xmm and ymm forms.

Result single i comes from single i of xmm2. Result singles 3 to 0: r3, r2, r1, r0.

Operation

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

for i in range(VL // 32):
    ymm1.f32[i] = round(src2.f32[i], imm8)
# imm8[1:0]: rn, rd, ru, rz; bit 2: MXCSR.RC; bit 3: no PE
# ymm1 is zeroed from bit VL up

Run on AMD Zen 5 (EPYC 9645): 24 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
VROUNDPS xmm, xmm/m128, imm8 VROUNDPS ymm, ymm/m256, imm8
xmm, ymmexplicitwrite
xmm/m128, ymm/m256explicitread
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.

All forms
avx-type-2

Attributes

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

All forms
follows MXCSR

Intrinsics

The C intrinsics of Clang 23.1.2 that compile to VROUNDPS, 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_ceil_ps __m128 _mm_ceil_ps(__m128 X)

VROUNDPS xmm, xmm, imm8 VEX.128 -mavxwith AVX enabled

_mm_floor_ps __m128 _mm_floor_ps(__m128 X)

VROUNDPS xmm, xmm, imm8 VEX.128 -mavxwith AVX enabled

_mm_round_ps __m128 _mm_round_ps(__m128 X, const int M)

VROUNDPS xmm, xmm, imm8 VEX.128 -mavxwith AVX enabled

_mm_roundscale_ps __m128 _mm_roundscale_ps(__m128 A, const int imm)

VROUNDPS xmm, xmm, imm8 VEX.128 -mavx512vl

_mm256_ceil_ps __m256 _mm256_ceil_ps(__m256 V)

VROUNDPS ymm, ymm, imm8 VEX.256 -mavx

_mm256_floor_ps __m256 _mm256_floor_ps(__m256 V)

VROUNDPS ymm, ymm, imm8 VEX.256 -mavx

_mm256_round_ps __m256 _mm256_round_ps(__m256 V, const int M)

VROUNDPS ymm, ymm, imm8 VEX.256 -mavx

_mm256_roundscale_ps __m256 _mm256_roundscale_ps(__m256 A, const int imm)

VROUNDPS ymm, ymm, imm8 VEX.256 -mavx512vl

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. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2B, page 4-586 (ROUNDPS)
  5. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
  6. 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, part of the LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions. The text is our own.