[llvm] [SelectionDAG] Extend the direct MVT encoding range (PR #202636)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 07:05:08 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/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/utils/TableGen/DAGISelMatcherEmitter.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/utils/TableGen/DAGISelMatcherEmitter.cpp b/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
index da9dc2db8..7e9d6ccce 100644
--- a/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
@@ -435,8 +435,7 @@ unsigned MatcherTableEmitter::SizeMatcher(Matcher *N, raw_ostream &OS) {
         Size += 2; // Count the child's opcode.
       } else {
         Child = &cast<SwitchTypeMatcher>(N)->getCaseMatcher(i);
-        Size += getMVTEncodingSize(
-            cast<SwitchTypeMatcher>(N)->getCaseType(i));
+        Size += getMVTEncodingSize(cast<SwitchTypeMatcher>(N)->getCaseType(i));
       }
       const unsigned ChildSize = SizeMatcherList(*Child, OS);
       assert(ChildSize != 0 && "Matcher cannot have child of size 0");
@@ -726,8 +725,8 @@ unsigned MatcherTableEmitter::EmitMatcher(const Matcher *N,
         IdxSize = 2; // size of opcode in table is 2 bytes.
       } else {
         Child = &cast<SwitchTypeMatcher>(N)->getCaseMatcher(i);
-        IdxSize = getMVTEncodingSize(
-            cast<SwitchTypeMatcher>(N)->getCaseType(i));
+        IdxSize =
+            getMVTEncodingSize(cast<SwitchTypeMatcher>(N)->getCaseType(i));
       }
 
       if (i != 0) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/202636


More information about the llvm-commits mailing list