[llvm] c5a5f43 - Reapply [ValueTracking] Drop ucmp/scmp from getIntrinsicRange() (NFCI)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 22 07:55:50 PDT 2025


Author: Nikita Popov
Date: 2025-04-22T16:55:42+02:00
New Revision: c5a5f4330a0014b9beafef1c75cc66dba917fa09

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

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

Reapply after d51b2785abf77978d9218a7b6fb5b8ec6c770c31, which should
fix optimization regressions.

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