[llvm] [clang] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 4 09:29:31 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 f368e6424fbfb7fdea4b9d9a2e44f2f7e188c133 3575ad5701a852dd8b79d144ea17a729cfb4d94c -- llvm/include/llvm/Analysis/DomConditionCache.h llvm/lib/Analysis/DomConditionCache.cpp clang/test/CodeGenCXX/RelativeVTablesABI/member-function-pointer.cpp llvm/include/llvm/Analysis/SimplifyQuery.h llvm/include/llvm/Transforms/InstCombine/InstCombiner.h llvm/lib/Analysis/ValueTracking.cpp llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp llvm/lib/Transforms/InstCombine/InstCombineInternal.h llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 841d38bb97..4295c7692e 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -6120,8 +6120,7 @@ Instruction *InstCombinerImpl::foldICmpUsingKnownBits(ICmpInst &I) {
     // (especially IndVarSimplify) may not be able to reliably undo.
     SQ.DC = nullptr;
     auto _ = make_scope_exit([&]() { SQ.DC = &DC; });
-    if (SimplifyDemandedBits(&I, 0,
-                             getDemandedBitsLHSMask(I, BitWidth),
+    if (SimplifyDemandedBits(&I, 0, getDemandedBitsLHSMask(I, BitWidth),
                              Op0Known, 0))
       return &I;
 

``````````

</details>


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


More information about the cfe-commits mailing list