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

Haicheng Wu via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 13:39:01 PST 2016


haicheng added a comment.

In http://reviews.llvm.org/D17921#368916, @bkramer wrote:

> Why can't this be handled by SimplifyDemandedBits instead of CVP?


If I understand it correctly, SimplifyDemandedBits relies on ValueTracking::computeKnownBits() to find KnownZero and KnownOne.  @reames had some experimental code, dom-condition, in ValueTracking that was able to find out non-local information such as j>1 in the example for computeKnownBits().  However, the experimental code is removed in r262646.  Moreover, I think approaches similar to dom-condition might be too much for my simple case.  Maybe, @reames could provide my insights.

Besides, is there any downsides of doing it in CVP?


Repository:
  rL LLVM

http://reviews.llvm.org/D17921





More information about the llvm-commits mailing list