[llvm] [KnownBits] Add KnownBits::add and KnownBits::sub helper wrappers. (PR #99468)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 03:48: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 da0c8b275564f814a53a5c19497669ae2d99538d 3339ffef225c23d5c7556510c6ca3a6ca3734895 --extensions h,cpp -- llvm/include/llvm/Support/KnownBits.h llvm/lib/Analysis/ValueTracking.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/unittests/Support/KnownBitsTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/Support/KnownBits.h b/llvm/include/llvm/Support/KnownBits.h
index c49b0395b2..3ab5904c4d 100644
--- a/llvm/include/llvm/Support/KnownBits.h
+++ b/llvm/include/llvm/Support/KnownBits.h
@@ -331,13 +331,13 @@ public:
 
   /// Compute knownbits resulting from addition of LHS and RHS.
   /// NSW and NUW flags are assumed to be false.
-  static KnownBits add(const KnownBits& LHS, const KnownBits& RHS) {
+  static KnownBits add(const KnownBits &LHS, const KnownBits &RHS) {
     return computeForAddSub(/*Add=*/true, /*NSW=*/false, /*NUW=*/false, LHS,
                             RHS);
   }
   /// Compute knownbits resulting from subtraction of LHS and RHS.
   /// NSW and NUW flags are assumed to be false.
-  static KnownBits sub(const KnownBits& LHS, const KnownBits& RHS) {
+  static KnownBits sub(const KnownBits &LHS, const KnownBits &RHS) {
     return computeForAddSub(/*Add=*/false, /*NSW=*/false, /*NUW=*/false, LHS,
                             RHS);
   }

``````````

</details>


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


More information about the llvm-commits mailing list