optimize vector fneg of bitcasted integer value
authorSanjay Patel <spatel@rotateright.com>
Thu, 14 Aug 2014 15:15:28 +0000 (15:15 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 14 Aug 2014 15:15:28 +0000 (15:15 +0000)
commit9615d702ad44f5cd3b63bb54a766f6d6ac047cb1
treeb24a1b34803ee09e318a836ebd88b42a6855f4ff
parent1c9caced63828327ebcac229df74e52006962914
optimize vector fneg of bitcasted integer value

This patch allows a vector fneg of a bitcasted integer value to be optimized in the same way that we already optimize a scalar fneg. If the integer variable is a constant, we can precompute the result and not require any logic ops.

This patch is very similar to a fabs patch committed at r214892.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215646 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/ARM/2009-10-21-InvalidFNeg.ll [deleted file]
test/CodeGen/ARM/fnegs.ll
test/CodeGen/X86/vec_fneg.ll