[Reassociate] Canonicalize negative constants out of expressions.
authorChad Rosier <mcrosier@codeaurora.org>
Mon, 3 Nov 2014 19:11:30 +0000 (19:11 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Mon, 3 Nov 2014 19:11:30 +0000 (19:11 +0000)
commit3f4e9cb609e9be23b4835abaa34aca62cfc68d3c
tree6f68b0f6d794b799c71bfd95a18cca3004d93873
parentcf7bb7fb68f47db272e29b9213c907c6ad5bcdca
[Reassociate] Canonicalize negative constants out of expressions.

This gives CSE/GVN more options to eliminate duplicate expressions.
This is a follow up patch to http://reviews.llvm.org/D4904.

http://reviews.llvm.org/D5363

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221171 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]