Skip to content

[Headers][X86] Allow SSE2/AVX2/AVX512F/AVX512BW/AVX512DQ integer arithmetic intrinsics to be used in constexpr #152490

@RKSimon

Description

@RKSimon

All of these intrinsics wrap generic implementations which can already be used in constexpr

_mm_add_epi8 _mm_add_epi16 _mm_add_epi32 _mm_add_epi64
_mm_sub_epi8 _mm_sub_epi16 _mm_sub_epi32 _mm_sub_epi64
_mm_mullo_epi32
_mm_cmpeq_epi8 _mm_cmpeq_epi16 _mm_cmpeq_epi32 _mm_cmpeq_epi64
_mm_cmpgt_epi8 _mm_cmpgt_epi16 _mm_cmpgt_epi32 _mm_cmpegt_epi64
_mm_cmplt_epi8 _mm_cmplt_epi16 _mm_cmplt_epi32 _mm_cmplt_epi64

_mm256_add_epi8 _mm256_add_epi16 _mm256_add_epi32 _mm256_add_epi64
_mm256_sub_epi8 _mm256_sub_epi16 _mm256_sub_epi32 _mm256_sub_epi64
_mm256_mullo_epi32
_mm256_cmpeq_epi8 _mm256_cmpeq_epi16 _mm256_cmpeq_epi32 _mm256_cmpeq_epi64
_mm256_cmpgt_epi8 _mm256_cmpgt_epi16 _mm256_cmpgt_epi32 _mm256_cmpegt_epi64

_mm512_add_epi8 _mm512_add_epi16 _mm512_add_epi32 _mm512_add_epi64
_mm512_sub_epi8 _mm512_sub_epi16 _mm512_sub_epi32 _mm512_sub_epi64
_mm512_mullo_epi32
_mm_mullo_epi64 _mm256_mullo_epi64 _mm512_mullo_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