[PATCH] D74368: [TBLGEN] Fix subreg value overflow in DAGISelMatcher

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 17:45:25 PST 2020


arsenm added inline comments.


================
Comment at: llvm/utils/TableGen/DAGISelMatcherGen.cpp:721
     if (Def->isSubClassOf("SubRegIndex")) {
+      // If we have more than 127 subreg indicies the encoding can overflow
+      // 7 bit and we cannout use StringInteger.
----------------
Spelling indicies


================
Comment at: llvm/utils/TableGen/DAGISelMatcherGen.cpp:722
+      // If we have more than 127 subreg indicies the encoding can overflow
+      // 7 bit and we cannout use StringInteger.
+      if (SRI.size() > 127) {
----------------
Typo cannout


================
Comment at: llvm/utils/TableGen/DAGISelMatcherGen.cpp:725-728
+        auto I = std::find_if(SRI.cbegin(), SRI.cend(),
+          [&Name](const CodeGenSubRegIndex &I) {
+            return Name.equals(I.getName());
+          });
----------------
I would except this to check a function in CodeGenRegBank rather than needing to do a find_if on a list


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74368/new/

https://reviews.llvm.org/D74368





More information about the llvm-commits mailing list