[clang] [Clang] Update `__builtin_masked_load` to accept passthrough argument (PR #155652)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 27 10:12:19 PDT 2025
================
@@ -2295,6 +2295,15 @@ static ExprResult BuiltinMaskedLoad(Sema &S, CallExpr *TheCall) {
QualType PointeeTy = PtrTy->getPointeeType();
const VectorType *MaskVecTy = MaskTy->getAs<VectorType>();
const VectorType *DataVecTy = PointeeTy->getAs<VectorType>();
+
+ if (TheCall->getNumArgs() == 3) {
+ Expr *PassThruArg = TheCall->getArg(2);
+ QualType PassThruTy = PassThruArg->getType();
+ if (!S.Context.hasSameType(PassThruTy, PointeeTy))
+ return S.Diag(PtrArg->getExprLoc(), diag::err_vec_masked_load_store_ptr)
+ << /* third */ 3 << PointeeTy;
----------------
erichkeane wrote:
```suggestion
<< /* third argument=*/ 3 << PointeeTy;
```
https://github.com/llvm/llvm-project/pull/155652
More information about the cfe-commits
mailing list