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

_mm256_add_epi8 _mm256_add_epi16 _mm256_add_epi32 _mm256_add_epi64
_mm256_sub_epi8 _mm256_sub_epi16 _mm256_sub_epi32 _mm256_sub_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

(and avx512 mask/maskz variants)

You can use #152296 for reference

Metadata

Metadata

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