summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMFastISel.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-11-14 22:34:48 +0000
committerChad Rosier <mcrosier@apple.com>2011-11-14 22:34:48 +0000
commit45110fdf8dd0bcc187b7d310b3c643ddd2af0515 (patch)
treebeba408d2e48f5fda34233a54137d1a577eeed77 /llvm/lib/Target/ARM/ARMFastISel.cpp
parent7996b157240dec6b0ee19207135f69d2eb8c4151 (diff)
downloadbcm5719-llvm-45110fdf8dd0bcc187b7d310b3c643ddd2af0515.tar.gz
bcm5719-llvm-45110fdf8dd0bcc187b7d310b3c643ddd2af0515.zip
Fix a performance regression from r144565. Positive offsets were being lowered
into registers, rather then encoded directly in the load/store. llvm-svn: 144576
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFastISel.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMFastISel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp
index 81a93b1ed3b..0b728a94fa0 100644
--- a/llvm/lib/Target/ARM/ARMFastISel.cpp
+++ b/llvm/lib/Target/ARM/ARMFastISel.cpp
@@ -874,9 +874,9 @@ void ARMFastISel::ARMSimplifyAddress(Address &Addr, EVT VT, bool useAM3) {
// Integer loads/stores handle 12-bit offsets.
needsLowering = ((Addr.Offset & 0xfff) != Addr.Offset);
// Handle negative offsets.
- if (isThumb2)
- needsLowering = !(needsLowering && Subtarget->hasV6T2Ops() &&
- Addr.Offset < 0 && Addr.Offset > -256);
+ if (needsLowering && isThumb2)
+ needsLowering = !(Subtarget->hasV6T2Ops() && Addr.Offset < 0 &&
+ Addr.Offset > -256);
} else {
// ARM halfword load/stores and signed byte loads use +/-imm8 offsets.
needsLowering = (Addr.Offset > 255 || Addr.Offset < -255);
OpenPOWER on IntegriCloud