[llvm] [InstCombine] Simplification for (-a * b) / (a * b). (PR #71768)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 13 05:54:23 PST 2023


================
@@ -1544,6 +1544,13 @@ Instruction *InstCombinerImpl::visitSDiv(BinaryOperator &I) {
     }
   }
 
+  // -(X * Y) / (X * Y) --> -1
----------------
dtcxzyw wrote:

Please move the logic into `isKnownNegation`.

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


More information about the llvm-commits mailing list