summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ImplicitNullChecks.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2016-03-09 16:00:35 +0000
committerChad Rosier <mcrosier@codeaurora.org>2016-03-09 16:00:35 +0000
commitc27a18f39fa155583a5a124549137016cb8c7712 (patch)
treef316fd4a7f4422f6817d9472287c4011b9a083a9 /llvm/lib/CodeGen/ImplicitNullChecks.cpp
parent069b432bf7357b680384f4a90b596c8b9cb2c343 (diff)
downloadbcm5719-llvm-c27a18f39fa155583a5a124549137016cb8c7712.tar.gz
bcm5719-llvm-c27a18f39fa155583a5a124549137016cb8c7712.zip
[TII] Allow getMemOpBaseRegImmOfs() to accept negative offsets. NFC.
http://reviews.llvm.org/D17967 llvm-svn: 263021
Diffstat (limited to 'llvm/lib/CodeGen/ImplicitNullChecks.cpp')
-rw-r--r--llvm/lib/CodeGen/ImplicitNullChecks.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/ImplicitNullChecks.cpp b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
index 39c1b9fb9a6..a413aebac23 100644
--- a/llvm/lib/CodeGen/ImplicitNullChecks.cpp
+++ b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
@@ -46,10 +46,9 @@
using namespace llvm;
-static cl::opt<unsigned> PageSize("imp-null-check-page-size",
- cl::desc("The page size of the target in "
- "bytes"),
- cl::init(4096));
+static cl::opt<int> PageSize("imp-null-check-page-size",
+ cl::desc("The page size of the target in bytes"),
+ cl::init(4096));
#define DEBUG_TYPE "implicit-null-checks"
@@ -324,7 +323,8 @@ bool ImplicitNullChecks::analyzeBlockForNullChecks(
for (auto MII = NotNullSucc->begin(), MIE = NotNullSucc->end(); MII != MIE;
++MII) {
MachineInstr *MI = &*MII;
- unsigned BaseReg, Offset;
+ unsigned BaseReg;
+ int64_t Offset;
if (TII->getMemOpBaseRegImmOfs(MI, BaseReg, Offset, TRI))
if (MI->mayLoad() && !MI->isPredicable() && BaseReg == PointerReg &&
Offset < PageSize && MI->getDesc().getNumDefs() <= 1 &&
OpenPOWER on IntegriCloud