[llvm] [InstSimplify] Provide information about the range of possible values that `ucmp`/`scmp` can return (PR #96410)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 23 07:39:54 PDT 2024
Poseydon42 wrote:
I don't know how many places do use the range attribute to aid their optimizations, but if that number is not too high then I feel like the current approach should be preferred to inventing something new for a single use case. Additionally, I think that in many places where range information is used, the actual range can be shrunk depending on the ranges of the arguments (e.g. the default `[-1,2)` range can be shrunk down to `[-1,1)` when we know that `LHS <= RHS`. Therefore, I think it may be more optimal to implement this sort of check in the places that do use the range info separately, instead of adding this information on the level of intrinsic itself.
https://github.com/llvm/llvm-project/pull/96410
More information about the llvm-commits
mailing list