[PATCH] D52508: [InstCombine] Clean up after IndVarSimplify

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 11 11:38:16 PDT 2018


lebedev.ri added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineAddSub.cpp:1201
+      m_Value(Select));
+  if (match(&I, m_c_BinOp(m_Value(A), m_OneUse(m_Not(m_OneUse(SelectPred))))) &&
+      IsFreeToInvert(B, B->hasOneUse())) {
----------------
dmgreen wrote:
> lebedev.ri wrote:
> > `m_Value(A)` will *always* match.
> > I wonder if would it make sense to swap them around?
> > 
> I believe we have to match A before the m_Deferred. I've added a test for matching both ways round.
D'oh, right, sorry.


https://reviews.llvm.org/D52508





More information about the llvm-commits mailing list