[PATCH] D60723: [EarlyCSE] detect equivalence of selects with inverse conditions and commuted operands (PR41101)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 16 11:48:38 PDT 2019
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/Scalar/EarlyCSE.cpp:279
+ auto matchSelectWithOptionalNotCond = [](Value *V, Value *&Cond, Value *&T,
+ Value *&F) {
+ if (match(V, m_Select(m_Value(Cond), m_Value(T), m_Value(F)))) {
----------------
I'd still suggest to move this into a static function and use it in the hashing code as well. (But as-is is also fine.)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60723/new/
https://reviews.llvm.org/D60723
More information about the llvm-commits
mailing list