1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

[LoopPredication] NFC. Add an early exit if there is no guards in the loop

llvm-svn: 303424
This commit is contained in:
Artur Pilipenko 2017-05-19 13:59:34 +00:00
parent 53c7c408ae
commit 231491f091

View File

@ -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;