[clang] First draft: [Clang] Add constant evaluation support for x86 psadbw (PR #169253)
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Thu May 7 02:34:31 PDT 2026
================
@@ -173,13 +173,13 @@ let Features = "sse2", Attributes = [NoThrow] in {
let Features = "sse2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
def cvtpd2ps : X86Builtin<"_Vector<4, float>(_Vector<2, double>)">;
def cvtsd2ss : X86Builtin<"_Vector<4, float>(_Vector<4, float>, _Vector<2, double>)">;
+ def psadbw128 : X86Builtin<"_Vector<2, long long int>(_Vector<16, char>, _Vector<16, char>)">;
----------------
RKSimon wrote:
we should probably update the signature to:
```suggestion
def psadbw128 : X86Builtin<"_Vector<2, long long int>(_Vector<16, unsigned char>, _Vector<16, unsigned char>)">;
```
same for the others (might require changes to the casts in the headers)
https://github.com/llvm/llvm-project/pull/169253
More information about the cfe-commits
mailing list