[llvm] [X86][MC] Add alias for `{evex} cmp` and `{evex} test`. (PR #99277)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 05:47:20 PDT 2024


================
@@ -3784,6 +3795,61 @@ bool X86AsmParser::processInstruction(MCInst &Inst, const OperandVector &Ops) {
     Inst.setOpcode(X86::INT3);
     return true;
   }
+  // `{evex} cmp <>, <>` is alias of `ccmpt {dfv=} <>, <>`
+#define FROM_TO(FROM, TO)                                                      \
+  case X86::FROM: {                                                            \
+    return replaceWithCCMP(X86::TO);                                           \
+  }
----------------
phoebewang wrote:

Nit: This can be one line: `case X86::FROM: return replaceWithCCMP(X86::TO)`

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


More information about the llvm-commits mailing list