OSDN Git Service

[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)
commit2244d9a5d25dbb9290250935eec6a319c0026c49
tree82fb98251123e8a56c34c90b86e8ded8119054ed
parentabb3335f6dc853af80185282e8ca37b8bd5e5b75
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221721 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/Reassociate.cpp
test/Transforms/Reassociate/basictest.ll
test/Transforms/Reassociate/canonicalize-neg-const.ll [new file with mode: 0644]
test/Transforms/Reassociate/liftsign.ll [deleted file]
test/Transforms/Reassociate/wrap-flags.ll