[clang] [CIR][CUDA] Implement NVVM math builtins (fabs, ex2_approx) (PR #195663)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 08:02:20 PDT 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 -- clang/lib/CIR/CodeGen/CIRGenBuiltinNVPTX.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/CIR/CodeGen/CIRGenBuiltinNVPTX.cpp b/clang/lib/CIR/CodeGen/CIRGenBuiltinNVPTX.cpp
index 1838cfb28..6a21ec2aa 100644
--- a/clang/lib/CIR/CodeGen/CIRGenBuiltinNVPTX.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenBuiltinNVPTX.cpp
@@ -12,9 +12,9 @@
#include "CIRGenFunction.h"
-#include "clang/CIR/Dialect/IR/CIRDialect.h"
#include "mlir/IR/Value.h"
#include "clang/Basic/TargetBuiltins.h"
+#include "clang/CIR/Dialect/IR/CIRDialect.h"
using namespace clang;
using namespace clang::CIRGen;
@@ -26,10 +26,9 @@ static mlir::Value emitUnaryNVVMIntrinsic(CIRGenFunction &cgf,
llvm::StringRef intrinsicName) {
auto &builder = cgf.getBuilder();
mlir::Value arg = cgf.emitScalarExpr(expr->getArg(0));
- return cir::LLVMIntrinsicCallOp::create(builder,
- cgf.getLoc(expr->getExprLoc()),
- builder.getStringAttr(intrinsicName),
- arg.getType(), {arg})
+ return cir::LLVMIntrinsicCallOp::create(
+ builder, cgf.getLoc(expr->getExprLoc()),
+ builder.getStringAttr(intrinsicName), arg.getType(), {arg})
.getResult();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/195663
More information about the cfe-commits
mailing list