llvm/llvm-project

[Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add MMX/SSE/AVX/AVX512 VPSADBW intrinsics to be used in constexpr

Open

#188,062 建立於 2026年3月23日

在 GitHub 查看
 (8 留言) (0 反應) (1 負責人)C++ (26,378 star) (10,782 fork)batch import
backend:X86clang:bytecodeclang:frontendconstexprgood first issue

描述

The horizontal sum of difference intrinsics can all be used in constexpr with suitable handling of the builtins inside VectorExprEvaluator::VisitCallExpr and InterBuiltin.cpp, and testing in the relevent *-builtins.c files.

_mm_sad_epu8 _mm256_sad_epu8 _mm512_sad_epu8 _mm_sad_pu8

Care needs to be taken with the signed/unsigned extension of the arguments - we might need to adjust the builtin signatures.

Review other sub-issues from #30794 on implementation

Split off from #157522

貢獻者指南

[Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add MMX/SSE/AVX/AVX512 VPSADBW intrinsics to be used in constexpr · llvm/llvm-project#188062 | Good First Issue