[InstCombine] Limit CTPOP -> CTTZ simplifications to one use
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 23 Mar 2020 14:24:05 +0000 (14:24 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 23 Mar 2020 14:33:41 +0000 (14:33 +0000)
commitfdcb27105537f77c78c4473d4f7c47146ddbab69
tree37d3ce3ddfbdf174ef08effd4e6e992efda44fe2
parent5e1a026c2d81e83e2b88cc6b6f27fbefbfe0de16
[InstCombine] Limit CTPOP -> CTTZ simplifications to one use

Tweak D76568 so we only combine if it will remove the bit-twiddling.

Suggested by @spatel
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/InstCombine/ctpop-cttz.ll