Issue 152506
Summary [Headers][X86] Allow SSE2/AVX2/AVX512BW integer saturated arithmetic intrinsics to be used in constexpr
Labels good first issue, backend:X86, clang:headers, constexpr
Assignees
Reporter RKSimon
    All of these intrinsics wrap generic __builtin_elementwise_add_sat/sub_sat which can already be used in constexpr
```
_mm_adds_epi8 _mm_adds_epi16
_mm_subs_epi8 _mm_subs_epi16

_mm256_adds_epi8 _mm256_adds_epi16
_mm256_subs_epi8 _mm256_subs_epi16

_mm512_adds_epi8 _mm512_adds_epi16
_mm512_subs_epi8 _mm512_subs_epi16
```
(ignore the AVX512 mask/maskz variants for now)

You can use https://github.com/llvm/llvm-project/pull/152296 for reference - just make sure some of the constants actually saturate!
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to