[clang] [AMDGPU] Treat printf as builtin for OpenCL (PR #72554)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 16 10:55:14 PST 2023
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 186db1bcb0096a6af348d7e17866c68fa2004068 6ace9d0a51064be189093ca3bb42416aafadb7f6 -- clang/lib/AST/Decl.cpp clang/lib/Basic/Targets/AMDGPU.cpp clang/lib/CodeGen/CGBuiltin.cpp
``````````
</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 987909b5a6..d7a4b895f3 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -2458,10 +2458,10 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
&getTarget().getLongDoubleFormat() == &llvm::APFloat::IEEEquad())
BuiltinID = mutateLongDoubleBuiltin(BuiltinID);
- // Mutate the printf builtin ID so that we use the same CodeGen path for
- // HIP and OpenCL with AMDGPU targets.
- if (getTarget().getTriple().isAMDGCN() && BuiltinID == AMDGPU::BIprintf)
- BuiltinID = Builtin::BIprintf;
+ // Mutate the printf builtin ID so that we use the same CodeGen path for
+ // HIP and OpenCL with AMDGPU targets.
+ if (getTarget().getTriple().isAMDGCN() && BuiltinID == AMDGPU::BIprintf)
+ BuiltinID = Builtin::BIprintf;
// If the builtin has been declared explicitly with an assembler label,
// disable the specialized emitting below. Ideally we should communicate the
``````````
</details>
https://github.com/llvm/llvm-project/pull/72554
More information about the cfe-commits
mailing list