[PATCH] D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 7 09:27:43 PDT 2021


Carrot added a comment.

In D101970#2742388 <https://reviews.llvm.org/D101970#2742388>, @lebedev.ri wrote:

> I think it is good when the patch's description not just what the patch does, but also why it does that.

Same as other LEA -> ALU optimizations in optTwoAddrLEA. On old architectures such as HSW or SKL, there are less issue ports containing LEA function unit than ALU. So LEA instructions may be delayed due to issue port competition. On newer architectures such as ICL or TGL, all four ports can issue LEA instructions, there is no such problem, but it doesn't hurt, because all optimizations in optTwoAddrLEA don't generate extra instructions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101970



More information about the llvm-commits mailing list