Followup to D72978. This moves existing negation handling in InstCombine into freelyNegateValue(), which make it more composable. In particular, root negations of div/zext/sext/ashr/lshr/sub can now always be performed through a shl/trunc as well.
The next step is to add multiply support to fix https://bugs.llvm.org/show_bug.cgi?id=44234.
Seems like this would be more efficient as a "switch(V->getOpcode())"?
Then, we could combine cases like ashr/lshr by using Builder.CreateBinOp(V->getOpcode()...). Similarly combine zext/sext with Builder.CreateCast().