Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not create unnecessary LEA(b+0) nodes #13548

Closed
mikedn opened this issue Oct 8, 2019 · 0 comments · Fixed by #32085
Closed

Do not create unnecessary LEA(b+0) nodes #13548

mikedn opened this issue Oct 8, 2019 · 0 comments · Fixed by #32085
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI optimization
Milestone

Comments

@mikedn
Copy link
Contributor

mikedn commented Oct 8, 2019

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

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI optimization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants