[llvm] r307586 - [NewGVN] Simplify a lambda a little bit. NFCI.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 13:45:00 PDT 2017


Author: davide
Date: Mon Jul 10 13:45:00 2017
New Revision: 307586

URL: http://llvm.org/viewvc/llvm-project?rev=307586&view=rev
Log:
[NewGVN] Simplify a lambda a little bit. NFCI.

Modified:
    llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp?rev=307586&r1=307585&r2=307586&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp Mon Jul 10 13:45:00 2017
@@ -866,9 +866,7 @@ PHIExpression *NewGVN::createPHIExpressi
     // Things in TOPClass are equivalent to everything.
     if (ValueToClass.lookup(*U) == TOPClass)
       return false;
-    if (lookupOperandLeader(*U) == PN)
-      return false;
-    return true;
+    return lookupOperandLeader(*U) != PN;
   });
   std::transform(Filtered.begin(), Filtered.end(), op_inserter(E),
                  [&](const Use *U) -> Value * {




More information about the llvm-commits mailing list