
When pushing a sub nsw 0, %x negation into an expression, try to preserve the nsw flag for the cases where this is possible. Do this by passing the flag through recursive Negator::negate() calls. Proofs: https://alive2.llvm.org/ce/z/oRPNcY Differential Revision: https://reviews.llvm.org/D158510