[clang] [Headers][X86] Allow AVX512 masked arithmetic ss/sd intrinsics to be used in constexpr (PR #162816)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 4 15:46:45 PST 2026


================
@@ -2838,6 +2838,30 @@ static bool interp__builtin_select(InterpState &S, CodePtr OpPC,
   return true;
 }
 
+/// Scalar variant of AVX512 predicated select:
+/// Result[i] = (Mask bit 0) ? LHS[i] : RHS[i], but only element 0 may change.
+/// All other elements are taken from RHS.
+static bool interp__builtin_select_scalar(InterpState &S,
+                                          const CallExpr *Call) {
+  unsigned N =
+      Call->getArg(1)->getType()->getAs<VectorType>()->getNumElements();
----------------
shafik wrote:

ping

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


More information about the cfe-commits mailing list