[PATCH] D17921: [CorrelatedValuePropagation] Convert an SDiv to a UDiv if both operands are known to be nonnegative

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 06:04:27 PST 2016


mcrosier added inline comments.

================
Comment at: lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:342
@@ -339,1 +341,3 @@
 
+/// processSDiv - See if LazyValueInfo's ability to exploit edge conditions,
+/// or range information is sufficient to prove the both operands of this SDiv
----------------
No need to include the function name in the comments.  I believe doxygen will take care of this for you.

================
Comment at: lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:348
@@ +347,3 @@
+bool CorrelatedValuePropagation::processSDiv(BinaryOperator *SDI) {
+  if (!SDI->getType()->isIntegerTy())
+    return false;
----------------
Is this check to make sure we don't try to optimize vectors?  If so, it might be more clear to use isVectorTy(), rather than !isIntegerTy().


Repository:
  rL LLVM

http://reviews.llvm.org/D17921





More information about the llvm-commits mailing list