[PATCH] D47010: [NewGVN] Minor cleanups

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 17 05:13:51 PDT 2018


fhahn added inline comments.


================
Comment at: lib/Transforms/Scalar/NewGVN.cpp:1930
       if (BranchOp0 == Op0 && BranchOp1 == Op1) {
-        if (PBranch->TrueEdge) {
-          // If we know the previous predicate is true and we are in the true
-          // edge then we may be implied true or false.
-          if (CmpInst::isImpliedTrueByMatchingCmp(BranchPredicate,
-                                                  OurPredicate)) {
-            addPredicateUsers(PI, I);
-            return createConstantExpression(
-                ConstantInt::getTrue(CI->getType()));
-          }
+        if (!PBranch->TrueEdge) {
+          BranchPredicate = CmpInst::getInversePredicate(BranchPredicate);
----------------
Nit: no braces for one statements blocks.


Repository:
  rL LLVM

https://reviews.llvm.org/D47010





More information about the llvm-commits mailing list