[clang] [CIR] Add non-floating-point builtin intrinsics (PR #178093)

via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 13 12:45:31 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 c,cpp -- clang/test/CIR/CodeGen/builtin-rotate.c clang/test/CIR/CodeGen/pred-info-builtins.c clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp clang/test/CIR/CodeGen/builtins-elementwise.c clang/test/CIR/CodeGen/libc.c --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/CIR/CodeGen/CIRGenBuiltin.cpp b/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
index b8b5120c0..9a61d4003 100644
--- a/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
@@ -1116,10 +1116,10 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
     return emitBuiltinBitOp<cir::BitPopcountOp>(*this, e);
 
   case Builtin::BI__builtin_unpredictable: {
-        // Always return the argument of __builtin_unpredictable. LLVM does not
-        // have an intrinsic corresponding to this builtin. Metadata for this builtin
-        // should be added directly to instructions such as branches or switches
-        // that use it.
+    // Always return the argument of __builtin_unpredictable. LLVM does not
+    // have an intrinsic corresponding to this builtin. Metadata for this
+    // builtin should be added directly to instructions such as branches or
+    // switches that use it.
     return RValue::get(emitScalarExpr(e->getArg(0)));
   }
 

``````````

</details>


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


More information about the cfe-commits mailing list