Lower FNEG ( FABS (x) ) -> FNABS (x) [X86 codegen] PR20578
authorSanjay Patel <spatel@rotateright.com>
Wed, 1 Oct 2014 21:20:06 +0000 (21:20 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 1 Oct 2014 21:20:06 +0000 (21:20 +0000)
commit2b918388ab0e15febfc5163e52ec48791bc25d47
tree6d146e1b3e94c55357ffeb12b3e15e8c3af79cc7
parent42f40dbbefe9d38407fb892d952bb05858647ad3
Lower FNEG ( FABS (x) ) -> FNABS (x) [X86 codegen] PR20578

Negative FABS of either a scalar or vector should be handled the same way
on x86 with SSE/AVX: a single OR instruction of the FP operand with a
constant to light up the sign bit(s).

http://llvm.org/bugs/show_bug.cgi?id=20578

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218822 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/fnabs.ll [new file with mode: 0644]