-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIoptimization
Milestone
Description
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#L5222
This 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 an ADD x, 0. How this ADD 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIoptimization