Revert "[Reassociate] Canonicalize negative constants out of expressions."
authorReid Kleckner <reid@kleckner.net>
Tue, 4 Nov 2014 23:42:45 +0000 (23:42 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 4 Nov 2014 23:42:45 +0000 (23:42 +0000)
commit11e6e005b7498b37d890f7c54ad1f13e06cb4e74
treee9376ecdfe0df7d3397ac1a053317c940b30074d
parent4ad0654bb4fef86b0cee8c0393d38304d352aa8d
Revert "[Reassociate] Canonicalize negative constants out of expressions."

This reverts commit r221171.

It performs this invalid transformation:
-  %div.i = urem i64 -1, %add
-  %sub.i = sub i64 -2, %div.i
+  %div.i = urem i64 1, %add
+  %sub.i1 = add i64 %div.i, -2

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