[PATCH] D133676: [X86] Simplify isReplaceable (NFC)

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 19:11:16 PDT 2022


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86OptimizeLEAs.cpp:464
     // the LEA is not replaceable.
-    if (!isIdenticalOp(MI.getOperand(MemOpNo + X86::AddrBaseReg), MO))
+    if (&MO != &MI.getOperand(MemOpNo + X86::AddrBaseReg))
       return false;
----------------
This cannot prevent def register been used by other operands at the same time.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133676/new/

https://reviews.llvm.org/D133676



More information about the llvm-commits mailing list