[llvm] [X86] Fold vgf2p8affineqb XOR with splat constant into immediate (PR #179103)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 1 04:17:29 PST 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/Target/X86/X86ISelLowering.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/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 98d3d2d12..a730ce807 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -55869,8 +55869,7 @@ static SDValue combineXorWithGF2P8AFFINEQB(SDNode *N, SelectionDAG &DAG,
APInt UndefElts;
SmallVector<APInt, 16> EltBits;
if (!getTargetConstantBitsFromNode(N1, ScalarSizeInBits, UndefElts, EltBits,
- true,
- false))
+ true, false))
return SDValue();
std::optional<APInt> SplatVal;
@@ -55892,8 +55891,8 @@ static SDValue combineXorWithGF2P8AFFINEQB(SDNode *N, SelectionDAG &DAG,
uint64_t NewImm = OldImmNode->getZExtValue() ^ SplatVal->getZExtValue();
SDLoc DL(N);
- return DAG.getNode(X86ISD::GF2P8AFFINEQB, DL, N0.getValueType(), N0.getOperand(0),
- N0.getOperand(1),
+ return DAG.getNode(X86ISD::GF2P8AFFINEQB, DL, N0.getValueType(),
+ N0.getOperand(0), N0.getOperand(1),
DAG.getTargetConstant(NewImm, DL, MVT::i8));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/179103
More information about the llvm-commits
mailing list