summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit39d8b4db922eaf990baff737320e9950d1acf8a5 (patch)
tree02a6243b1f4c58da12c52da7a1703d8808f5776d /llvm
parenta74deafb13969e1570ec47504959bcff3afbf4c9 (diff)
downloadbcm5719-llvm-39d8b4db922eaf990baff737320e9950d1acf8a5.tar.gz
bcm5719-llvm-39d8b4db922eaf990baff737320e9950d1acf8a5.zip
Fixed a bug that causes codegen of noop like add r0, r0, #0.
llvm-svn: 35627
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/ARM/ARMRegisterInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMRegisterInfo.cpp b/llvm/lib/Target/ARM/ARMRegisterInfo.cpp
index abc0ad82743..bf6adbd95f3 100644
--- a/llvm/lib/Target/ARM/ARMRegisterInfo.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud