[all-commits] [llvm/llvm-project] 78f7ca: [InstCombine] Use KnownBits predicate helpers (#11...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Nov 14 01:14:12 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 78f7ca0980f3369da19e3cbb01890fe718307ac2
https://github.com/llvm/llvm-project/commit/78f7ca0980f3369da19e3cbb01890fe718307ac2
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-11-14 (Thu, 14 Nov 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/icmp-gep.ll
M llvm/test/Transforms/InstCombine/mul-inseltpoison.ll
M llvm/test/Transforms/InstCombine/mul.ll
M llvm/test/Transforms/InstCombine/shift-amount-reassociation-in-bittest.ll
Log Message:
-----------
[InstCombine] Use KnownBits predicate helpers (#115874)
Inside foldICmpUsingKnownBits(), instead of rolling our own logic based
on min/max values, make use of ICmpInst::compare() working on KnownBits.
This gives better results for the equality predicates. In practice, the
improvement is only for pointers, because isKnownNonEqual() handles the
non-pointer case.
I've adjusted some tests to prevent the new fold from triggering, to
retain their original intent of testing constant expressions.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list