[llvm] [SelectionDAG] Provide context for vector count / type mismatch (PR #175433)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 11 04:15:32 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 h,cpp -- llvm/include/llvm/CodeGenTypes/MachineValueType.h llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/lib/CodeGen/ValueTypes.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/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index f4ae2f3cd..786a65119 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -769,7 +769,6 @@ static void getCopyToPartsVector(SelectionDAG &DAG, const SDLoc &DL,
NumIntermediates, RegisterVT);
}
-
if (NumRegs != NumParts || RegisterVT != PartVT)
report_fatal_error(Twine("Part count doesn't match vector breakdown! ")
.concat(Twine(NumRegs))
@@ -779,8 +778,7 @@ static void getCopyToPartsVector(SelectionDAG &DAG, const SDLoc &DL,
.concat(Twine(RegisterVT.getString()))
.concat(" RegisterVT, ")
.concat(Twine(PartVT.getString()))
- .concat(" PartVT")
- );
+ .concat(" PartVT"));
assert(IntermediateVT.isScalableVector() == ValueVT.isScalableVector() &&
"Mixing scalable and fixed vectors when copying in parts");
diff --git a/llvm/lib/CodeGen/ValueTypes.cpp b/llvm/lib/CodeGen/ValueTypes.cpp
index 15dadfcf8..f3e4eaa2e 100644
--- a/llvm/lib/CodeGen/ValueTypes.cpp
+++ b/llvm/lib/CodeGen/ValueTypes.cpp
@@ -347,6 +347,4 @@ void MVT::dump() const {
}
#endif
-void MVT::print(raw_ostream &OS) const {
- OS << getString();
-}
+void MVT::print(raw_ostream &OS) const { OS << getString(); }
``````````
</details>
https://github.com/llvm/llvm-project/pull/175433
More information about the llvm-commits
mailing list