[llvm] [GlobalISel] Add G_INSERT_SUBVECTOR to computeNumSignBits (PR #220976)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 12 01:44:07 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,h -- llvm/include/llvm/Support/KnownBits.h llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/lib/Support/KnownBits.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 c412ccf5d..af9afeba9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -5427,8 +5427,8 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, const APInt &DemandedElts,
SDValue Sub = Op.getOperand(1);
Tmp = SignBitsOps::insertSubvector(
Src.getValueType().getVectorElementCount(),
- Sub.getValueType().getVectorElementCount(),
- Op.getConstantOperandVal(2), DemandedElts,
+ Sub.getValueType().getVectorElementCount(), Op.getConstantOperandVal(2),
+ DemandedElts,
[&](unsigned OpIdx, const APInt &Demanded) {
return ComputeNumSignBits(Op.getOperand(OpIdx), Demanded, Depth + 1);
},
``````````
</details>
https://github.com/llvm/llvm-project/pull/220976
More information about the llvm-commits
mailing list