]> granicus.if.org Git - llvm/commit
Reassociate x + -0.1234 * y into x - 0.1234 * y
authorErik Verbruggen <erikjv@me.com>
Thu, 21 Aug 2014 10:45:30 +0000 (10:45 +0000)
committerErik Verbruggen <erikjv@me.com>
Thu, 21 Aug 2014 10:45:30 +0000 (10:45 +0000)
commit0edc5e839156ce1b8af863a01398c190634e99f0
treeb3d9feea26edce176cf3ae8cf63d91abeba7936d
parentf11ac42d01b99970f5335a78dd4277184c3a3c1f
Reassociate x + -0.1234 * y into x - 0.1234 * y

This does not require -ffast-math, and it gives CSE/GVN more options to
eliminate duplicate expressions in, e.g.:

  return ((x + 0.1234 * y) * (x - 0.1234 * y));

Differential Revision: http://reviews.llvm.org/D4904

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216169 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/README.txt
lib/Transforms/Scalar/Reassociate.cpp
test/Transforms/Reassociate/fast-basictest.ll
test/Transforms/Reassociate/liftsign.ll [new file with mode: 0644]