[llvm] [X86] Use BMI2 shrx for range-known zero tests (PR #207904)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 02:01:46 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/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 e1a1712b5..533ca3448 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -57320,13 +57320,13 @@ static SDValue combineZextSetccEqZeroToShift(SDNode *N, SelectionDAG &DAG,
SDValue X;
if (!sd_match(N->getOperand(0),
m_OneUse(m_c_SetCC(m_Value(X), m_Zero(),
- m_SpecificCondCode(ISD::SETEQ)))))
+ m_SpecificCondCode(ISD::SETEQ)))))
return SDValue();
EVT ShiftVT = X.getValueType();
EVT VT = N->getValueType(0);
- if (!ShiftVT.isSimple() || !ShiftVT.isScalarInteger() ||
- !VT.isSimple() || !VT.isScalarInteger())
+ if (!ShiftVT.isSimple() || !ShiftVT.isScalarInteger() || !VT.isSimple() ||
+ !VT.isScalarInteger())
return SDValue();
MVT ShiftMVT = ShiftVT.getSimpleVT();
``````````
</details>
https://github.com/llvm/llvm-project/pull/207904
More information about the llvm-commits
mailing list