[llvm] [X86] Add MI-layer routine for getting the index of the first address operand. NFC (PR #78019)

Nicholas Mosier via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 14 08:05:11 PST 2024


================
@@ -289,10 +289,8 @@ static unsigned getYMMtoXMMStoreOpcode(unsigned StoreOpcode) {
 }
 
 static int getAddrOffset(const MachineInstr *MI) {
-  const MCInstrDesc &Descl = MI->getDesc();
-  int AddrOffset = X86II::getMemoryOperandNo(Descl.TSFlags);
+  const int AddrOffset = X86::getFirstAddrOperandIdx(*MI);
----------------
nmosier wrote:

Thanks, fixed.

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


More information about the llvm-commits mailing list