================
@@ -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:
You use the result of `getAs<VectorType>()` but I don't see any checks to
verify `getType()` actually gives us a vector nor do I see an assert saying we
assume this is an invariant.
CC @RKSimon
https://github.com/llvm/llvm-project/pull/162816
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits