[PATCH] D59468: [X86] Remove the _alt forms of (V)CMP instructions. Use a combination of custom printing and custom parsing to achieve the same result and more

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 17 11:59:03 PDT 2019


RKSimon added inline comments.


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:2327
+      (PatchedName[PatchedName.size() - 2] == 'p' ||
+       PatchedName[PatchedName.size() - 2] == 's')) {
     bool IsVCMP = PatchedName[0] == 'v';
----------------
Is this just a microoptimizion? It all looks a little messy


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:2391
+          PatchedName = "vcmpsd";
+      }
+      if (!IsVCMP)
----------------
Again - why not just use endswith()?


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

https://reviews.llvm.org/D59468





More information about the llvm-commits mailing list