[clang] [llvm] [HLSL] Implement elementwise popcount (PR #108121)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 10 17:35:07 PDT 2024
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 109cd11dc4aea6b3596f8b2cb5a719f35b190cfa 365886deae6e35ee2761c2fae2a28caa0e214880 --extensions h,c,cpp -- clang/lib/CodeGen/CGBuiltin.cpp clang/lib/Headers/hlsl/hlsl_intrinsics.h clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaHLSL.cpp clang/test/CodeGen/builtins-elementwise-math.c clang/test/Sema/builtins-elementwise-math.c clang/test/SemaCXX/builtins-elementwise-math.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 c5d50e57fa..0f1638da24 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -3836,7 +3836,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
*this, E, llvm::Intrinsic::floor, "elt.floor"));
case Builtin::BI__builtin_elementwise_popcount:
return RValue::get(emitBuiltinWithOneOverloadedType<1>(
- *this, E, llvm::Intrinsic::ctpop, "elt.ctpop"));
+ *this, E, llvm::Intrinsic::ctpop, "elt.ctpop"));
case Builtin::BI__builtin_elementwise_roundeven:
return RValue::get(emitBuiltinWithOneOverloadedType<1>(
*this, E, llvm::Intrinsic::roundeven, "elt.roundeven"));
diff --git a/clang/lib/Sema/SemaHLSL.cpp b/clang/lib/Sema/SemaHLSL.cpp
index dcefb3428a..9fb72872c4 100644
--- a/clang/lib/Sema/SemaHLSL.cpp
+++ b/clang/lib/Sema/SemaHLSL.cpp
@@ -1527,7 +1527,7 @@ bool CheckIntRepresentation(Sema *S, CallExpr *TheCall) {
return !PassedType->hasIntegerRepresentation();
};
return CheckArgsTypesAreCorrect(S, TheCall, S->Context.IntTy,
- checkAllIntTypes);
+ checkAllIntTypes);
}
void SetElementTypeAsReturnType(Sema *S, CallExpr *TheCall,
``````````
</details>
https://github.com/llvm/llvm-project/pull/108121
More information about the cfe-commits
mailing list