[llvm] [InstCombine] Improve handling of `not` and free inversion. (PR #66787)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 12:14:41 PST 2023
================
@@ -1662,6 +1662,24 @@ Instruction *InstCombinerImpl::visitAdd(BinaryOperator &I) {
m_c_UMin(m_Deferred(A), m_Deferred(B))))))
return BinaryOperator::CreateWithCopiedFlags(Instruction::Add, A, B, &I);
+ // (~X) + (~Y) --> (-2 - Y) - X
+ {
+ // To ensure we can save instructions we need to ensure that we either
----------------
nikic wrote:
```suggestion
// To ensure we can save instructions we need to ensure that we
```
https://github.com/llvm/llvm-project/pull/66787
More information about the llvm-commits
mailing list