Do not create unnecessary LEA(b+0) nodes #13548
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
optimization
Milestone
There's a piece of code in the XARCH emitter that attempts to remove
LEA reg, [reg+0]
instructions: https://github.com/dotnet/coreclr/blob/4c669eb9ed4400e636d1421412062aa99ccc0dda/src/jit/emitxarch.cpp#L5222This works fine but such LEAs should not be generated in the first place.
In one such case I looked at, the LEA was generated by
Lowering::TryCreateAddrMode
from anADD x, 0
. How thisADD
was created is another story but lowering should simply remove it, not create an address mode from it.Initially discussed in dotnet/coreclr#27035 (comment)
category:cq
theme:optimization
skill-level:beginner
cost:medium
The text was updated successfully, but these errors were encountered: