diff options
Diffstat (limited to 'polly/lib/CodeGen')
-rw-r--r-- | polly/lib/CodeGen/IRBuilder.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/polly/lib/CodeGen/IRBuilder.cpp b/polly/lib/CodeGen/IRBuilder.cpp index 3efa7c88389..4c94b9bae87 100644 --- a/polly/lib/CodeGen/IRBuilder.cpp +++ b/polly/lib/CodeGen/IRBuilder.cpp @@ -160,11 +160,13 @@ static llvm::Value *getMemAccInstPointerOperand(Instruction *Inst) { void ScopAnnotator::annotateSecondLevel(llvm::Instruction *Inst, llvm::Value *BasePtr) { - auto *PtrSCEV = SE->getSCEV(getMemAccInstPointerOperand(Inst)); + Value *Ptr = getMemAccInstPointerOperand(Inst); + if (!Ptr) + return; + + auto *PtrSCEV = SE->getSCEV(Ptr); auto *BasePtrSCEV = SE->getPointerBase(PtrSCEV); - if (!PtrSCEV) - return; auto SecondLevelAliasScope = SecondLevelAliasScopeMap.lookup(PtrSCEV); auto SecondLevelOtherAliasScopeList = SecondLevelOtherAliasScopeListMap.lookup(PtrSCEV); |