[llvm] [X86][MC] Support encoding/decoding for APX CCMP/CTEST (PR #83863)

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 01:46:26 PST 2024


================
@@ -1141,6 +1141,15 @@ static int getInstructionIDWithAttrMask(uint16_t *instructionID,
   return 0;
 }
 
+static bool isCCMPOrCTEST(InternalInstruction *insn) {
+  return (insn->opcodeType == MAP4) &&
+         (((insn->opcode & 0xfe) == 0x38) || ((insn->opcode & 0xfe) == 0x3a) ||
----------------
KanRobert wrote:

Done in another way. I use `switch-case` to avoid the duplication.

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


More information about the llvm-commits mailing list