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

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 13 02:44:49 PST 2024


================
@@ -129,7 +129,7 @@ bool X86DiscriminateMemOps::runOnMachineFunction(MachineFunction &MF) {
   bool Changed = false;
   for (auto &MBB : MF) {
     for (auto &MI : MBB) {
-      if (X86II::getMemoryOperandNo(MI.getDesc().TSFlags) < 0)
+      if (X86::getFirstAddrOperandIdx(MI) < 0)
----------------
phoebewang wrote:

Maybe still use `getMemoryOperandNo`?

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


More information about the llvm-commits mailing list