summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-01-31 23:35:18 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-01-31 23:35:18 +0000
commite5c19993cdf1578c46d29f38c4931ee88fc6eafc (patch)
tree68a65b1677a1e2966b087a37a3f2d25d0b796044 /llvm/lib/Target
parentb0ff625a318e43a2a26543f9c97c283e2af2c007 (diff)
downloadbcm5719-llvm-e5c19993cdf1578c46d29f38c4931ee88fc6eafc.tar.gz
bcm5719-llvm-e5c19993cdf1578c46d29f38c4931ee88fc6eafc.zip
Handle an interesting corner case: the constpool_entry being reference is two
instructions away, i.e. its address is equal to PC. %r0 = tLDRpci <cp#0> bx CONSTPOOL_ENTRY 0 <cp#0>, 4 llvm-svn: 33728
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMConstantIslandPass.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
index 132ec8030fd..93115288b92 100644
--- a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -472,7 +472,7 @@ bool ARMConstantIslands::CPEIsInRange(MachineInstr *MI, MachineInstr *CPEMI,
<< " at offset " << int(UserOffset-CPEOffset) << "\t"
<< *MI);
- if (UserOffset < CPEOffset) {
+ if (UserOffset <= CPEOffset) {
// User before the CPE.
if (CPEOffset-UserOffset <= MaxDisp)
return true;
@@ -563,7 +563,7 @@ bool ARMConstantIslands::BBIsInRange(MachineInstr *MI,MachineBasicBlock *DestBB,
<< " at offset " << int(BrOffset-DestOffset) << "\t"
<< *MI);
- if (BrOffset < DestOffset) {
+ if (BrOffset <= DestOffset) {
if (DestOffset - BrOffset < MaxDisp)
return true;
} else {
OpenPOWER on IntegriCloud