[llvm] 278c429 - [ValueTracking] Drop ucmp/scmp from getIntrinsicRange() (NFCI)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 22 01:56:12 PDT 2025


Author: Nikita Popov
Date: 2025-04-22T10:56:04+02:00
New Revision: 278c429d11e63bc709ea8c537b23c4e350ce2a07

URL: https://github.com/llvm/llvm-project/commit/278c429d11e63bc709ea8c537b23c4e350ce2a07
DIFF: https://github.com/llvm/llvm-project/commit/278c429d11e63bc709ea8c537b23c4e350ce2a07.diff

LOG: [ValueTracking] Drop ucmp/scmp from getIntrinsicRange() (NFCI)

After #135642 we have a range attribute on the intrinsic declaration,
so we should not need the special handling here.

Added: 
    

Modified: 
    llvm/lib/Analysis/ValueTracking.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index cdf7f052943c8..1d3f8b7207a63 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -10146,10 +10146,6 @@ 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(Width, 2));
   default:
     break;
   }


        


More information about the llvm-commits mailing list