[llvm] [AArch64] Fold sext-in-reg for predicate -> fixed-length conversions. (PR #176883)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 21 03:32:20 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/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/lib/Target/AArch64/AArch64ISelLowering.cpp llvm/unittests/Target/AArch64/AArch64SelectionDAGTest.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/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 61cd21458..92ce9e3a2 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -4721,7 +4721,7 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, const APInt &DemandedElts,
unsigned FirstAnswer = 1;
assert((!VT.isScalableVector() || NumElts == 1) &&
- "DemandedElts for scalable vectors must be 1 to represent all lanes");
+ "DemandedElts for scalable vectors must be 1 to represent all lanes");
if (auto *C = dyn_cast<ConstantSDNode>(Op)) {
const APInt &Val = C->getAPIntValue();
diff --git a/llvm/unittests/Target/AArch64/AArch64SelectionDAGTest.cpp b/llvm/unittests/Target/AArch64/AArch64SelectionDAGTest.cpp
index 99078fcd5..6e6fc06e9 100644
--- a/llvm/unittests/Target/AArch64/AArch64SelectionDAGTest.cpp
+++ b/llvm/unittests/Target/AArch64/AArch64SelectionDAGTest.cpp
@@ -167,7 +167,8 @@ TEST_F(AArch64SelectionDAGTest, ComputeNumSignBits_EXTRACT_SUBVECTOR) {
TEST_F(AArch64SelectionDAGTest, ComputeNumSignBitsSVE_EXTRACT_SUBVECTOR) {
SDLoc Loc;
auto IntVT = EVT::getIntegerVT(Context, 8);
- auto ScalableVecVT = EVT::getVectorVT(Context, IntVT, 16, /*IsScalable=*/true);
+ auto ScalableVecVT =
+ EVT::getVectorVT(Context, IntVT, 16, /*IsScalable=*/true);
auto FixedVecVT = EVT::getVectorVT(Context, IntVT, 16, /*IsScalable=*/false);
auto IdxVT = EVT::getIntegerVT(Context, 64);
auto Vec = DAG->getConstant(1, Loc, ScalableVecVT);
``````````
</details>
https://github.com/llvm/llvm-project/pull/176883
More information about the llvm-commits
mailing list