This is a reapplication of r221171, but we only perform the transformation on expressions which include a multiplication. We do not transform rem/div operations as this doesn't appear to be safe in all cases. llvm-svn: 221721
Part of PR12985. Phabricator Revision: http://reviews.llvm.org/D6172 llvm-svn: 221555