[clang] [llvm] [LLVM] Trim intrinsics (PR #112791)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 21 07:03:53 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 e26d9070d3eaee587b3ef0da6d12200a5b994765 1edb5e5616f64aa284f205021015efc797800b2a --extensions h,cpp -- llvm/include/llvm/Support/IntrinsicID.h llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h llvm/include/llvm/IR/Intrinsics.h llvm/lib/CodeGen/MachineOperand.cpp llvm/lib/CodeGen/MachineVerifier.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/lib/IR/Core.cpp llvm/lib/IR/Intrinsics.cpp llvm/lib/Target/AArch64/AArch64ISelLowering.cpp llvm/lib/Target/X86/X86IntrinsicsInfo.h llvm/unittests/IR/VPIntrinsicTest.cpp llvm/utils/TableGen/Basic/CodeGenIntrinsics.cpp llvm/utils/TableGen/Basic/CodeGenIntrinsics.h llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp llvm/utils/TableGen/Common/CodeGenDAGPatterns.h llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp llvm/utils/TableGen/IntrinsicEmitter.cpp llvm/utils/TableGen/SearchableTableEmitter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Support/IntrinsicID.h b/llvm/include/llvm/Support/IntrinsicID.h
index 40c44afb67..60b13d85ec 100644
--- a/llvm/include/llvm/Support/IntrinsicID.h
+++ b/llvm/include/llvm/Support/IntrinsicID.h
@@ -20,8 +20,8 @@
#define LLVM_SUPPORT_INTRINSIC_ID_H
#include "llvm/Support/FormatVariadic.h"
-#include <optional>
#include <limits>
+#include <optional>
#include <utility>
namespace llvm::Intrinsic {
@@ -37,18 +37,20 @@ inline std::pair<unsigned, unsigned> DecodeIntrinsicID(ID id) {
unsigned IntrinsicIndex = id & 0xFFFF;
unsigned TargetIndex = id >> 16;
assert(IntrinsicIndex != 0);
- return {TargetIndex, IntrinsicIndex-1};
+ return {TargetIndex, IntrinsicIndex - 1};
}
-inline std::optional<std::pair<unsigned, unsigned>> DecodeIntrinsicIDNoFail(ID id) {
+inline std::optional<std::pair<unsigned, unsigned>>
+DecodeIntrinsicIDNoFail(ID id) {
unsigned IntrinsicIndex = id & 0xFFFF;
unsigned TargetIndex = id >> 16;
if (IntrinsicIndex == 0)
return std::nullopt;
- return std::make_pair(TargetIndex, IntrinsicIndex-1);
+ return std::make_pair(TargetIndex, IntrinsicIndex - 1);
}
-inline void PrintIntrinsicIDEncoding(raw_ostream &OS, unsigned TargetIndex, unsigned IntrinsicIndex) {
+inline void PrintIntrinsicIDEncoding(raw_ostream &OS, unsigned TargetIndex,
+ unsigned IntrinsicIndex) {
OS << formatv(" = ({} << 16) + {} + 1", TargetIndex, IntrinsicIndex);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/112791
More information about the cfe-commits
mailing list