Fix off-by-one error.

(low two bits always zero, so off by one bit of encoded value).

llvm-svn: 134247
This commit is contained in:
Jim Grosbach 2011-07-01 19:07:09 +00:00
parent 61abb2aea7
commit 68b0e8456e
1 changed files with 1 additions and 1 deletions

View File

@ -491,7 +491,7 @@ Thumb2SizeReduce::ReduceSpecial(MachineBasicBlock &MBB, MachineInstr *MI,
// The immediate must be in range, the destination register must be a low
// reg, the predicate must be "always" and the condition flags must not
// be being set.
if (Imm & 3 || Imm > 1024)
if (Imm & 3 || Imm > 1020)
return false;
if (!isARMLowRegister(MI->getOperand(0).getReg()))
return false;