diff options
author | Johnny Chen <johnny.chen@apple.com> | 2010-04-13 20:35:16 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2010-04-13 20:35:16 +0000 |
commit | 8a87ffb9252d6d66093dcd96f3b9a496dae4a439 (patch) | |
tree | ad38492fa327899aa36073eda6a8113252062a7d | |
parent | 50d80e394d9612e15d9f84b67ed45f88a7826ea6 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101172 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMAddressingModes.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMAddressingModes.h b/lib/Target/ARM/ARMAddressingModes.h index f414744fa2..e68354a42f 100644 --- a/lib/Target/ARM/ARMAddressingModes.h +++ b/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. |