Instruction
VPSLLD
Shifts doublewords left by one count from a register or an immediate.
VPSLLD shifts each doubleword left by one shared count, filling with zeros: the VEX and EVEX form of PSLLD, whose page covers the operation, with the count rules PSLLW gives for the family. Even in the YMM and ZMM forms the count is an immediate or the low quadword of an XMM register or of memory, and any count above 31 clears the element. VEX.128 needs AVX and VEX.256 AVX2; the EVEX forms (AVX-512F) add masking, the 512-bit width and, in the immediate form only, a source read from memory, whole or as one broadcast doubleword. Every form writes a separate destination, zeroes it above the vector length and takes memory at any alignment.
On Zen 5, the recorded vpslld ymm0, ymm13, 0x10 shifted all eight
doublewords alike, 7FFFFFFFh becoming FFFF0000h in either 128-bit lane;
vpslld ymm7, ymm11, xmm7, with a count of 33, cleared all eight; and
vpslld zmm9{k5}, dword bcst [mem], 3 wrote 0, from 80000000h, into
the nine elements k5 selects and kept the other seven.
In compiled code
In our builds at -O2 over uint32_t arrays, b[i] << 3 is VPSLLD by
3 with -march=x86-64-v3 in GCC 14 and Clang 23; with
-march=x86-64-v4 both shift straight from memory, which only EVEX
can. For b[i] << n, GCC moves n into an XMM register for VPSLLD,
while Clang broadcasts it for VPSLLVD. A rotate by 7
is VPSLLD, VPSRLD and VPOR at -v3, one
VPROLD at -v4. c[i] ? b[i] << 3 : b[i] shifts
and blends at -v3; at -v4 both mask the shift itself.
Intel’s optimization manual compares masking with blending on a VPSLLD and a VPSRLD: merge-masked into one register, they wait for each other, and computing both and merging once was faster (Section 17.2.3; see the guide). AMD’s latency spreadsheet for Zen 5 gives the EVEX immediate form one cycle on pipes FP2 and FP3 and the count from a register two cycles on FP0 and FP1, the figure its single row for the VEX forms gives them all.
Forms
| Instruction | Encoding | Requires |
|---|---|---|
VPSLLD xmm, xmm, m128
VPSLLD_XMMdq_XMMdq_MEMdq | VEX.128.66.0F.WIG F2 /r | AVX |
VPSLLD xmm, xmm, xmm
VPSLLD_XMMdq_XMMdq_XMMdq | VEX.128.66.0F.WIG F2 /r | AVX |
VPSLLD xmm, xmm, imm8
VPSLLD_XMMdq_XMMdq_IMMb | VEX.128.66.0F.WIG 72 /6 ib | AVX |
VPSLLD ymm, ymm, m128
VPSLLD_YMMqq_YMMqq_MEMdq | VEX.256.66.0F.WIG F2 /r | AVX2 |
VPSLLD ymm, ymm, xmm
VPSLLD_YMMqq_YMMqq_XMMq | VEX.256.66.0F.WIG F2 /r | AVX2 |
VPSLLD ymm, ymm, imm8
VPSLLD_YMMqq_YMMqq_IMMb | VEX.256.66.0F.WIG 72 /6 ib | AVX2 |
VPSLLD zmm {k}{z}, zmm, xmm
VPSLLD_ZMMu32_MASKmskw_ZMMu32_XMMu32_AVX512 | EVEX.512.66.0F.W0 F2 /r | AVX10.1 or AVX512F |
VPSLLD zmm {k}{z}, zmm, m128
VPSLLD_ZMMu32_MASKmskw_ZMMu32_MEMu32_AVX512 | EVEX.512.66.0F.W0 F2 /r | AVX10.1 or AVX512F |
VPSLLD zmm {k}{z}, zmm, imm8
VPSLLD_ZMMu32_MASKmskw_ZMMu32_IMM8_AVX512 | EVEX.512.66.0F.W0 72 /6 ib | AVX10.1 or AVX512F |
VPSLLD zmm {k}{z}, m512/m32bcst, imm8
VPSLLD_ZMMu32_MASKmskw_MEMu32_IMM8_AVX512 | EVEX.512.66.0F.W0 72 /6 ib | AVX10.1 or AVX512F |
VPSLLD xmm {k}{z}, xmm, imm8
VPSLLD_XMMu32_MASKmskw_XMMu32_IMM8_AVX512 | EVEX.128.66.0F.W0 72 /6 ib | AVX10.1 or AVX512F + AVX512VL |
VPSLLD xmm {k}{z}, m128/m32bcst, imm8
VPSLLD_XMMu32_MASKmskw_MEMu32_IMM8_AVX512 | EVEX.128.66.0F.W0 72 /6 ib | AVX10.1 or AVX512F + AVX512VL |
VPSLLD xmm {k}{z}, xmm, xmm
VPSLLD_XMMu32_MASKmskw_XMMu32_XMMu32_AVX512 | EVEX.128.66.0F.W0 F2 /r | AVX10.1 or AVX512F + AVX512VL |
VPSLLD xmm {k}{z}, xmm, m128
VPSLLD_XMMu32_MASKmskw_XMMu32_MEMu32_AVX512 | EVEX.128.66.0F.W0 F2 /r | AVX10.1 or AVX512F + AVX512VL |
VPSLLD ymm {k}{z}, ymm, imm8
VPSLLD_YMMu32_MASKmskw_YMMu32_IMM8_AVX512 | EVEX.256.66.0F.W0 72 /6 ib | AVX10.1 or AVX512F + AVX512VL |
VPSLLD ymm {k}{z}, m256/m32bcst, imm8
VPSLLD_YMMu32_MASKmskw_MEMu32_IMM8_AVX512 | EVEX.256.66.0F.W0 72 /6 ib | AVX10.1 or AVX512F + AVX512VL |
VPSLLD ymm {k}{z}, ymm, xmm
VPSLLD_YMMu32_MASKmskw_YMMu32_XMMu32_AVX512 | EVEX.256.66.0F.W0 F2 /r | AVX10.1 or AVX512F + AVX512VL |
VPSLLD ymm {k}{z}, ymm, m128
VPSLLD_YMMu32_MASKmskw_YMMu32_MEMu32_AVX512 | EVEX.256.66.0F.W0 F2 /r | AVX10.1 or AVX512F + AVX512VL |
Latency and throughput
| Model | xmm, xmm, m128xmm {k}{z}, xmm, m128 | xmm, xmm, xmmxmm {k}{z}, xmm, xmm | xmm, xmm, imm8 | ymm, ymm, m128ymm {k}{z}, m256/m32bcst, imm8ymm {k}{z}, ymm, m128 | ymm, ymm, xmmymm {k}{z}, ymm, xmm | ymm, ymm, imm8 | zmm {k}{z}, zmm, xmm | zmm {k}{z}, zmm, m128zmm {k}{z}, m512/m32bcst, imm8 | zmm {k}{z}, zmm, imm8 | xmm {k}{z}, xmm, imm8ymm {k}{z}, ymm, imm8 | xmm {k}{z}, m128/m32bcst, imm8 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Sandy Bridge | 8 / 1p015 | 2 / 1p015 | 1 / 1p0 | ||||||||
| Haswell | 8 / 1p0 | 2 / 1p05 | 1 / 1p0 | 8 / 1p0 | 4 / 1p05 | 1 / 1p0 | |||||
| Broadwell | 7 / 1p0 | 2 / 1p05 | 1 / 1p0 | 7 / 1p0 | 4 / 1p05 | 1 / 1p0 | |||||
| Skylake | 7 / 0.5p01 | 2 / 1p015 | 1 / 0.5p01 | 8 / 0.5p01 | 4 / 1p015 | 1 / 0.5p01 | |||||
| Skylake-SP | 7 / 0.5p01 | 2 / 1p015 | 1 / 0.5p01 | 8 / 0.5p01 | 4 / 1p015 | 1 / 0.5p01 | 4 / 1p05 | 8 / 1p0 | 1 / 1p0 | 1 / 0.5p01 | 7 / 0.5p01 |
| Ice Lake | 7 / 0.5p01 | 2 / 0.67p015 | 1 / 0.5p01 | 8 / 0.5p01 | 4 / 1p015 | 1 / 0.5p01 | 4 / 1p05 | 8 / 1p0 | 1 / 1p0 | 1 / 0.5p01 | 7 / 0.5p01 |
| Alder Lake | 8 / 0.5p01 | 2 / 0.67p015 | 1 / 0.5p01 | 9 / 0.5p01 | 4 / 1p015 | 1 / 0.5p01 | |||||
| Sapphire Rapids | 8 / 0.5p01 | 2 / 0.67p015 | 1 / 0.5p01 | 9 / 0.5p01 | 4 / 1p015 | 1 / 0.5p01 | 4 / 1p05 | 9 / 1p0 | 1 / 1p0 | 1 / 0.5p01 | 8 / 0.5p01 |
| Lunar Lake | 8 / 0.5V0 V1 | 2 / 0.5V0 V1 V2 V3 | 1 / 0.5V0 V1 | 9 / 2.33V0 V1 | 4 / 0.5V0 V1 V2 V3 | 1 / 0.5V0 V1 | |||||
| Piledriver | 8 / 1.5FPU1 FPXBR | 3 / 1FPU1 FPXBR | 2 / 1FPU1 FPXBR | ||||||||
| Zen | 8 / 1FPU2 | 1 / 1FPU2 | 1 / 1FPU2 | 8 / 2FPU2 | 1 / 2FPU2 | 1 / 2FPU2 | |||||
| Zen 2 | 8 / 1FPU2 | 1 / 1FPU2 | 1 / 1FPU2 | 8 / 1FPU2 | 1 / 1FPU2 | 1 / 1FPU2 | |||||
| Zen 3 | 8 / 0.5FP1 FP2 | 1 / 0.5FP1 FP2 | 1 / 0.5FP1 FP2 | 8 / 0.5FP1 FP2 | 1 / 0.5FP1 FP2 | 1 / 0.5FP1 FP2 | |||||
| Zen 4 | 9 / 1FP1 FP2 | 2 / 11FP0 FP1 | 1 / 0.5FP1 FP2 | 8 / 0.5FP1 FP2 | 2 / 12FP0 FP1 | 1 / 0.5FP1 FP2 | 2 / 1FP0 FP1 | 8 / 1FP1 FP2 | 1 / 0.5FP0 FP1 | 1 / 0.5FP0 FP1 | 8 / 0.5FP1 FP2 |
| Jaguar | 7 / 1FPU0 FPU1 VALU0 VALU1 | 2 / 0.5FPU0 FPU1 VALU0 VALU1 | 2 / 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.
VPSLLD xmm, xmm, xmm/m128 VPSLLD ymm, ymm, xmm/m128 VPSLLD xmm {k}{z}, xmm, xmm/m128 VPSLLD ymm {k}{z}, ymm, xmm/m128 VPSLLD zmm {k}{z}, zmm, xmm/m128Every doubleword works alike: 4, 8 and 16 doublewords in the xmm, ymm and zmm forms. The EVEX forms write under a mask: where its bit is 0, the element keeps its old value, or zeroes it with {z}.
Result doubleword i comes from doubleword i of xmm2 and the count in xmm3. Result doublewords 3 to 0: r3, unchanged (bit 2 of k1 is 0), r1, r0.
VPSLLD xmm, xmm, imm8 VPSLLD ymm, ymm, imm8 VPSLLD xmm {k}{z}, xmm/m128/m32bcst, imm8 VPSLLD ymm {k}{z}, ymm/m256/m32bcst, imm8 VPSLLD zmm {k}{z}, zmm/m512/m32bcst, imm8Every doubleword works alike: 4, 8 and 16 doublewords in the xmm, ymm and zmm forms. The EVEX forms write under a mask: where its bit is 0, the element keeps its old value, or zeroes it with {z}. With m32bcst, one doubleword from memory stands for every element of the last source.
Result doubleword i comes from doubleword i of xmm2. Result doublewords 3 to 0: r3, unchanged (bit 2 of k1 is 0), r1, r0.
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
VPSLLD xmm, xmm, xmm/m128 VPSLLD ymm, ymm, xmm/m128 VPSLLD xmm {k}{z}, xmm, xmm/m128 VPSLLD ymm {k}{z}, ymm, xmm/m128 VPSLLD zmm {k}{z}, zmm, xmm/m128count = src3.q[0]
for i in range(VL // 32):
if k1[i]: # 1 without a write mask
a = zmm2.d[i]
if count < 32:
zmm1.d[i] = a << count
else:
zmm1.d[i] = 0
elif zeroing:
zmm1.d[i] = 0
# else: zmm1.d[i] keeps its value
# zmm1 is zeroed from bit VL upRun on AMD Zen 5 (EPYC 9645): 10 cases.
VPSLLD xmm, xmm, imm8 VPSLLD ymm, ymm, imm8 VPSLLD xmm {k}{z}, xmm/m128/m32bcst, imm8 VPSLLD ymm {k}{z}, ymm/m256/m32bcst, imm8 VPSLLD zmm {k}{z}, zmm/m512/m32bcst, imm8for i in range(VL // 32):
if k1[i]: # 1 without a write mask
a = src2.d[i]
if imm8 < 32:
zmm1.d[i] = a << imm8
else:
zmm1.d[i] = 0
elif zeroing:
zmm1.d[i] = 0
# else: zmm1.d[i] keeps its value
# m32bcst: src2.d[i] is the m32 for every i
# zmm1 is zeroed from bit VL upRun on AMD Zen 5 (EPYC 9645): 8 cases.
Operands
| Operand | Kind | Action |
|---|---|---|
VPSLLD xmm, xmm, xmm/m128 VPSLLD ymm, ymm, xmm/m128 | ||
xmm, ymm | explicit | write |
xmm, ymm | explicit | read |
xmm/m128 | explicit | read |
VPSLLD xmm, xmm, imm8 VPSLLD ymm, ymm, imm8 | ||
xmm, ymm | explicit | write |
xmm, ymm | explicit | read |
imm8 | explicit | read |
VPSLLD xmm {k}{z}, xmm, xmm/m128 VPSLLD ymm {k}{z}, ymm, xmm/m128 VPSLLD zmm {k}{z}, zmm, xmm/m128 | ||
xmm, ymm, zmm | explicit | write (masked) |
{k} | explicit | read (write mask) |
xmm, ymm, zmm | explicit | read |
xmm/m128 | explicit | read |
VPSLLD xmm {k}{z}, xmm/m128/m32bcst, imm8 VPSLLD ymm {k}{z}, ymm/m256/m32bcst, imm8 VPSLLD zmm {k}{z}, zmm/m512/m32bcst, imm8 | ||
xmm, ymm, zmm | explicit | write (masked) |
{k} | explicit | read (write mask) |
xmm/m128/m32bcst, ymm/m256/m32bcst, zmm/m512/m32bcst | explicit | read |
imm8 | 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.
VPSLLD xmm, xmm, xmm/m128VPSLLD xmm, xmm, imm8VPSLLD ymm, ymm, imm8avx-type-7VPSLLD ymm, ymm, xmm/m128avx-type-4VPSLLD xmm {k}{z}, xmm, xmm/m128VPSLLD ymm {k}{z}, ymm, xmm/m128VPSLLD zmm {k}{z}, zmm, xmm/m128AVX512-E4NFVPSLLD xmm {k}{z}, xmm/m128/m32bcst, imm8VPSLLD ymm {k}{z}, ymm/m256/m32bcst, imm8VPSLLD zmm {k}{z}, zmm/m512/m32bcst, imm8AVX512-E4
Attributes
What else XED records about the forms. How to read.
- EVEX forms
- write masking
VPSLLD xmm {k}{z}, m128/m32bcst, imm8VPSLLD ymm {k}{z}, m256/m32bcst, imm8VPSLLD zmm {k}{z}, m512/m32bcst, imm8- embedded broadcast (tuple Full); memory fault suppression
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to VPSLLD, 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_sll_epi32
__m128i _mm_sll_epi32(__m128i __a, __m128i __count) |
|
_mm_slli_epi32
__m128i _mm_slli_epi32(__m128i __a, int __count) |
|
_mm_mask_sll_epi32
__m128i _mm_mask_sll_epi32(__m128i __W, __mmask8 __U, __m128i __A, __m128i __B) |
|
_mm_mask_slli_epi32
__m128i _mm_mask_slli_epi32(__m128i __W, __mmask8 __U, __m128i __A, unsigned int __B) |
|
_mm_maskz_sll_epi32
__m128i _mm_maskz_sll_epi32(__mmask8 __U, __m128i __A, __m128i __B) |
|
_mm_maskz_slli_epi32
__m128i _mm_maskz_slli_epi32(__mmask8 __U, __m128i __A, unsigned int __B) |
|
_mm256_sll_epi32
__m256i _mm256_sll_epi32(__m256i __a, __m128i __count) |
|
_mm256_slli_epi32
__m256i _mm256_slli_epi32(__m256i __a, int __count) |
|
_mm256_mask_sll_epi32
__m256i _mm256_mask_sll_epi32(__m256i __W, __mmask8 __U, __m256i __A, __m128i __B) |
|
_mm256_mask_slli_epi32
__m256i _mm256_mask_slli_epi32(__m256i __W, __mmask8 __U, __m256i __A, unsigned int __B) |
|
_mm256_maskz_sll_epi32
__m256i _mm256_maskz_sll_epi32(__mmask8 __U, __m256i __A, __m128i __B) |
|
_mm256_maskz_slli_epi32
__m256i _mm256_maskz_slli_epi32(__mmask8 __U, __m256i __A, unsigned int __B) |
|
_mm512_sll_epi32
__m512i _mm512_sll_epi32(__m512i __A, __m128i __B) |
|
_mm512_slli_epi32
__m512i _mm512_slli_epi32(__m512i __A, unsigned int __B) |
|
_mm512_mask_sll_epi32
__m512i _mm512_mask_sll_epi32(__m512i __W, __mmask16 __U, __m512i __A, __m128i __B) |
|
_mm512_mask_slli_epi32
__m512i _mm512_mask_slli_epi32(__m512i __W, __mmask16 __U, __m512i __A, unsigned int __B) |
|
_mm512_maskz_sll_epi32
__m512i _mm512_maskz_sll_epi32(__mmask16 __U, __m512i __A, __m128i __B) |
|
_mm512_maskz_slli_epi32
__m512i _mm512_maskz_slli_epi32(__mmask16 __U, __m512i __A, unsigned int __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.
More AVX instructions
- VPMOVZXBW
- VPMOVZXDQ
- VPMOVZXWD
- VPMOVZXWQ
- VPMULDQ
- VPMULHRSW
- VPMULHUW
- VPMULHW
- VPMULLD
- VPMULLW
- VPMULUDQ
- VPOR
- VPSADBW
- VPSHUFB
- VPSHUFD
- VPSHUFHW
- VPSHUFLW
- VPSIGNB
- VPSIGND
- VPSIGNW
- VPSLLDQ
- VPSLLQ
- VPSLLW
- VPSRAD
- VPSRAW
- VPSRLD
- VPSRLDQ
- VPSRLQ
- VPSRLW
- VPSUBB
- VPSUBD
- VPSUBQ
- VPSUBSB
- VPSUBSW
- VPSUBUSB
- VPSUBUSW
- VPSUBW
- VPTEST
- VPUNPCKHBW
- VPUNPCKHDQ
More AVX2 instructions
- VPMOVZXBW
- VPMOVZXDQ
- VPMOVZXWD
- VPMOVZXWQ
- VPMULDQ
- VPMULHRSW
- VPMULHUW
- VPMULHW
- VPMULLD
- VPMULLW
- VPMULUDQ
- VPOR
- VPSADBW
- VPSHUFB
- VPSHUFD
- VPSHUFHW
- VPSHUFLW
- VPSIGNB
- VPSIGND
- VPSIGNW
- VPSLLDQ
- VPSLLQ
- VPSLLVD
- VPSLLVQ
- VPSLLW
- VPSRAD
- VPSRAVD
- VPSRAW
- VPSRLD
- VPSRLDQ
- VPSRLQ
- VPSRLVD
- VPSRLVQ
- VPSRLW
- VPSUBB
- VPSUBD
- VPSUBQ
- VPSUBSB
- VPSUBSW
- VPSUBUSB
More AVX10.1 instructions
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-443 (PSLLW/
PSLLD/ PSLLQ) - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1 (253665-093, September 2026)
- Intel Advanced Vector Extensions 10.2 Architecture Specification, revision 7.0 (361050-007, April 2026)
- Intel 64 and IA-32 Architectures Optimization Reference Manual, Volume 1 (248966-051, October 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.