[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 17:42:12 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);
----------------
phoebewang wrote:
The `const` doesn't work here. Change the function to `static const int` or remove it.
https://github.com/llvm/llvm-project/pull/78019
More information about the llvm-commits
mailing list