Skip to content

[Headers][X86] VectorExprEvaluator::VisitCallExpr - allow SSE/AVX2/AVX512 pack intrinsics to be used in constexpr #154283

@RKSimon

Description

@RKSimon

Handle the saturated truncation intrinsics inside VectorExprEvaluator::VisitCallExpr and add constexpr test coverage, similar to #152524

_mm_packs_epi16  _mm256_packs_epi16  _mm512_packs_epi16  _mm_packs_pi16
_mm_packs_epi32  _mm256_packs_epi32  _mm512_packs_epi32  _mm_packs_pi32

_mm_packus_epi16 _mm256_packus_epi16 _mm512_packus_epi16 _mm_packs_pu16
_mm_packus_epi32 _mm256_packus_epi32 _mm512_packus_epi32

(plus the AVX512BW mask/maskz variants)

Note that these are slightly more complex than regular elementwise intrinsics as the 2 operands are packed together at the 128-bit level.

Metadata

Metadata

Assignees

Labels

backend:X86clang:frontendLanguage frontend issues, e.g. anything involving "Sema"clang: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