mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-31 15:53:42 +00:00
[PPC] PPCLoopPreIncPrep - silence static analyzer null dereference warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2211abcace
commit
a12910ca83
@ -481,7 +481,7 @@ bool PPCLoopPreIncPrep::runOnLoop(Loop *L) {
|
||||
if (PtrIP && isa<Instruction>(NewBasePtr) &&
|
||||
cast<Instruction>(NewBasePtr)->getParent() == PtrIP->getParent())
|
||||
PtrIP = nullptr;
|
||||
else if (isa<PHINode>(PtrIP))
|
||||
else if (PtrIP && isa<PHINode>(PtrIP))
|
||||
PtrIP = &*PtrIP->getParent()->getFirstInsertionPt();
|
||||
else if (!PtrIP)
|
||||
PtrIP = I->Instr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user