[clang] [HLSL] Add "or" intrinsic (PR #128979)

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 27 09:25:23 PST 2025


================
@@ -290,6 +290,24 @@ _HLSL_BUILTIN_ALIAS(__builtin_hlsl_and)
 bool4 and(bool4 x, bool4 y);
 // clang-format on
 
+//===----------------------------------------------------------------------===//
+// or builtins
+//===----------------------------------------------------------------------===//
+
+/// \fn T or(T x, T y)
+/// \brief Returns the bitwise OR of the two input values, \a x and \a y.
+/// \param x The first input value and y The second input value.
+///
+/// \returns The logically OR a vector and retuens bool vector.
----------------
damyanp wrote:

Thanks, this update LGTM, but I'll leave it to @spall to resolve the conversation.  It's possible that both the "and" and the "or" comments could do with some additional clarity :)

https://github.com/llvm/llvm-project/pull/128979


More information about the cfe-commits mailing list