[llvm] [InstCombine] Add demanded-bits pext handling (PR #205092)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 02:26:40 PDT 2026


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 origin/main HEAD --extensions cpp -- llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
index a8c7ad0cf..bc8af869e 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
@@ -1116,8 +1116,7 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Instruction *I,
             --N;
         }
         if (ShrinkDemandedConstant(I, 1, DemandedMaskRHS) ||
-            SimplifyDemandedBits(I, 1, DemandedMaskRHS, RHSKnown, Q,
-                                 Depth + 1))
+            SimplifyDemandedBits(I, 1, DemandedMaskRHS, RHSKnown, Q, Depth + 1))
           return I;
 
         Value *X;

``````````

</details>


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


More information about the llvm-commits mailing list