[PATCH] D60723: [EarlyCSE] detect equivalence of selects with inverse conditions and commuted operands (PR41101)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 13:35:35 PDT 2019


spatel marked an inline comment as done.
spatel added inline comments.


================
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)))) {
----------------
nikic wrote:
> 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.)
Yes, good point. I missed the symmetry.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60723/new/

https://reviews.llvm.org/D60723





More information about the llvm-commits mailing list