[llvm] [X86] Remove redundant and-not pattern code in X86 (PR #157687)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 14 10:49:50 PDT 2025
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/Target/X86/X86ISelLowering.cpp
``````````
: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/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 3ba3d03cd..801eef5de 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -38471,8 +38471,7 @@ X86TargetLowering::targetShrinkDemandedConstant(SDValue Op,
// Replace the constant with all ones.
SDLoc DL(Op);
SDValue NewC = TLO.DAG.getConstant(APInt::getAllOnes(EltSize), DL, VT);
- SDValue NewOp =
- TLO.DAG.getNode(ISD::XOR, DL, VT, Op.getOperand(0), NewC);
+ SDValue NewOp = TLO.DAG.getNode(ISD::XOR, DL, VT, Op.getOperand(0), NewC);
return TLO.CombineTo(Op, NewOp);
}
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/157687
More information about the llvm-commits
mailing list