[Reassociate] Canonicalize negative constants out of expressions.
authorChad Rosier <mcrosier@codeaurora.org>
Tue, 11 Nov 2014 22:58:35 +0000 (22:58 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Tue, 11 Nov 2014 22:58:35 +0000 (22:58 +0000)
commit094ac7735b375dfc34c413d4a2c4fd1ce30975ab
tree5c26646eb763f28c9dc7793625798d7c314963b7
parent8278644dc87c98d9b244db33490cca2b0a7b31c8
[Reassociate] Canonicalize negative constants out of expressions.

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
llvm/lib/Transforms/Scalar/Reassociate.cpp
llvm/test/Transforms/Reassociate/basictest.ll
llvm/test/Transforms/Reassociate/canonicalize-neg-const.ll [new file with mode: 0644]
llvm/test/Transforms/Reassociate/liftsign.ll [deleted file]
llvm/test/Transforms/Reassociate/wrap-flags.ll