[clang] [clang] Emit @llvm.assume when we know the streaming mode of the function (PR #121917)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 7 03:27:10 PST 2025


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 19c93483adf3e818afb3d3be77d01b8ec12c2215 27e9773135d1171c931aaa6b3f8c5f954b658969 --extensions cpp,c -- clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/AArch64/sme-intrinsics/acle_sme_state_funs.c
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 3765285c58..454cc6d163 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -11337,7 +11337,8 @@ Value *CodeGenFunction::EmitAArch64SMEBuiltinExpr(unsigned BuiltinID,
         bool IsStreaming = SMEAttrs & FunctionType::SME_PStateSMEnabledMask;
         // Emit the llvm.assume intrinsic so that called functions can use the
         // streaming mode information discerned here
-        Value* call = Builder.CreateCall(CGM.getIntrinsic(Builtin->LLVMIntrinsic));
+        Value *call =
+            Builder.CreateCall(CGM.getIntrinsic(Builtin->LLVMIntrinsic));
         if (!IsStreaming)
           call = Builder.CreateNot(call);
         Builder.CreateIntrinsic(Intrinsic::assume, {}, {call});

``````````

</details>


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


More information about the cfe-commits mailing list