Skip to content

[Headers][X86] Allow SSE41/AVX2/AVX512F/AVX512BW integer extension intrinsics to be used in constexpr #152315

@RKSimon

Description

@RKSimon

All of these intrinsics wrap __builtin_convertvector/__builtin_shufflevector which can already be used in constexpr

_mm_cvtepi8_epi16   _mm_cvtepu8_epi16
_mm_cvtepi8_epi32   _mm_cvtepu8_epi32
_mm_cvtepi8_epi64   _mm_cvtepu8_epi64
_mm_cvtepi16_epi32  _mm_cvtepu16_epi32
_mm_cvtepi16_epi64  _mm_cvtepu16_epi64
_mm_cvtepi32_epi64  _mm_cvtepu32_epi64

_mm256_cvtepi8_epi16   _mm256_cvtepu8_epi16
_mm256_cvtepi8_epi32   _mm256_cvtepu8_epi32
_mm256_cvtepi8_epi64   _mm256_cvtepu8_epi64
_mm256_cvtepi16_epi32  _mm256_cvtepu16_epi32
_mm256_cvtepi16_epi64  _mm256_cvtepu16_epi64
_mm256_cvtepi32_epi64  _mm256_cvtepu32_epi64

_mm512_cvtepi8_epi16   _mm512_cvtepu8_epi16
_mm512_cvtepi8_epi32   _mm512_cvtepu8_epi32
_mm512_cvtepi8_epi64   _mm512_cvtepu8_epi64
_mm512_cvtepi16_epi32  _mm512_cvtepu16_epi32
_mm512_cvtepi16_epi64  _mm512_cvtepu16_epi64
_mm512_cvtepi32_epi64  _mm512_cvtepu32_epi64

(ignore the AVX512 mask/maskz variants for now)

You can use #152296 for reference

Metadata

Metadata

Assignees

Labels

backend:X86clang:headersHeaders provided by Clang, e.g. for intrinsicsconstexprAnything related to constant evaluationgood first issuehttps://github.com/llvm/llvm-project/contribute

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions