[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:36:41 PDT 2024
================
@@ -9393,6 +9393,10 @@ static ConstantRange getRangeForIntrinsic(const IntrinsicInst &II) {
if (!II.getParent() || !II.getFunction())
break;
return getVScaleRange(II.getFunction(), Width);
+ case Intrinsic::scmp:
+ case Intrinsic::ucmp:
+ return ConstantRange::getNonEmpty(APInt::getAllOnes(Width),
+ APInt::getOneBitSet(Width, 0));
----------------
Poseydon42 wrote:
Thanks, fixed.
https://github.com/llvm/llvm-project/pull/96410
More information about the llvm-commits
mailing list