[clang] [llvm] [X86][MC] Added support for -msse2avx option in llvm-mc (PR #96860)

Shengchen Kan via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 19:38:47 PDT 2024


================
@@ -3745,7 +3749,27 @@ bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name,
   return false;
 }
 
+static void replaceSSE2AVXOpcode(MCInst &Inst) {
+  ArrayRef<X86TableEntry> Table{X86SSE2AVXTable};
+  unsigned Opcode = Inst.getOpcode();
+  const auto I = llvm::lower_bound(Table, Opcode);
+  if (I != Table.end() && I->OldOpc == Opcode)
+    Inst.setOpcode(I->NewOpc);
----------------
KanRobert wrote:

return true;

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


More information about the cfe-commits mailing list