[PATCH] D31238: [ScalarEvolution] Re-enable Predicate implication from operations

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 00:35:32 PDT 2017


mkazantsev added inline comments.


================
Comment at: lib/Analysis/ScalarEvolution.cpp:8589
+    // TODO: Maybe try to get RHS from sext to catch more cases?
+    if (LHSAddExpr->getType() != RHS->getType())
+      return false;
----------------
This is not entirely correct, because the type lf ADD is defined by the type of its last argument. It may not match with the type of the 1st argument. The problem is that one of the operands is sometimes a reference.

 So we run into "assert(S1->getType() == S2->getType() && "Proving for wrong types?");" failure in this case.


https://reviews.llvm.org/D31238





More information about the llvm-commits mailing list