1. [InstCombine] factorize left shifts of add/sub (details)
Commit 7903ae4720a8c4f3c694954d56293c7507e07945 by spatel
[InstCombine] factorize left shifts of add/sub

We do similar factorization folds in SimplifyUsingDistributiveLaws,
but that drops no-wrap properties. Propagating those optimally may
help solve:

The propagation is all-or-nothing for these patterns: when all
3 incoming ops have nsw or nuw, the 2 new ops should have the
same no-wrap property:

This also solves:
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp (diff)
The file was modifiedllvm/test/Transforms/InstCombine/shl-factor.ll (diff)