[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)
Phoebe Wang via cfe-commits
cfe-commits at lists.llvm.org
Thu May 16 03:40:07 PDT 2024
================
@@ -3019,6 +3019,26 @@ C-style cast applied to each element of the first argument.
Query for this feature with ``__has_builtin(__builtin_convertvector)``.
+``__builtin_selectvector``
+--------------------------
+
+``__builtin_selectvector`` is used to express generic vector element selection.
+
+**Signature**:
+
+.. code-block:: c++
+
+ template <class T, size_t N>
+ simd_vec<T, N> __builtin_selectvector(simd_vec<T, N> lhs, simd_vec<T, N> rhs,
+ simd_vec<bool, N> cond)
----------------
phoebewang wrote:
Maybe put `cond` the first operand to match with `select` and the old X86 builtins?
https://github.com/llvm/llvm-project/pull/91306
More information about the cfe-commits
mailing list