[PATCH] Lower FNEG ( FABS (x) ) -> FNABS (x) [X86 codegen] PR20578
spatel at rotateright.com
Thu Sep 4 19:25:50 PDT 2014
Hi chandlerc, nadav, hfinkel, andreadb,
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)
I don't know if I've chosen the best or even the right way to bail out of lowering a FABS if it has an FNEG user. I want to lower any potential FNABS cases before lowering the FABS into an AND. If the FABS gets lowered first, then it's much harder to detect an FNABS opportunity - we'd have to look through a potential cast, then a constant pool load, then check the constant(s)...messy.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5236 bytes
Desc: not available
More information about the llvm-commits