Instruction
VPSHUFHW
Rearranges the upper four words of each 128-bit lane as an immediate selects.
- Extensions
- Forms
- 10 (4 VEX, 6 EVEX)
- Data
- Intel XED v2026.08.23
Forms
| Instruction | Encoding | Requires |
|---|---|---|
VPSHUFHW xmm, m128, imm8
VPSHUFHW_XMMdq_MEMdq_IMMb | VEX.128.F3.0F.WIG 70 /r ib | AVX |
VPSHUFHW xmm, xmm, imm8
VPSHUFHW_XMMdq_XMMdq_IMMb | VEX.128.F3.0F.WIG 70 /r ib | AVX |
VPSHUFHW ymm, m256, imm8
VPSHUFHW_YMMqq_MEMqq_IMMb | VEX.256.F3.0F.WIG 70 /r ib | AVX2 |
VPSHUFHW ymm, ymm, imm8
VPSHUFHW_YMMqq_YMMqq_IMMb | VEX.256.F3.0F.WIG 70 /r ib | AVX2 |
VPSHUFHW xmm {k}{z}, xmm, imm8
VPSHUFHW_XMMu16_MASKmskw_XMMu16_IMM8_AVX512 | EVEX.128.F3.0F.WIG 70 /r ib | AVX10.1 or AVX512BW + AVX512VL |
VPSHUFHW xmm {k}{z}, m128, imm8
VPSHUFHW_XMMu16_MASKmskw_MEMu16_IMM8_AVX512 | EVEX.128.F3.0F.WIG 70 /r ib | AVX10.1 or AVX512BW + AVX512VL |
VPSHUFHW ymm {k}{z}, ymm, imm8
VPSHUFHW_YMMu16_MASKmskw_YMMu16_IMM8_AVX512 | EVEX.256.F3.0F.WIG 70 /r ib | AVX10.1 or AVX512BW + AVX512VL |
VPSHUFHW ymm {k}{z}, m256, imm8
VPSHUFHW_YMMu16_MASKmskw_MEMu16_IMM8_AVX512 | EVEX.256.F3.0F.WIG 70 /r ib | AVX10.1 or AVX512BW + AVX512VL |
VPSHUFHW zmm {k}{z}, zmm, imm8
VPSHUFHW_ZMMu16_MASKmskw_ZMMu16_IMM8_AVX512 | EVEX.512.F3.0F.WIG 70 /r ib | AVX10.1 or AVX512BW |
VPSHUFHW zmm {k}{z}, m512, imm8
VPSHUFHW_ZMMu16_MASKmskw_MEMu16_IMM8_AVX512 | EVEX.512.F3.0F.WIG 70 /r ib | AVX10.1 or AVX512BW |
Intrinsics
The C intrinsics of Clang 23.1.2 that compile to VPSHUFHW, 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_shufflehi_epi16
__m128i _mm_shufflehi_epi16(__m128i a, const int imm) |
|
_mm_mask_shufflehi_epi16
__m128i _mm_mask_shufflehi_epi16(__m128i W, __mmask8 U, __m128i A, const int imm) |
|
_mm_maskz_shufflehi_epi16
__m128i _mm_maskz_shufflehi_epi16(__mmask8 U, __m128i A, const int imm) |
|
_mm256_shufflehi_epi16
__m256i _mm256_shufflehi_epi16(__m256i a, const int imm) |
|
_mm256_mask_shufflehi_epi16
__m256i _mm256_mask_shufflehi_epi16(__m256i W, __mmask16 U, __m256i A, const int imm) |
|
_mm256_maskz_shufflehi_epi16
__m256i _mm256_maskz_shufflehi_epi16(__mmask16 U, __m256i A, const int imm) |
|
_mm512_shufflehi_epi16
__m512i _mm512_shufflehi_epi16(__m512i A, const int imm) |
|
_mm512_mask_shufflehi_epi16
__m512i _mm512_mask_shufflehi_epi16(__m512i W, __mmask32 U, __m512i A, const int imm) |
|
_mm512_maskz_shufflehi_epi16
__m512i _mm512_maskz_shufflehi_epi16(__mmask32 U, __m512i A, const int imm) |
|
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 AVX10.1 instructions
- VPSADBW
- VPSCATTERDD
- VPSCATTERDQ
- VPSCATTERQD
- VPSCATTERQQ
- VPSHLDD
- VPSHLDQ
- VPSHLDVD
- VPSHLDVQ
- VPSHLDVW
- VPSHLDW
- VPSHRDD
- VPSHRDQ
- VPSHRDVD
- VPSHRDVQ
- VPSHRDVW
- VPSHRDW
- VPSHUFB
- VPSHUFBITQMB
- VPSHUFD
- VPSHUFLW
- VPSLLD
- VPSLLDQ
- VPSLLQ
- VPSLLVD
- VPSLLVQ
- VPSLLVW
- VPSLLW
- VPSRAD
- VPSRAQ
- VPSRAVD
- VPSRAVQ
- VPSRAVW
- VPSRAW
- VPSRLD
- VPSRLDQ
- VPSRLQ
- VPSRLVD
- VPSRLVQ
- VPSRLVW
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, ISA sets, CPUID bits and chip model. - 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. - Intel Advanced Vector Extensions 10.2 Architecture Specification, revision 6.0 (361050-006, January 2026)
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.