diff options
| author | James Molloy <james.molloy@arm.com> | 2016-09-08 12:58:04 +0000 |
|---|---|---|
| committer | James Molloy <james.molloy@arm.com> | 2016-09-08 12:58:04 +0000 |
| commit | 7c7255e40b9115802987690516fb10301e22a313 (patch) | |
| tree | 623d933c0b418a3ea47c78fcaaaa0094926e7a6d /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | |
| parent | cc7b4b511bb366dd2b404b4ec176638954e90a3d (diff) | |
| download | llvm-7c7255e40b9115802987690516fb10301e22a313.zip llvm-7c7255e40b9115802987690516fb10301e22a313.tar.gz llvm-7c7255e40b9115802987690516fb10301e22a313.tar.bz2 | |
[Thumb1] Fix cost calculation for complemented immediates
Materializing something like "-3" can be done as 2 instructions:
MOV r0, #3
MVN r0, r0
This has a cost of 2, not 3. It looks like we were already trying to detect this pattern in TII::getIntImmCost(), but were taking the complement of the zero-extended value instead of the sign-extended value which is unlikely to ever produce a number < 256.
There were no tests failing after changing this... :/
llvm-svn: 280928
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
0 files changed, 0 insertions, 0 deletions
