[PATCH] D98011: [X86][NFC] Adding one flag to imply whether the instruction should check the predicate when compress EVEX instructions to VEX encoding.

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 8 04:51:52 PST 2021


pengfei accepted this revision.
pengfei added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/lib/Target/X86/X86InstrFormats.td:355
   bit ExplicitVEXPrefix = 0; // Force the instruction to use VEX encoding.
+  bit checkVEXPredicate = 0; // Does this VEX inst should check predicate?
 
----------------
Nit: Not a good sentences. How about:
Force to check predicate before using VEX encoding.


================
Comment at: llvm/utils/TableGen/X86EVEX2VEXTablesEmitter.cpp:52
+
+  void printCheckPredicate(const std::vector<Predicate> &Predicates,
+                           raw_ostream &OS);
----------------
Nit: Add comments like above.


================
Comment at: llvm/utils/TableGen/X86EVEX2VEXTablesEmitter.cpp:195
+    for (unsigned i = 0, e = PredicatesRecords.size(); i != e; ++i)
+      // Currently we only do AVX related checks and assume each instruction
+      // has one and only one AVX related predicates.
----------------
Nit: Maybe bettter to move the comments above the `for` or add curly brackets for `for`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98011



More information about the llvm-commits mailing list