ARM64: Eliminate redundant opposite mov (#38179)
authorKunal Pathak <Kunal.Pathak@microsoft.com>
Tue, 30 Jun 2020 15:07:30 +0000 (08:07 -0700)
committerGitHub <noreply@github.com>
Tue, 30 Jun 2020 15:07:30 +0000 (08:07 -0700)
commit40b2e886a3e978928e8d1571df0852abba0cfb9d
tree46ff087ba24523ce237eb15b8d6e9adacb0fdde5
parent54d9241a344a6722e188d209b9f72a621207ca99
ARM64: Eliminate redundant opposite mov (#38179)

* Added IsOppositeOfPrevMov()

Added IsOppositeOfPrevMov() that will skip generating redundant mov.

* review comments

* Refactor code into IsRedundantMov()

* dont optimize beyong IG boundary

* add check to not cross IG boundary

* Add more checks:
- Change IG boundary check to exclude extended IGs.
- Check the operand size before removing redundant movs.

* fix the check

* review comments

* Add check to ensure if src/dst are both scalar or both vector

* minor comment

* Add check for insFormat

* fix the typo

* minor comments
src/coreclr/src/jit/emitarm64.cpp
src/coreclr/src/jit/emitarm64.h