[Thumb] Fix off-by-one error in r272007
commita523293cd962aa6eaf71e62b9a945aec81d05595
authorJames Molloy <james.molloy@arm.com>
Tue, 14 Jun 2016 13:33:07 +0000 (14 13:33 +0000)
committerJames Molloy <james.molloy@arm.com>
Tue, 14 Jun 2016 13:33:07 +0000 (14 13:33 +0000)
tree4ff085ed14e5565843b59431a87d61253497bc23
parent49fa89507c3a54c8e0934f46a874d497c3b0c526
[Thumb] Fix off-by-one error in r272007

We can only generate immediates up to #510 with a MOV+ADD, not #511, because there's no such instruction as add #256.

Found by Oliver Stannard and csmith!

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