[llvm] Combine more examples to new Checked matcher API (PR #91097)
via llvm-commits
llvm-commits at lists.llvm.org
Sat May 4 17:14:44 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 c5de4dd1eab00df76c1a68c5f397304ceacb71f2 ff54fa3fb9dbcafeb2d1b7456ba80f2db39765c6 -- llvm/lib/Analysis/InstructionSimplify.cpp llvm/lib/Analysis/ValueTracking.cpp llvm/lib/Target/X86/X86ISelLowering.cpp llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
``````````
</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 50def0f692..2fbcf29c20 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
@@ -337,7 +337,9 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
// constant because that's a canonical 'not' op, and that is better for
// combining, SCEV, and codegen.
auto IsNotAllOnes = [](const APInt &C) { return C.isAllOnes(); };
- auto IsNotAllOnesAndDemandedMask = [&DemandedMask](const APInt &C) { return (C | ~DemandedMask).isAllOnes(); };
+ auto IsNotAllOnesAndDemandedMask = [&DemandedMask](const APInt &C) {
+ return (C | ~DemandedMask).isAllOnes();
+ };
if (match(I->getOperand(1), m_CheckedInt(IsNotAllOnes))) {
if (match(I->getOperand(1), m_CheckedInt(IsNotAllOnesAndDemandedMask))) {
// Force bits to 1 to create a 'not' op.
``````````
</details>
https://github.com/llvm/llvm-project/pull/91097
More information about the llvm-commits
mailing list