[PATCH] D139076: [InstCombine] fold icmp + select pattern by distributive laws
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 2 08:28:58 PST 2022
spatel added a comment.
Please pre-commit baseline tests.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:387-388
+ match(FI, m_ICmp(FPred, m_Value(), m_Value()))) {
+ if (TPred == FPred &&
+ (TPred == ICmpInst::ICMP_EQ || TPred == ICmpInst::ICMP_NE)) {
+ if (Value *MatchOp = getCommonOp(TI, FI, true)) {
----------------
Can shorten this:
if (TPred == FPred && ICmpInst::isEquality(TPred))
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139076/new/
https://reviews.llvm.org/D139076
More information about the llvm-commits
mailing list