Skip to content

Perform ldr to ldp peephole optimization #84399

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

Merged
merged 5 commits into from
Apr 8, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coreclr/jit/emitarm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ inline bool OptimizeLdrStr(instruction ins,

// If the previous instruction was a matching load/store, then try to replace it instead of emitting.
// Don't do this if either instruction had a local variable.
if ((emitLastIns->idIns() == ins) && !localVar && !emitLastIns->idIsLclVar() &&
if ((emitLastIns->idIns() == ins) && ((ins == INS_ldr) || (!localVar && !emitLastIns->idIsLclVar())) &&
ReplaceLdrStrWithPairInstr(ins, reg1Attr, reg1, reg2, imm, size, fmt))
{
return true;
Expand Down