================
@@ -961,3 +961,51 @@ static_assert(fmaDouble1[3] == 26.0);
 constexpr float fmaArray[] = {2.0f, 2.0f, 2.0f, 2.0f};
 constexpr float fmaResult = __builtin_elementwise_fma(fmaArray[1], 
fmaArray[2], fmaArray[3]);
 static_assert(fmaResult == 6.0f, "");
+
+static_assert(__builtin_elementwise_fshl((unsigned char)255, (unsigned char)0, 
(unsigned char)8) == (unsigned char)255);
----------------
shafik wrote:

Apologies, I was looking at the documentation and it was not obvious to me: 
https://clang.llvm.org/docs/LanguageExtensions.html

As opposed to `__builtin_elementwise_add_sat` which specifically say results 
are clamped. Maybe I am being dense and not interpreting the documentation 
correctly. 

https://github.com/llvm/llvm-project/pull/153572
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to