diff options
-rw-r--r-- | include/llvm/Analysis/InstForest.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Analysis/InstForest.h b/include/llvm/Analysis/InstForest.h index e0047965f1..a001f5a1a3 100644 --- a/include/llvm/Analysis/InstForest.h +++ b/include/llvm/Analysis/InstForest.h @@ -218,7 +218,7 @@ inline std::ostream &operator<<(std::ostream &o, const InstForest<Payload> &IF){ // template <class Payload> bool InstTreeNode<Payload>::CanMergeInstIntoTree(Instruction *I) { - if (I->use_size() > 1) return false; + if (!I->use_empty() && !I->hasOneUse()) return false; return I->getParent() == cast<Instruction>(getValue())->getParent(); } |