Simplify arithmetic operations on registry and memory in ssa#125885
Simplify arithmetic operations on registry and memory in ssa#125885pedrobsaila wants to merge 10 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
I haven't looked into correctness of these changes, but the diffs look like a PerfScore regression accross all collections? |
|
One of the things that I don't understand in asm diffs is this : lea eax, [rax+rax+0x03]
;; size=29 bbWeight=1 PerfScore 5.25less size than this : lea eax, [2*rax+0x03]
;; size=32 bbWeight=1 PerfScore 4.75Is there a logical explanation for it ? For the perf score diffs I'm working on fixing them |
| op1->AsOp()->gtOp1->AsOp()->gtOp1->AsLclVar()->GetLclNum() == lclNum)) && | ||
| op1->AsOp()->gtOp2->OperIs(GT_CNS_INT))) | ||
| { | ||
| return gtNewOperNode(GT_MUL, tree->TypeGet(), op1->AsOp()->gtOp1, |
There was a problem hiding this comment.
TBH, I am not sure what SSA in the PR title means - you just moved morph logic to this place which doesn't make sense to me, morph is supposed to be called from this phase (if it is not, we can experiment calling it unconditionally as today it might be called only if we constant folded something or changed based on assertions).
this function is a good place to, in theory, to rely on SSA, but the current PR doesn't do it.
Fixes #125300
Alternate version of #125559 (cc @EgorBo )
Before :
After: