[PATCH] D99912: Look through invertible recurrences in isKnownNonEqual

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 11:59:04 PDT 2021


reames added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2609
+    }
+    assert(PN1->getOperand(1) == BO1 && PN2->getOperand(1) == BO2);
+    return 0;
----------------
nikic wrote:
> Guess there isn't really a reason why it should be the same operand on both. We could restrict to the case where it is, or else make getInvertibleOperand not return an operand index, and instead return a pair of value to which the (in)equality relation propagates.
Oh, duh.  Thanks for this comment, I'd been staring at the assertion failures without having this occur to me.  Thanks.

I'll probably do the restrictive form first, then generalize in a separate patch.  


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99912



More information about the llvm-commits mailing list