[llvm] [InstCombine] Use KnownBits predicate helpers (PR #115874)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 08:08:02 PST 2024
nikic wrote:
> > The reason this only makes a different for pointers is that simplifyICmpInst calls isKnownNonEqual, which does a KnownBits based check for integers, but not pointers.
> > So an alternative fix would be to adjust isKnownNonEqual() to handle this for pointers as well.
>
> The two don't seem mutually exclusive. This patch has value IMO even if it's just dropping some bespoke logic for better tested/implemented apis
Generally agree. However, I just tested the isKnownNonEqual change, and that one has more significant compile-time impact: http://llvm-compile-time-tracker.com/compare.php?from=6d8d9fc8d279623cca94b2b875a92517ed308f18&to=49f63dc5015abe32735e99c39cf86bab32a7a19a&stat=instructions:u It's adding 0.2% to clang thin link.
So I'm inclined to go with this patch only.
https://github.com/llvm/llvm-project/pull/115874
More information about the llvm-commits
mailing list