[PATCH] D140750: [TargetLowering] Teach BuildUDIV to take advantage of leading zeros in the dividend.
    Roman Lebedev via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Dec 29 12:25:29 PST 2022
    
    
  
lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.
LGTM, thank you!
I was wondering if something like this was there while writing that test :)
================
Comment at: llvm/unittests/Support/DivisionByConstantTest.cpp:173
       continue; // Not supported by `UnsignedDivisionByConstantInfo::get()`.
-    if (Bits > 11)
+    if (Bits > 10)
       continue; // Unreasonably slow.
----------------
I have checked this still passes at 14 bits.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140750/new/
https://reviews.llvm.org/D140750
    
    
More information about the llvm-commits
mailing list