diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-07-01 19:07:09 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-07-01 19:07:09 +0000 |
commit | 68b0e8456e7934b97ffb22b07fdde705abd33fd1 (patch) | |
tree | 9fd4e4c3da59ac17de83aa1d98c8b3c386f62863 /llvm/lib | |
parent | 61abb2aea7cd69b82f7fdddd1ea2d305720558c2 (diff) | |
download | bcm5719-llvm-68b0e8456e7934b97ffb22b07fdde705abd33fd1.tar.gz bcm5719-llvm-68b0e8456e7934b97ffb22b07fdde705abd33fd1.zip |
Fix off-by-one error.
(low two bits always zero, so off by one bit of encoded value).
llvm-svn: 134247
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/Thumb2SizeReduction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp b/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp index 692189ce6c7..c741a6e8a5b 100644 --- a/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp +++ b/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp @@ -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; |