[PATCH] D116616: [InstSimplify] use knownbits to fold more udiv/urem
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 5 06:18:34 PST 2022
foad added a comment.
In D116616#3222181 <https://reviews.llvm.org/D116616#3222181>, @spatel wrote:
> In D116616#3221740 <https://reviews.llvm.org/D116616#3221740>, @foad wrote:
>
>> It seems like you're using knownbits information to derive range information. It would be good to do this more universally, and in both directions.
>
> Yes - we do have a combination analysis called "computeConstantRangeIncludingKnownBits", so that should be more powerful.
> But that is currently a static helper function in ValueTracking, so it would have to be made visible, and it would be good to have more tests to show where the extra logic gives us a better result. Ok to make that a TODO item?
Sure. I don't object to the current patch. Just wanted to understand if there's a way of doing this more universally in future.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116616/new/
https://reviews.llvm.org/D116616
More information about the llvm-commits
mailing list