OSDN Git Service

[ARM] Use sub for negative offset load/store in thumb1
authorDavid Green <david.green@arm.com>
Tue, 29 Jan 2019 10:40:31 +0000 (10:40 +0000)
committerDavid Green <david.green@arm.com>
Tue, 29 Jan 2019 10:40:31 +0000 (10:40 +0000)
commit551492d8a4425d35ff2d978ee234af8084338898
tree81bc0a0dc32c9aa27959d8eb4955ed34c95910f2
parent6d2ed00e0f372d7afd1163c504e7059b4f0062a6
[ARM] Use sub for negative offset load/store in thumb1

This attempts to optimise negative values used in load/store operands
a little. We currently try to selct them as rr, materialising the
negative constant using a MOV/MVN pair. This instead selects ri with
an immediate of 0, forcing the add node to become a simpler sub.

Differential Revision: https://reviews.llvm.org/D57121

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352475 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/ARM/ARMInstrThumb.td
test/CodeGen/ARM/load.ll