summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/LoopInfo.cpp')
-rw-r--r--llvm/lib/Analysis/LoopInfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp
index 1ad4fd893bc..3d30c3a06e2 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -220,6 +220,8 @@ bool Loop::isSafeToClone() const {
if (CI->cannotDuplicate())
return false;
}
+ if (BI->getType()->isTokenTy() && BI->isUsedOutsideOfBlock(*I))
+ return false;
}
}
return true;
OpenPOWER on IntegriCloud