[PATCH] D122152: [InstCombine] Fold two select patterns into and-or
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 09:48:21 PDT 2022
RKSimon added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2574
+ Value *C;
+ // select (~a | c), a, b -> and a, (or c, b)
+ if ((match(CondVal, m_Or(m_Not(m_Value(TrueVal)), m_Value(C))) ||
----------------
add freeze to the description comment
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2581
+ }
+ // select (~c & b), a, b -> and b, (or a, c)
+ if ((match(CondVal, m_And(m_Not(m_Value(C)), m_Value(FalseVal))) ||
----------------
add freeze to the description comment
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122152/new/
https://reviews.llvm.org/D122152
More information about the llvm-commits
mailing list