mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Fix ScalarEvolution::isLoopGuardedByCond to accept a null Loop*, for
consistency with other routines that use a null Loop* to mean code not contained by any loop. llvm-svn: 72008
This commit is contained in:
parent
153b5acb45
commit
e50a960c5a
@ -3328,6 +3328,10 @@ ScalarEvolution::getPredecessorWithUniqueSuccessorForBB(BasicBlock *BB) {
|
||||
bool ScalarEvolution::isLoopGuardedByCond(const Loop *L,
|
||||
ICmpInst::Predicate Pred,
|
||||
const SCEV *LHS, const SCEV *RHS) {
|
||||
// Interpret a null as meaning no loop, where there is obviously no guard
|
||||
// (interprocedural conditions notwithstanding).
|
||||
if (!L) return false;
|
||||
|
||||
BasicBlock *Predecessor = getLoopPredecessor(L);
|
||||
BasicBlock *PredecessorDest = L->getHeader();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user