[llvm] [InstCombine] Improve handling of `not` and free inversion. (PR #66787)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 10:41:07 PST 2023


================
@@ -2224,12 +2224,17 @@ Instruction *InstCombinerImpl::visitSub(BinaryOperator &I) {
   // (~X) - (~Y) --> Y - X
   // This is placed after the other reassociations and explicitly excludes a
   // sub-of-sub pattern to avoid infinite looping.
----------------
goldsteinn wrote:

Although the whole thing is deprecated as ensuring we consume a `not` is what precludes inf loop.

https://github.com/llvm/llvm-project/pull/66787


More information about the llvm-commits mailing list