[PATCH] D142253: [InstCombine] Transform ctpop(Pow2) -> icmp ne Pow2,  0
    Nikita Popov via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sat Jan 21 01:12:31 PST 2023
    
    
  
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:673
     return BinaryOperator::CreateLShr(
         Op0, ConstantInt::get(Ty, (~Known.Zero).exactLogBase2()));
 
----------------
If the new pattern reliably subsumes this one, we should drop it in a followup.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142253/new/
https://reviews.llvm.org/D142253
    
    
More information about the llvm-commits
mailing list