[PATCH] D29747: PredicateInfo: Support switch statements
    Daniel Berlin via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Feb  9 20:54:46 PST 2017
    
    
  
dberlin added inline comments.
================
Comment at: lib/Transforms/Scalar/NewGVN.cpp:862
+        // If the comparison is true when the operands are equal, then we know
+        // the
+        // operands are equal, because assumes must always be true.
----------------
sigh, clang format, i'll fix
================
Comment at: lib/Transforms/Scalar/NewGVN.cpp:876
+          return createConstantExpression(
+              ConstantInt::getFalse(Cmp->getType()));
+        } else if ((PBranch->TrueEdge && CmpInst::isTrueWhenEqual(Predicate)) ||
----------------
ditto
================
Comment at: lib/Transforms/Scalar/NewGVN.cpp:880
+                    CmpInst::isFalseWhenEqual(Predicate))) {
+          // If we are *not* a copy of the comparison, we may equal to the other
+          // operand when
----------------
ditto
https://reviews.llvm.org/D29747
    
    
More information about the llvm-commits
mailing list