forked from OSchip/llvm-project
[LoopPredication] NFC. Add an early exit if there is no guards in the loop
llvm-svn: 303424
This commit is contained in:
parent
9321e8fcec
commit
46c4e0a4bf
|
@ -272,6 +272,9 @@ bool LoopPredication::runOnLoop(Loop *Loop) {
|
|||
if (II->getIntrinsicID() == Intrinsic::experimental_guard)
|
||||
Guards.push_back(II);
|
||||
|
||||
if (Guards.empty())
|
||||
return false;
|
||||
|
||||
SCEVExpander Expander(*SE, *DL, "loop-predication");
|
||||
|
||||
bool Changed = false;
|
||||
|
|
Loading…
Reference in New Issue