[PATCH] D150923: [KnownBits] Factor out and improve the lowbit computation for {u,s}div
    Noah Goldstein via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jun  7 09:43:19 PDT 2023
    
    
  
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Support/KnownBits.cpp:869
   Known.Zero.setHighBits(LeadZ);
-  if (Exact) {
-    // Odd / Odd -> Odd
-    if (LHS.One[0] && RHS.One[0]) {
-      Known.Zero.clearBit(0);
-      Known.One.setBit(0);
-    }
-    // Even / Odd -> Even
-    else if (LHS.Zero[0] && RHS.One[0]) {
-      Known.One.clearBit(0);
-      Known.Zero.setBit(0);
-    }
-    // Odd / Even -> impossible
-    // Even / Even -> unknown
-  }
+  Known = divComputeLowBit(Known, LHS, RHS, Exact);
 
----------------
chapuni wrote:
> Is it a compatible change?
What do you mean by compatible? This change should allow us to compute more low bits than before if that's what you're asking.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150923/new/
https://reviews.llvm.org/D150923
    
    
More information about the llvm-commits
mailing list