[llvm] [X86][ISel] Improve VPTERNLOG matching for negated logic trees (PR #164863)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 23 11:04:52 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/X86ISelDAGToDAG.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/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 06a691d73..ab86901c2 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -4744,8 +4744,8 @@ bool X86DAGToDAGISel::tryVPTERNLOG(SDNode *N) {
SDNode *InnerN = Op->getOperand(0).getNode();
unsigned InnerOpc = InnerN->getOpcode();
- if (InnerOpc != ISD::AND && InnerOpc != ISD::OR &&
- InnerOpc != ISD::XOR && InnerOpc != X86ISD::ANDNP) {
+ if (InnerOpc != ISD::AND && InnerOpc != ISD::OR && InnerOpc != ISD::XOR &&
+ InnerOpc != X86ISD::ANDNP) {
return Op;
}
@@ -4763,7 +4763,6 @@ bool X86DAGToDAGISel::tryVPTERNLOG(SDNode *N) {
N = tryPeelOuterNotWrappingLogic(N);
if (N != OriN)
PeeledOuterNot = true;
-
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
``````````
</details>
https://github.com/llvm/llvm-project/pull/164863
More information about the llvm-commits
mailing list