[llvm] [CVP]: Fold `icmp eq X, C` to `trunc X to i1` if C=2k+1 and X in [2k, 2k+1] (PR #83829)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 03:57:30 PST 2024


================
@@ -340,6 +373,9 @@ static bool processCmp(CmpInst *Cmp, LazyValueInfo *LVI) {
     if (processICmp(ICmp, LVI))
       return true;
 
+  if (processEqualityICmp(Cmp, LVI))
----------------
dtcxzyw wrote:

Please move the logic into `processICmp`.

https://github.com/llvm/llvm-project/pull/83829


More information about the llvm-commits mailing list