aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-04-03 21:31:21 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-04-03 21:31:21 +0000
commitb03eacdbf39b37a98b65b936046b22cca8215d8d (patch)
tree951ce813ee347718adddd8c40e9c20eeeae51a80 /lib
parent01deb9d91c2c1587749d2e456e2eab7dcdcfecaa (diff)
downloadexternal_llvm-b03eacdbf39b37a98b65b936046b22cca8215d8d.zip
external_llvm-b03eacdbf39b37a98b65b936046b22cca8215d8d.tar.gz
external_llvm-b03eacdbf39b37a98b65b936046b22cca8215d8d.tar.bz2
Fixed a bug that causes codegen of noop like add r0, r0, #0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35627 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/ARMRegisterInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMRegisterInfo.cpp b/lib/Target/ARM/ARMRegisterInfo.cpp
index abc0ad8..bf6adbd 100644
--- a/lib/Target/ARM/ARMRegisterInfo.cpp
+++ b/lib/Target/ARM/ARMRegisterInfo.cpp
@@ -732,7 +732,7 @@ void ARMRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
// a sequence of ADDri instructions. First though, pull as much of the imm
// into this ADDri as possible.
unsigned RotAmt = ARM_AM::getSOImmValRotate(Offset);
- unsigned ThisImmVal = Offset & ARM_AM::rotr32(0xFF, (32-RotAmt) & 31);
+ unsigned ThisImmVal = Offset & ARM_AM::rotr32(0xFF, RotAmt);
// We will handle these bits from offset, clear them.
Offset &= ~ThisImmVal;