[InstCombine] Add CTPOP -> CTTZ simplifications (PR43513)
As detailed on PR43513, we can simplify: ctpop(x | -x) -> bitwidth - cttz(x, false) Alive2: http://volta.cs.utah.edu:8080/z/caw49X ctpop(~x & (x - 1)) -> cttz(x, false) Alive2: http://volta.cs.utah.edu:8080/z/5zfVrx I've tweaked the initial test cases I added at rG2d712fb75584 to increase commutativity testing. Differential Revision: https://reviews.llvm.org/D76568
Loading
Please sign in to comment