[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
Wed Mar 9 13:35:50 PST 2016
haicheng added a comment.
In http://reviews.llvm.org/D17921#371030, @reames wrote:
> Why is it a good idea to canonicalize sdiv to udiv in general? I can see why when the second operand is a special constant, but why in general?
Thank you for reviewing the patch. I do this in general just because InstCombiner::visitSDiv() changes sdiv->udiv when both operands are nonnegative (the last case in visitSDiv()).
I agree that the most profitable case is that the second operand is a PowerOfTwo and I have no problem only taking care of this special case.
Repository:
rL LLVM
http://reviews.llvm.org/D17921
More information about the llvm-commits
mailing list