summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMAddressingModes.h
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-04-13 20:35:16 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-04-13 20:35:16 +0000
commit44d7d183fafa02e1707224200edf8f8a952a86dd (patch)
treeca79e4faa09c669037f92f80a1c88be0388d7bde /llvm/lib/Target/ARM/ARMAddressingModes.h
parent12d150ea430248174e624815865565703be89e3c (diff)
downloadbcm5719-llvm-44d7d183fafa02e1707224200edf8f8a952a86dd.tar.gz
bcm5719-llvm-44d7d183fafa02e1707224200edf8f8a952a86dd.zip
Changed getSOImmValRotate()'s hunt retry logic to ignore the low order 6 bits,
instead of 7, because we are only looking for even rotate amount. llvm-svn: 101172
Diffstat (limited to 'llvm/lib/Target/ARM/ARMAddressingModes.h')
-rw-r--r--llvm/lib/Target/ARM/ARMAddressingModes.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMAddressingModes.h b/llvm/lib/Target/ARM/ARMAddressingModes.h
index f414744fa2f..e68354a42f8 100644
--- a/llvm/lib/Target/ARM/ARMAddressingModes.h
+++ b/llvm/lib/Target/ARM/ARMAddressingModes.h
@@ -151,10 +151,10 @@ namespace ARM_AM {
if ((rotr32(Imm, RotAmt) & ~255U) == 0)
return (32-RotAmt)&31; // HW rotates right, not left.
- // For values like 0xF000000F, we should ignore the low 7 bits, then
+ // For values like 0xF000000F, we should ignore the low 6 bits, then
// retry the hunt.
- if (Imm & 127U) {
- unsigned TZ2 = CountTrailingZeros_32(Imm & ~127U);
+ if (Imm & 63U) {
+ unsigned TZ2 = CountTrailingZeros_32(Imm & ~63U);
unsigned RotAmt2 = TZ2 & ~1;
if ((rotr32(Imm, RotAmt2) & ~255U) == 0)
return (32-RotAmt2)&31; // HW rotates right, not left.
OpenPOWER on IntegriCloud