From: Sylvestre Ledru Date: Tue, 11 Apr 2017 08:21:27 +0000 (+0000) Subject: Simplify the code and remove dead code X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=262869e2bf83bc104a77edf733241fb4f385573a;p=llvm Simplify the code and remove dead code Summary: Fix coverity cid 1374240 Reviewers: dberlin Reviewed By: dberlin Differential Revision: https://reviews.llvm.org/D31928 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299924 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/PredicateInfo.cpp b/lib/Transforms/Utils/PredicateInfo.cpp index aacbd59ca49..8877aeafecd 100644 --- a/lib/Transforms/Utils/PredicateInfo.cpp +++ b/lib/Transforms/Utils/PredicateInfo.cpp @@ -210,11 +210,9 @@ struct ValueDFS_Compare { auto LookupResult = OBBMap.find(BB); if (LookupResult != OBBMap.end()) return LookupResult->second->dominates(AInst, BInst); - else { - auto Result = OBBMap.insert({BB, make_unique(BB)}); - return Result.first->second->dominates(AInst, BInst); - } - return std::tie(ADef, A.U) < std::tie(BDef, B.U); + + auto Result = OBBMap.insert({BB, make_unique(BB)}); + return Result.first->second->dominates(AInst, BInst); } };