[llvm] [X86] Fix an assembler bug of CMPCCXADD. (PR #66748)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 02:20:02 PDT 2023


================
@@ -948,10 +948,10 @@ X86MCCodeEmitter::emitVEXOpcodePrefix(int MemOperand, const MCInst &MI,
     llvm_unreachable("Unexpected form in emitVEXOpcodePrefix!");
   case X86II::MRMDestMem4VOp3CC: {
     //  MemAddr, src1(ModR/M), src2(VEX_4V)
+    Prefix.setR(MI, CurOp++);
----------------
phoebewang wrote:

Don't understand the change. Is the `CurOp` the index of operands?
According to above comment and assemble test, the order in `MemAddr, src1(ModR/M), src2(VEX_4V)` was correct. Does the change make it `src1(ModR/M), MemAddr, src2(VEX_4V)`?

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


More information about the llvm-commits mailing list