[PATCH] D150651: Fix regression after D150436

Wang, Xin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 02:35:21 PDT 2023


XinWang10 created this revision.
Herald added a project: All.
XinWang10 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150651

Files:
  llvm/utils/TableGen/AsmMatcherEmitter.cpp


Index: llvm/utils/TableGen/AsmMatcherEmitter.cpp
===================================================================
--- llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -636,7 +636,9 @@
     // We use the ID to sort AVX instruction before AVX512 instruction in
     // matching table.
     if (TheDef->isSubClassOf("Instruction") &&
-        TheDef->getValueAsBit("HasPositionOrder"))
+        TheDef->getValueAsBit("HasPositionOrder") &&
+        RHS.TheDef->isSubClassOf("Instruction") &&
+        RHS.TheDef->getValueAsBit("HasPositionOrder"))
       return TheDef->getID() < RHS.TheDef->getID();
 
     // Give matches that require more features higher precedence. This is useful


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150651.522510.patch
Type: text/x-patch
Size: 727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230516/b9c375a1/attachment.bin>


More information about the llvm-commits mailing list