[llvm-branch-commits] [Clang] Implement __builtin_speculative_load (PR #242576)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Nov 13 20:27:37 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,c -- clang/test/CodeGen/builtin-speculative-load.c clang/test/Sema/builtin-speculative-load.c clang/lib/CodeGen/CGBuiltin.cpp clang/lib/Sema/SemaChecking.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 5be491750..563a6c5b6 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -3075,7 +3075,7 @@ static ExprResult BuiltinSpeculativeLoad(Sema &S, CallExpr *TheCall) {
const auto *VT = PointeeTy->getAs<VectorType>();
if (!VT || !VT->getElementType()->isIntegerType())
return S.Diag(PtrArg->getExprLoc(),
- diag::err_speculative_load_not_a_vector_of_integers);
+ diag::err_speculative_load_not_a_vector_of_integers);
InitializedEntity Entity = InitializedEntity::InitializeParameter(
S.Context, S.Context.BoolTy, /*consume=f*/ false);
@@ -3093,16 +3093,16 @@ static ExprResult BuiltinSpeculativeLoad(Sema &S, CallExpr *TheCall) {
OracleFnArg->getAsBuiltinConstantDeclRef(S.getASTContext()));
if (!FD)
return S.Diag(OracleFnArg->getBeginLoc(),
- diag::err_speculative_load_third_arg_must_be_function);
+ diag::err_speculative_load_third_arg_must_be_function);
if (!FD->hasAttr<OracleFunctionAttr>())
return S.Diag(OracleFnArg->getBeginLoc(),
- diag::err_speculative_load_function_oracle_attr);
+ diag::err_speculative_load_function_oracle_attr);
if (TheCall->getNumArgs() - 3 != FD->getNumParams())
return S.Diag(TheCall->getBeginLoc(),
- diag::err_speculative_load_arg_oracle_param_count_mismatch)
- << FD->getNumParams() << TheCall->getNumArgs() - 3;
+ diag::err_speculative_load_arg_oracle_param_count_mismatch)
+ << FD->getNumParams() << TheCall->getNumArgs() - 3;
for (unsigned I = 0, N = FD->getNumParams(); I != N; ++I) {
ParmVarDecl *Param = const_cast<ParmVarDecl *>(FD->getParamDecl(I));
``````````
</details>
https://github.com/llvm/llvm-project/pull/242576
More information about the llvm-branch-commits
mailing list